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 ExchangeData Import from MATLAB についてさらに検索

質問済み:

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