J.A
J.A

Reputation: 285

How can I visualize the values of a matrix in 3d with Matlab?

In Matlab, I have a matrix M with values M(i,j). Each M(i,j) represents the height at the coordinates (i,j). I would like to visualize this landscape.

How can I visualize in 3d the plot with axes (i,j,M(i,j)) ?

Upvotes: 0

Views: 75

Answers (1)

Mendi Barel
Mendi Barel

Reputation: 3687

You can use for example:

mesh(M)
%or
meshc(M)
%or
bar3(M)

and others.

Upvotes: 1

Related Questions