04-15-2018, 09:11 PM
I'm writing a simple program in my 50g to be able to get the frequency response of a electronic low-pass filter. The equations are pretty simple to understand, so I decided to try and write a simple program and this is what I have come up with:
The problem is that when I run it I get the following message "ISOL Error: Not reducible to a rational expression". I know this is because of the limitations of the solver in the HP 50g, but is there any way to make this work?
Code:
%%HP: T(0)A(D)F(.);
\<<
100 @ Resistor value.
0.000001 @ Capacitor value.
-3 @ Cutoff point (dB).
0 @ Temporary value for "fn".
\-> r c fs fn
\<<
'-(1/(2*‡*f*c))*i' EVAL 'c' STO @ Get capacitor complex impedance.
'fs=20*LOG(ABS(c)/ABS(r+c))' EVAL 'fn' STO @ Frequency response function.
fn 'f' ISOL @ Isolate f.
DUP @ Create a backup.
EVAL @ Should return the value of "f".
\>>
\>>
The problem is that when I run it I get the following message "ISOL Error: Not reducible to a rational expression". I know this is because of the limitations of the solver in the HP 50g, but is there any way to make this work?