how to rewrite an equation in terms of another equation?

23 vues (au cours des 30 derniers jours)
Omidreza Ghafarinejad
Omidreza Ghafarinejad le 26 Avr 2015
Commenté : Star Strider le 26 Avr 2015
Hi. I have an equation for example like this:
sigma = 4*q*y^3/(b*h^3)
and I introduce that:
I = b*h^3/12
now I want to know how can I rewrite "sigma" in terms of "I"?
  3 commentaires
Omidreza Ghafarinejad
Omidreza Ghafarinejad le 26 Avr 2015
Modifié(e) : Omidreza Ghafarinejad le 26 Avr 2015
The question is very simple. I want to rewrite sigma in terms of I. I don't want to do it by hand. I want matlab to do this job for me. Consider that the sigma here is just an example. I have 3 equations that are longer than sigma here.Calculating all of them in terms of "I" takes so much time so I want matlab to do it for me. For example it should show me the sigma like this:
sigma = q*y^3/3*I
pfb
pfb le 26 Avr 2015
Ok, now that you have explained it, I understand. Perhaps I'm a bit slow.
Anyway, duplicating the question in the "tags" field is not very helpful.
Referring to symbolic calculations would have been more helpful.

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 26 Avr 2015
This works:
syms q y b h I
sigma = 4*q*y^3/(b*h^3);
Eq1 = I == b*h^3/12;
b = solve(Eq1,b);
sigma = subs(sigma)
produces:
sigma =
(q*y^3)/(3*I)
  2 commentaires
Omidreza Ghafarinejad
Omidreza Ghafarinejad le 26 Avr 2015
thanks. it worked
Star Strider
Star Strider le 26 Avr 2015
My pleasure.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by