I want to make a 3-D surface plot without contour lines of the function but I keep receiving a Matrix dimensions must agree error
조회 수: 4 (최근 30일)
이전 댓글 표시
% 3)Make a 3-D surface plot without contour lines of the function .
z = peaks(exp(2*(x-1).^2+(y+2).^2));
peaks(25);
colormap(pink) % change color map
shading interp
댓글 수: 1
Saravanan Sengottuvel
2021년 4월 9일
Your code works fine for me. Does your input variables x and y dimensions are matching ?
채택된 답변
Saravanan Sengottuvel
2021년 4월 9일
x = linspace(1,10,1000);
y = linspace(1,10,1000);
z = peaks(exp(2*(x-1).^2+(y+2).^2));
peaks(25);
colormap(pink) % change color map
shading interp
Try this code.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!