question about surf function

3 次查看(过去 30 天)
t = linspace(0,2,100) x = linspace(0,10,100) [X,T]=meshgrid(x,t) U = 10*sin(2*pi*(t-x/5))+2*sin(2*pi*(t+x/5)) surf(X,T,U) Why it can not work? It always tips me Z must be a matrix.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2014-4-27
t = linspace(0,2,100)
x = linspace(0,10,100)
[X,T]=meshgrid(x,t)
U = 10*sin(2*pi*(T-X/5))+2*sin(2*pi*(T+X/5))
surf(X,T,U)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Objects 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by