Hello I have a sheet of data in excel like this:
r/R 1 2 3 4 5
l/L
1 1 5 6 6 9
2 5 6 7 8 3
3 1 5 6 6 9
as you see the inner values are dependant to both ratios which are varying from 1...5. how can I import these data from excel to matlab and draw a contourplot?
thanks

 Akzeptierte Antwort

Thorsten
Thorsten am 26 Mai 2015
Bearbeitet: Thorsten am 26 Mai 2015

1 Stimme

If you just have these 3x4 values, you can copy them to Matlab without reading the Excel file:
A = [1 5 6 6 9
5 6 7 8 3
1 5 6 6 9];
contour(A)
You can also show the matrix as a gray scale image
imshow(A, [])

5 Kommentare

nedallica
nedallica am 26 Mai 2015
no, actually it is a long sheet of data, and further more, how to link these values to the other variable ratios? :/
Thorsten
Thorsten am 26 Mai 2015
You can use xlsread. I do not understand the second part of your question; what exactly are "these values" and what are "the other variable ratios"?
nedallica
nedallica am 26 Mai 2015
I have the x axis, varying from 1 to 5. the y axis, varying from 1 to 3. now I have number that are dependant to the x and y values. how can I show this dependancy? z=f(x,y) :)
Thorsten
Thorsten am 26 Mai 2015
As a matrix, as in my answer above, with A(y,x) = f(x,y)
nedallica
nedallica am 26 Mai 2015
thanks Thorsten ;)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by