필터 지우기
필터 지우기

How to enforce a certain symbolic expression to appear in Equation

조회 수: 1 (최근 30일)
Miguel Martinez
Miguel Martinez 2023년 7월 19일
편집: Dyuman Joshi 2023년 7월 19일
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.

답변 (1개)

Dyuman Joshi
Dyuman Joshi 2023년 7월 19일
편집: Dyuman Joshi 2023년 7월 19일
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 = 

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by