How to enforce a certain symbolic expression to appear in Equation
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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)
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)
%Simplify the output
out = simplify(out)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!