Error with surf function
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I have the following data dimentions:
x = linspace(1,16,256)
y = linspace(1,16,256)
size( data ) = 256 x 16
I want to plot this as a 3D using surf function. I tried to use surf( x, y, data), but I got an error due to the length of the vectors. Does any body know how can I plot it proberly?
댓글 수: 0
채택된 답변
KSSV
2020년 8월 11일
[m,n] = size(data) ;
x = 1:n ;
y = 1:m ;
surf(x,y,data)
Also you can straight away use:
surf(data) ;
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!