PLOT from excel data
1 回表示 (過去 30 日間)
古いコメントを表示
Hallo, How can i plot the data from an excel sheet. I don't want to read the data of excel every time. Instead i want to store the data locally and call it once. For example i want to plot data from excel sheet with respect to multiple random cells a= C48:W48, b= C50:W50 c=C34:D34 d=B82:C82..... Plot(a,b,c,d..)
my code:
b = xlsread('abc.xlsm','Sheet1','C48:W48')
a = xlsread('abc.xlsm','Sheet1','C50:W50')
c = xlsread('abc.xlsm','Sheet1','C34:D34')
d = xlsread('abc.xlsm','Sheet1','B82:C82') %%eigen_1.............
..
plot(a,b,c,d...)
This takes lot of time because it reads excel file every time. PLease help since i am new to this...
0 件のコメント
回答 (1 件)
Jan
2017 年 5 月 29 日
What about reading the Excel file once:
Data = xlsread('abc.xlsm', 'Sheet1')
Then indexing works e.g. by https://www.mathworks.com/matlabcentral/fileexchange/15806-excel-column-name-to-number, if you want an address like 'C48'.
1 件のコメント
Jan
2017 年 5 月 29 日
@aiyappa macharanda ganesh: The NaNs are no problem. You mentioned, that reading takes a lot of time. Reading the data once and extracting the wanted values later should be faster.
You post a diagram. Does this mean, that the problem is solved or do you have a question? I got similar diagrams, when I forgot to transpose the matrix for the input of the plot command. Please post the code in case of problems.
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!