Post Reply 
help with hpppl
05-07-2016, 04:55 PM
Post: #2
RE: help with hpppl
Add a local variable x:

LOCAL REAL,IMA,N,W,R,C,x;

Store the result of the solve operation in x and add quotes around R and C

x:=CAS.solve({REAL=ZIN_REAL,IMA=ZIN_IMA},{'R','C'});

then RETURN x;

And you get {{0,_(1013904223)}} for an answer. I don't know if it's the right answer, but it's a start.

Here's the code with the suggested changes:
Code:

ZIN_F:=4000000;
 ZIN_REAL:=400;
 ZIN_IMA:=400;

EXPORT ZIN()
BEGIN
LOCAL REAL,IMA,N,W,R,C,x;
 INPUT({{ZIN_F,[0]},{ZIN_REAL,[0]},{ZIN_IMA,[0]}},"IMPEDANCE",{"freq","real","imag"});

 W:=2*π*ZIN_F;
 N:=1+W^2*'R'^2*'C'^2;
 REAL:='R'/'N';
 IMA:=W*'C'*'R'^2/'N';
 x:=CAS.solve({REAL=ZIN_REAL,IMA=ZIN_IMA},{'R','C'});

 RETURN x;
END;

-road
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
help with hpppl - leprechaun - 05-07-2016, 12:30 PM
RE: help with hpppl - roadrunner - 05-07-2016 04:55 PM
RE: help with hpppl - roadrunner - 05-07-2016, 05:00 PM
RE: help with hpppl - salvomic - 05-07-2016, 05:15 PM
RE: help with hpppl - roadrunner - 05-08-2016, 01:52 AM
RE: help with hpppl - leprechaun - 05-08-2016, 06:41 PM
RE: help with hpppl - leprechaun - 05-08-2016, 06:46 PM
RE: help with hpppl - roadrunner - 05-09-2016, 12:14 AM
RE: help with hpppl - roadrunner - 05-09-2016, 12:55 PM
RE: help with hpppl - CH3791 - 05-28-2016, 01:17 AM
RE: help with hpppl - leprechaun - 05-09-2016, 05:14 AM
RE: help with hpppl - leprechaun - 05-09-2016, 06:48 AM
RE: help with hpppl - Han - 05-09-2016, 01:25 PM
RE: help with hpppl - leprechaun - 05-09-2016, 05:35 PM
RE: help with hpppl - Tim Wessman - 05-09-2016, 05:53 PM



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