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!