Help with symbolic toolbox
Mostra commenti meno recenti
Struggling with symbolic toolbox again
All i want to do is the following. I want to give it an equation called ess that has many symbolic variables in it.
Im going to sub in a specific value for one of the variables.
Then i want it to rearrange itself in terms of ess and give me the result as a ratio of two variable that are in the original equation.
Cant get it to work. Here is what I've been trying. Obviously it doesn't work but here is what I'm trying
syms P S Z ess ratio
ess = (S-P)/(S^2-S*Z)
S1 = -2+2*sqrt(3)*i
ess = subs(ess,S,S1)
assume(ess == 1/50)
solve(ess== Z/P, Z/P)
% Now ess should be only in terms of Z and P
%I want matlab to tell me what Z/P is interms of ess, So i want it to
%rearrange itself and say Z/P = (ess+ some numbers/some more numbers - ess)
%or whatever form it turns out to be but now ess is equal to the number
%1/50
I have also tried this version by solving by hand for Z and P and then asking it what Z/P is but it gives me an answer in terms of P still where P should no longer exists
syms Z P S
ess = 1/50
Z = (S^2-((S-P)/(ess)))/S
P = S-ess*(S^2-S*Z)
ratio = Z/P
S = -2 + 2*sqrt(3)*i
answer = subs(ratio,S)
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Assumptions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!