Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何在matlab中绘制带有参数的函数。例如,电势被描述为 V(d)=1/(4pi*eps0*d^2) 我想将电势绘制为符号函数,但要选择将哪个变量绘制为自变量。例如,V(d) 或 V(eps)... 如何告诉 matlab d 是变量,eps id 是参数?非常感谢
我会这样:
syms d; syms eps; V = 1./(4.*pi.*eps.*d.^2);
您可能会想到使用ezplot功能;例如,你可以打电话
ezplot
ezplot(subs(V,eps,0.1)) ezplot(subs(V,d,0.1))
在前两行中,您是说:
1)情节V取决于d和eps = 0.1;
V
d
eps = 0.1
2) 情节V取决于eps和d = 0.1。
eps
d = 0.1
我希望这有帮助。