I want to draw surf plot for the attached figure

4 次查看(过去 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
Sam Chak 2025-9-20
编辑:Sam Chak 2025-9-20
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
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 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by