【发布时间】:2018-11-30 22:46:06
【问题描述】:
我正在尝试可视化一个方程式,a*sin(n*pi*x*t),其中:
-
a是一个常量 -
n是形状模式 (1,2,...) -
t是时候了 -
x是位移
这是我的代码:
syms n t x
a=1
S=symsum(a*sin(n*pi*x*t),n,1,10)
plot(t,S)
我收到了这个错误:
Error using plot
A numeric or double convertible argument is expected
Error in Untitled (line 8)
plot(t,subs(S,x,t))
我能做什么?
【问题讨论】:
-
你需要解释得更好。你的问题真的不清楚你想要什么或你的变量是什么。 minimal reproducible example 对于其他人比较和调试很重要。
-
您不能绘制符号方程,这很明显。它没有数值,对吧?
标签: matlab plot sum visualization symbolic-math