Contour plot of Matrix

2 views (last 30 days)
nedallica
nedallica on 26 May 2015
Commented: nedallica on 26 May 2015
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

Accepted Answer

Thorsten
Thorsten on 26 May 2015
Edited: Thorsten on 26 May 2015
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 Comments
Thorsten
Thorsten on 26 May 2015
As a matrix, as in my answer above, with A(y,x) = f(x,y)
nedallica
nedallica on 26 May 2015
thanks Thorsten ;)

Sign in to comment.

More Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!