How to use solve with a equation with limit
21 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Emanuel Thiago
am 15 Apr. 2021
Kommentiert: Walter Roberson
am 16 Apr. 2021
syms b1 c1 s
a = 1;
b = 7.598;
c = 6.784;
kp = limit(20.185/(a*s^2+b*b1*s+c),s,0)
solve(kp,b1)
answear to the code :
v = Empty sym: 0-by-1
I want to solve the equation in terms of b1, i know it is 0 but i need to be generic, i want something like b1 = kp*something, so i tried the function solve but it does not seem to work, maybe it is related to the limit, i would be gratefull if someone help me, thanks in advance.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 15 Apr. 2021
syms b1 c1 s
a = 1;
b = 7.598;
c = 6.784;
kp = limit(20.185/(a*s^2+b*b1*s+c),s,0)
Notice this is constant, not dependent on b1.
[kp, b1]
solve(ans)
You are trying to find the value of b1 such that b1 and 20185/6784 both become 0. There is no possible value of b1 for which that happens.
We can ask the question differently: out of all the values of b1 that make the equation 0, what is the limit as s approaches 0?
eqn2 = 20.185/(a*s^2+b*b1*s+c)
b1sol = solve(eqn2, b1)
limit(b1sol, s, 0)
It turns out there is no finite value of b1 that makes the equation 0.
I say finite because:
limit(eqn2, b1, inf)
but as s approaches 0, that goes to non-zero, and only goes to 0 if s is non-zero. So you have a contradiction, and there is no solution at all.
2 Kommentare
Walter Roberson
am 16 Apr. 2021
but that is for numeric values only.
For symbolic values you should test
isAlways(imag(X)==0)
where X is the thing to be tested. Be sure to add the option that deals with the result you want if matlab is not able to prove real or not.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numbers and Precision finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!