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

 채택된 답변

Thorsten
Thorsten 2015년 5월 26일
편집: Thorsten 2015년 5월 26일

1 개 추천

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

nedallica
nedallica 2015년 5월 26일
no, actually it is a long sheet of data, and further more, how to link these values to the other variable ratios? :/
Thorsten
Thorsten 2015년 5월 26일
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 2015년 5월 26일
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 2015년 5월 26일
As a matrix, as in my answer above, with A(y,x) = f(x,y)
nedallica
nedallica 2015년 5월 26일
thanks Thorsten ;)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

질문:

2015년 5월 26일

댓글:

2015년 5월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by