Hi, i need help about how to evaluate a diff result with values of variables, thank you
3 次查看(过去 30 天)
显示 更早的评论
Example
syms x y;
f1=(x.^3)+(x*y.^2)-(5);
df1y=diff(f1,y);
x=2;
y=0.25;
d=subs(df1y(x,y)) % Here is what im trying to do, but it doesn´t work apparently
hope you guys can help me to find out, thanks
0 个评论
采纳的回答
Walter Roberson
2018-3-10
d = subs(df1y)
However, I recommend using different variable names, such as
syms x y
f1 = (x.^3)+(x*y.^2)-(5);
df1y = diff(f1,y);
X = 2; %do not overwrite the symbolic names!
Y = 0.25;
d = subs(df1y, {x, y}, {X, Y})
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!