
I want to draw surf plot for the attached figure
1 回表示 (過去 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!
