How can I express a symbolic variable in function of other symbolic variables,
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
XAXRXTX
il 25 Nov 2013
Commentato: Walter Roberson
il 1 Dic 2013
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 Commento
Sean de Wolski
il 25 Nov 2013
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)
Risposta accettata
Walter Roberson
il 25 Nov 2013
With newer MATLAB versions, you can use
syms f(y,z)
f(y,z) = x^2+y^3;
4 Commenti
Più risposte (1)
Andrei Bobrov
il 29 Nov 2013
Modificato: Andrei Bobrov
il 29 Nov 2013
syms x y z
xfun = matlabFunction(solve(x^2+y^3 == z,x))
3 Commenti
Vedere anche
Categorie
Scopri di più su Assumptions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!