Re: HP PRIME - Need help for basic program svp. Message #4 Posted by Han on 7 Oct 2013, 5:01 p.m., in response to message #3 by dg1969
Quote:
Thank you Cyrille for your fast answer... I followed your advice
EXPORT Laplace()
BEGIN
local s,f;
f:="1/(1+s)";
INPUT(f,"F(s) definition","F(s)=", "No help!");
F1:=CAS("invlaplace("+f+",s,'X')");
END;
But I have an error syntax...
I can place a local var u in place of F1, I can do F1:=sin('X') but
F1:=CAS("...") don't work.....
Any idea ?
The issue is likely that f is evaluated before it actually gets passed to CAS(). What you need to do is make sure to enter in a symbolic: '1/(1+s)' as opposed to just 1/(1+s)
You can save a tiny bit of memory by using F1 instead:
INPUT(F1,"F(s) definition","F(s)=", "No help!");
and when you enter a formula, use single quotes: [shift][()] to designate a symbolic input.
|