How to iterate over data sets?
Hi everyone,
I am new to coding so please bare with me as I am trying my best.
I am trying to plot and iterate over different data sets, for example, I want to plot data points 1-10, skip over 11 and 12, and then plot the next 10, 13-23 and so on and so forth. This is what I have so far. Please let me know where I have gone wrong. Thank you.
filename = "Mydatasheet.csv";
opts = detectImportOptions(‘filepathMydatasheet.csv’,’.csv’);
T = readtable("Mydatasheet.csv",opts);
dummy1 = table2array(:,1);
dummy2 = table2array(:,2);
for ii= 1: length(dummy,2)
plot(dummy1(1:10:230),dummy2(1:10:230));
endHi everyone,
I am new to coding so please bare with me as I am trying my best.
I am trying to plot and iterate over different data sets, for example, I want to plot data points 1-10, skip over 11 and 12, and then plot the next 10, 13-23 and so on and so forth. This is what I have so far. Please let me know where I have gone wrong. Thank you.
filename = "Mydatasheet.csv";
opts = detectImportOptions(‘filepathMydatasheet.csv’,’.csv’);
T = readtable("Mydatasheet.csv",opts);
dummy1 = table2array(:,1);
dummy2 = table2array(:,2);
for ii= 1: length(dummy,2)
plot(dummy1(1:10:230),dummy2(1:10:230));
end Hi everyone,
I am new to coding so please bare with me as I am trying my best.
I am trying to plot and iterate over different data sets, for example, I want to plot data points 1-10, skip over 11 and 12, and then plot the next 10, 13-23 and so on and so forth. This is what I have so far. Please let me know where I have gone wrong. Thank you.
filename = "Mydatasheet.csv";
opts = detectImportOptions(‘filepathMydatasheet.csv’,’.csv’);
T = readtable("Mydatasheet.csv",opts);
dummy1 = table2array(:,1);
dummy2 = table2array(:,2);
for ii= 1: length(dummy,2)
plot(dummy1(1:10:230),dummy2(1:10:230));
end plotting, for loop MATLAB Answers — New Questions