Need help making a plot from data in Excel with three columns and 2000 rows, to get two variables on the same axis.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an excel spreadsheet that I need to plot for a time response question that includes three columns of data and 2000 rows. The 2nd and 3rd column need to be on the same x-axis, and I cannot figure out how to get the spreadsheet referenced into the script as well as I do not know the correct functions. I know the basic functions to get a normal plot, but since there is this much data and 3 variables, I am lost on what goes into the script. I am able to import the data into MATLAB but not the code.
0 Kommentare
Antworten (1)
dpb
am 5 Okt. 2022
Size of data is of no matter to syntax -- if you can plot a vector of 5 elements, you can plot one of thousands...
data=readmatrix(fullfile('YourDataDirectory','YourFile.xlsx')); % read the data as an array
plot(data(:,1),data(:,2:3))
Done except for x/y labels, title, etc., etc., ...
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!