Need help making a plot from data in Excel with three columns and 2000 rows, to get two variables on the same axis.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
dpb
il 5 Ott 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 Commenti
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!