plot a 6x6 matrix in 3D

조회 수: 3 (최근 30일)
Heshani
Heshani 2011년 9월 10일
I want to plot A (6,6) matrix with row number as x axis, column number as y axis and the value of A(x,y) as z axis. what is the function to use?

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 9월 10일
N=6;
[X,Y]=meshgrid(1:N,1:N);
surf(X,Y,A);
or plot3(),contour() depending what illustration you want.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 9월 10일
Or just surf(A)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by