Why do I get Inf for this complex expression?
2 views (last 30 days)
I have a function that generates a complex number but I get Inf for x. how could this be, if I do not make a logical error
%a and b are struct passed by value, e.g. sturct(1).field
[R1,R2] = Prop(a(f),b(f),f,constant(f))
Ayden Clay on 2 Jun 2020
So in MATLAB there are only a few ways to get an output of "inf". The most common in equations is that we are dividing by zero.
In this case since w = (1-e1*e2)/(e1-e2), it must be the case that for some f, e1 = e2. This can only be the case if a+b = a-b which is only possible if b = -b, which is only possible if b = 0.