HP Forums
unusual behaviour when graphing - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: unusual behaviour when graphing (/thread-594.html)



unusual behaviour when graphing - Mickpc - 02-02-2014 01:16 AM

I am graphing using the following program:

EXPORT Is,Vd,Vt,n;
EXPORT SHOCKLEY()
BEGIN
'I=Is*(e^(Vd/(n*Vt))-1)'▶E1;
1▶n;
10ᴇ−12▶Is;
26ᴇ−3▶Vt;
0▶Xmin;
0.8▶Xmax;
5▶Ymax;
0▶Ymin;
STARTAPP("Solve");
END;

When I run the program, select and solve for Vd (to set the independent variable) then plot the program I get a line across the x-axis as well as the exponetial curve. It seems there are two curves.
I have cleared all other equations out of the solver and the graphing app.
Anyone have any ideas?

Also is it possible to set and solve for Vd from within the program? Instead of going into num and manually selecting it?

King regards

Mick C

HP Prime A Gentle Introduction


RE: unusual behaviour when graphing - Han - 02-02-2014 02:05 AM

It's just plotting each side of the equation.


RE: unusual behaviour when graphing - Mickpc - 02-02-2014 02:25 AM

I dont suppose there is an easy way to prevent both being plotted?

Thank you

Mick C

HP Prime A Gentle Introduction


RE: unusual behaviour when graphing - jte - 03-01-2014 12:23 AM

(02-02-2014 01:16 AM)Mickpc Wrote:  … Also is it possible to set and solve for Vd from within the program? Instead of going into num and manually selecting it?

It isn't currently possible to programmatically choose the variable that the Solve app uses as the unknown variable.

It tends to default to the first seen, so prepending your equation with "0*Vd+" will have it favouring "Vd".


RE: unusual behaviour when graphing - jte - 03-01-2014 12:30 AM

(02-02-2014 02:25 AM)Mickpc Wrote:  I dont suppose there is an easy way to prevent both being plotted?

No.

You could use the function "Is*(e^(Vd/(n*Vt))-1)" in E1 instead of the equation "I=Is*(e^(Vd/(n*Vt))-1)" and programmatically solve for Vd using the Prime's programming language (such programmatic solving would not, however, affect which variable Solve is using for the unknown variable). A plot would then only consist of a single function plot.