Solve equation (unrecognized function or variable)

조회 수: 14 (최근 30일)
Alessandro Ruda
Alessandro Ruda 2021년 5월 10일
댓글: Alessandro Ruda 2021년 5월 11일
Dear MatLab Comunity,
I have to solve this equation but it keeps saying that the variable 't' is unrecognized. I should have the plugins for the function 'solve' so I don't understand where is the problem.
N = 5.62
R = 6.40
W = 600
eqn = (10 + 2.*W.^(2).*t.^(2) - 8.*W.^(4).*t.^(4))./(10 +23.*W.^(2).*t.^(2) + 4.*W.^(4).*t.^(4)) -N./R
S = solve(eqn, t)
Any help would be appreciated!
All the best,
Alex

채택된 답변

Stephan
Stephan 2021년 5월 10일
편집: Stephan 2021년 5월 11일
% define t as symbolic
syms t
N = 5.62;
R = 6.40;
W = 600;
eqn = (10 + 2.*W.^(2).*t.^(2) - 8.*W.^(4).*t.^(4))./(10 +23.*W.^(2).*t.^(2) + 4.*W.^(4).*t.^(4)) -N./R
eqn = 
S = solve(eqn, t)
S = 
% scalar solutions, only real
S1 = vpasolve(eqn,t, [-Inf Inf])
S1 = 
  댓글 수: 3
Stephan
Stephan 2021년 5월 11일
Then use:
% define t as symbolic
syms t
N = 5.62;
R = 6.40;
W = 600;
eqn = (10 + 2.*W.^(2).*t.^(2) - 8.*W.^(4).*t.^(4))./(10 +23.*W.^(2).*t.^(2) + 4.*W.^(4).*t.^(4)) -N./R
eqn = 
% scalar solutions, only real
S1 = vpasolve(eqn,t, [-Inf Inf])
S1 = 
change bounds from -Inf to zero to get only the positive solution:
S2 = vpasolve(eqn,t, [0 Inf])
S2 = 
0.00042280651261763657433032919695881
Alessandro Ruda
Alessandro Ruda 2021년 5월 11일
Thanks Stephan!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by