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

채택된 답변

Walter Roberson
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!

Translated by