Borrar filtros
Borrar filtros

How to enforce a certain symbolic expression to appear in Equation

1 visualización (últimos 30 días)
Miguel Martinez
Miguel Martinez el 19 de Jul. de 2023
Editada: Dyuman Joshi el 19 de Jul. de 2023
I have the following symbolic equation:
syms go u W d f
f = ((0.65*W)/go);
Fcc_1 = (2*5^(1/2)*d*go^2*(- (go^2*(u - 1)^2*W)/20 + W^3/8000)*(-(W^2/400 + ...
(u - 1)^2*go^2)/(W*go*(- 1 + u)))^(1/2))/(W*pi*(go^2*(u - 1)^2 + W^2/400)^2);
However, in the final equation (Fcc_1) I only want the variables 'u', 'd', and 'f' to appear. How can I enforce 'f' to be substituted accordingly?
Note that f is 0.65*W/go.

Respuestas (1)

Dyuman Joshi
Dyuman Joshi el 19 de Jul. de 2023
Editada: Dyuman Joshi el 19 de Jul. de 2023
syms go u W d f
%relation of f with W, go
rel = ((0.65*W)/go)-f==0;
%Obtain W in terms of f and go (you can also get go in terms of f and W)
term = solve(rel,W)
term = 
Fcc_1 = (2*5^(1/2)*d*go^2*(- (go^2*(u - 1)^2*W)/20 + W^3/8000)*(-(W^2/400 + ...
(u - 1)^2*go^2)/(W*go*(- 1 + u)))^(1/2))/(W*pi*(go^2*(u - 1)^2 + W^2/400)^2);
%Substitute the term in place of W in the main expression
out = subs(Fcc_1,W,term)
out = 
%Simplify the output
out = simplify(out)
out = 

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by