How can I express a symbolic variable in function of other symbolic variables,
7 次查看(过去 30 天)
显示 更早的评论
hello
is there a predefined function in matlab that can express a symbolic variable depending on other symbolic variables, for example
syms x y z
z=x^2+y^3;
x=f(y,z)=?????????????????
what is a function that allows to write x in terms of y and z
thanks in advance
1 个评论
Sean de Wolski
2013-11-25
Like a function in a separate file that takes in x and y or like your expression for z which could be rewritten as
z = @(x,y)x^2+y^2;
Then to use:
z(x,y)
采纳的回答
Walter Roberson
2013-11-25
With newer MATLAB versions, you can use
syms f(y,z)
f(y,z) = x^2+y^3;
4 个评论
更多回答(1 个)
Andrei Bobrov
2013-11-29
编辑:Andrei Bobrov
2013-11-29
syms x y z
xfun = matlabFunction(solve(x^2+y^3 == z,x))
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!