Solve equation (unrecognized function or variable)
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alessandro Ruda
am 10 Mai 2021
Kommentiert: Alessandro Ruda
am 11 Mai 2021
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
0 Kommentare
Akzeptierte Antwort
Stephan
am 10 Mai 2021
Bearbeitet: Stephan
am 11 Mai 2021
% 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
S = solve(eqn, t)
% scalar solutions, only real
S1 = vpasolve(eqn,t, [-Inf Inf])
3 Kommentare
Stephan
am 11 Mai 2021
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
% scalar solutions, only real
S1 = vpasolve(eqn,t, [-Inf Inf])
change bounds from -Inf to zero to get only the positive solution:
S2 = vpasolve(eqn,t, [0 Inf])
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!