PLOT from excel data

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...

Risposte (1)

Jan
Jan il 29 Mag 2017
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 Commento

Jan
Jan il 29 Mag 2017
@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.

Accedi per commentare.

Categorie

Tag

Richiesto:

il 29 Mag 2017

Commentato:

Jan
il 29 Mag 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by