
I want to draw surf plot for the attached figure
조회 수: 2 (최근 30일)
이전 댓글 표시
The c=4 and alfa=3.2.T is vector from -0.5 to 0.5.X is vector from 4 to -4
댓글 수: 1
Sam Chak
2025년 9월 20일
편집: Sam Chak
2025년 9월 20일
Hi @Tarek
You can find little examples in the surf() documentation. Were you provided with (i) a surface equation, (ii) parametric equations, or (iii) an implicit equation that contains the parameters 'c' and 'alfa', but you are unsure how to implement this in MATLAB due to lack of examples?

채택된 답변
William Rose
2025년 9월 20일
You did not attach a figure. But let's suppose that you compute a function f(X,T), on a grid of X and T values.
x=-4:0.2:4; t=-0.5:.025:+0.5;
[X,T]=meshgrid(x,t);
f=exp(-((X/2).^2+(T/.25).^2));
surf(X,T,f,'EdgeColor','none');
colorbar
xlabel('X'); ylabel('T'); title('f(X,T)')
댓글 수: 0
추가 답변 (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!
