Post Reply 
Is there any way to make this equation work on the HP 50g?
04-15-2018, 09:11 PM
Post: #1
Is there any way to make this equation work on the HP 50g?
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:

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?
Find all posts by this user
Quote this message in a reply
04-15-2018, 10:00 PM
Post: #2
RE: Is there any way to make this equation work on the HP 50g?
I just tried something similar in my HP Prime and I was successful by running the same equation through the fsolve function like this:

Code:
fsolve(fs,f,0..30000)

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?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)