답변 있음
Load multiple files one by one into a subfolder or Extract data from strut
matpath = 'C:..\..sol_file\'; matfiles = dir(fullfile(matpath ,'*.mat')); full_file_names = fullfile(matpath,{matfiles.name}...

2년 초과 전 | 0

| 수락됨

답변 있음
stem plot line width inconsitencies
Seems like a renderer issue. You can try switching to the 'painters' renderer. You can see in the tests below that only the 'pai...

2년 초과 전 | 0

| 수락됨

답변 있음
Adding values of each row
data = [1;3;6;8] result = cumsum(data,1) Or, if you want to overwrite your data with the new value: data = cumsum(data,1)

2년 초과 전 | 0

| 수락됨

답변 있음
Issue with fprintf in a loop
fprintf returns the number of bytes written. It's always zero in this case because '%.2n' is not a valid format. Instead, use s...

2년 초과 전 | 0

| 수락됨

답변 있음
For loop with two conditions
for n = -2:2 if n == 0 % use D_n_0 else % use D_n end end

2년 초과 전 | 0

| 수락됨

답변 있음
i want to generate a sequence of n numbers
start = -4; increment = 2; N = 8; sequence = start + (0:N-1)*increment;

2년 초과 전 | 0

답변 있음
I want to avoid dynamically naming my tables after a join.
Maybe something like this will help: T = table(["AAA"; "BB"; "BBB"; "CCC"; "CCC"; "CCC"; "DDD"], ... [datetime('2023-07-07...

2년 초과 전 | 1

| 수락됨

답변 있음
Plot 3D Contour plot on Surface Plot
Here I specify x and y as well as the contour levels in the contour3 call. Adjust as desired. %% Main Script. %% Clear the MAT...

2년 초과 전 | 0

| 수락됨

답변 있음
Multiple plots in a single figure not working correctly for pole plots
Try this: cs = crystalSymmetry('321'); ss = specimenSymmetry('1'); filename = 'pcrystal_standard.csv'; fileID = fopen(file...

2년 초과 전 | 0

| 수락됨

답변 있음
For loop producing correct values but returning zeros
"it resets the previous numbers to zero" That's not correct. The first few iterations' results appear to be zero on the plot be...

2년 초과 전 | 1

답변 있음
How do I make this graph in just one expression?
Each of the following two methods does the plotting with one line of code. ir = [0.03485,0.0294,0.0198,0.0074]; t_ir=[0.372,0....

2년 초과 전 | 0

| 수락됨

답변 있음
Plot multiple columns of table with datetime
P = array2table(rand(288,3),'VariableNames', ["generator", "consumer", "storage"]); current_time = datetime('now','Format','y...

2년 초과 전 | 0

| 수락됨

답변 있음
MATLAB letter grade from Excel file
You need to define which numeric grades map to which letter grades. For example: letters = 'F':-1:'A'; letters(letters == 'E')...

2년 초과 전 | 0

| 수락됨

답변 있음
eval for string to variable
Since var is a string (as opposed to character vector), when you concatenate it with character vectors, those character vectors ...

2년 초과 전 | 0

| 수락됨

답변 있음
Split a Table at every nth row
T = array2table(rand(96014,10)) % approximately 96000 rows in the table One approach: Split T into tables that are exactly 2800...

2년 초과 전 | 0

답변 있음
I'm new to MATLAB GUI and want to ask for help
m-files created with GUIDE require an associated .fig file of the same name. You should go back to where you found the m-file an...

2년 초과 전 | 0

답변 있음
Looping through tables in my workspace, plotting them, and saving a picture of the plot.
The error message, "Dot indexing is not supported for variables of this type." indicates that some code is trying to access a co...

2년 초과 전 | 1

| 수락됨

답변 있음
Save in App designer text area value not as .txt, .dat, or .csv file - Matlab
writecell(app.XYZfilecontentTextArea.Value, 'E:\SCH.xyz', 'QuoteStrings',false, 'FileType','text');

2년 초과 전 | 1

답변 있음
Help debugging real time plotting issues
"Why does the plot have lines connected to the first datapoint[?]" Because tData(1) is always 1/samplingRate. I guess you shou...

2년 초과 전 | 0

| 수락됨

답변 있음
I'm trying to graph data from an html file and I'm unsure how to load and graph it.
url = "https://coyote.eece.maine.edu/ece101/hw/umhab-137-iridium.html"; T = readtable(url); head(T) tail(T) alt = str2doub...

2년 초과 전 | 0

답변 있음
fprintf automatic spacing for strings of different lenghts
cities = ["Pasadena","Urbana-Champaign","Cambridge"]; path = 1:numel(cities); d = [3200 1600 4800]; % using a vector of distan...

2년 초과 전 | 2

| 수락됨

답변 있음
VLOOK UP Function for MatLab - Closest Match
col1 = 1; val1 = 12; col2 = 2; [~,idx] = min(abs(data{:,col1}-val1)); result = data{idx,col2};

2년 초과 전 | 0

| 수락됨

답변 있음
How to change the scale of color bar to discrete ?
You can use a colormap that has duplicate colors wherever the spacing between the levels is 0.1: x = [-7.22 -6.70 -6.19 -5.67 -...

2년 초과 전 | 0

| 수락됨

답변 있음
how to plot a time series from row 1000 to 3000
LD6 = load('output_a_f_LL_bus5.mat'); Data = LD6.Id_6.Data; t = LD6.t.Time; figure idx = t >= 0.1 & t <= 0.3; plot3(Data(id...

2년 초과 전 | 1

| 수락됨

답변 있음
log scale not displayed correctly in horizontal bar graph
Use axis ([1 4500000 0 2]); or put whatever lower x-limit you want to use instead of 1. Zero cannot be rendered on log...

2년 초과 전 | 0

| 수락됨

답변 있음
Shuffle matrix based on column elements
Here's one way: data = readmatrix('logfile_example-30-09-23.xlsx') [trial_idx,trial_id] = findgroups(data(:,3)); n_trials = n...

2년 초과 전 | 0

| 수락됨

답변 있음
Manipulating data from a table in app designer
tabla = table; % ... app.UITable.Data = tabla; The uitable's Data is a table variable, so you need to get the data out of the...

2년 초과 전 | 0

| 수락됨

답변 있음
How can i make the output hide and show only when the output when the cursor is placed
This will toggle the visibility of a text object when you click on its corresponding pixel in the image. All text objects are in...

2년 초과 전 | 0

| 수락됨

답변 있음
How to avoid unnecessary legends in the graph?
Set the 'HandleVisibility' of the ConstantLines created by xline() to 'off'. figure('Position',[10 10 1200 500]); plot(1:51940...

2년 초과 전 | 0

답변 있음
Find a value in structure
yourStruct = struct('e1',{1 2 3 18841},'e2',{1 2 18841 4},'e3',{1 2 3 4}) valueToFind = 18841; fieldsToSearch = {'e1', 'e2', '...

2년 초과 전 | 0

더 보기