How to use solve with a equation with limit

21 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2021-4-15
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)
kp = 
Notice this is constant, not dependent on b1.
[kp, b1]
ans = 
solve(ans)
ans = Empty sym: 0-by-1
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)
eqn2 = 
b1sol = solve(eqn2, b1)
b1sol = Empty sym: 0-by-1
limit(b1sol, s, 0)
ans = Empty sym: 0-by-1
It turns out there is no finite value of b1 that makes the equation 0.
I say finite because:
limit(eqn2, b1, inf)
ans = 
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 个评论
Emanuel Thiago
Emanuel Thiago 2021-4-16
then is there a way to ask if a number is real ? i need to make a generic code, even if it always it is gonna be the case
Walter Roberson
Walter Roberson 2021-4-16
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numbers and Precision 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by