回答済み
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

さらに読み込む