HP Forums

Full Version: Is there any way to make this equation work on the HP 50g?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:

%%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?
I just tried something similar in my HP Prime and I was successful by running the same equation through the fsolve function like this:


And I was able to get the answer, 1587.77482493 in this case. Is there a equivalent solver function in the HP 50g where I can put a range of guesses?
Reference URL's