Post Reply 
Gompertz curve
03-30-2015, 03:09 PM (This post was last modified: 04-02-2015 07:09 AM by salvomic.)
Post: #1
Gompertz curve
hi all,
using a very useful tutorial in "Prime tutorial" (tnx Eddie!) I wrote a little program to get the Gompertz Curve (see here):

Code:

EXPORT Gompertz_curve()
BEGIN
LOCAL cr, cg, cb, I;
LOCAL control:=1;

REPEAT
INPUT({A, B, C},
"Gompertz ae^(-be^(-ct))", {"asymptote A","displacement B","growth rate C" }, {"Asymptote", "Displacement along x", "Growth rate (y scaling)" }, {0,1,1},
{A, B, C});
CASE
IF (B <= 0) THEN MSGBOX ("B must be > 0"); control:=1; B:=1; END;
IF (C <= 0) THEN MSGBOX ("C must be > 0"); control:=1; C:=1; END;
DEFAULT control:=0;
END; // case
UNTIL control < 1;

// Colors
CHOOSE(I, "Choose a Color",
"Red", "Blue", "Orange", "Green");
cr := {255, 0, 255, 0};
cg := {0, 0, 127, 255};
cb := {0, 255, 0, 0};

STARTAPP("Advanced Graphing");
V1 := "Y=A*e^(-B*e^(-C*X))";
V1(COLOR) := RGB(cr(I), cg(I), cb(I));
CHECK(1);
// Plot View
STARTVIEW(1, 1);
END;

Please, feel free to suggest improvements or criticism Smile

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Gompertz curve - salvomic - 03-30-2015 03:09 PM
RE: Gompertz curve - salvomic - 03-30-2015, 06:36 PM
RE: Gompertz curve - Marcio - 03-30-2015, 07:44 PM
RE: Gompertz curve - salvomic - 03-30-2015, 07:51 PM
RE: Gompertz curve - salvomic - 03-30-2015, 10:07 PM
RE: Gompertz curve - Marcio - 03-31-2015, 01:54 PM
RE: Gompertz curve - salvomic - 03-31-2015, 02:04 PM
RE: Gompertz curve - Han - 03-30-2015, 07:50 PM
RE: Gompertz curve - salvomic - 03-30-2015, 08:08 PM
RE: Gompertz curve - Marcio - 04-01-2015, 03:43 AM
RE: Gompertz curve - salvomic - 04-01-2015, 07:22 AM
RE: Gompertz curve - Marcio - 04-01-2015, 09:55 AM
RE: Gompertz curve - salvomic - 04-01-2015, 11:41 AM
RE: Gompertz curve - Marcio - 04-01-2015, 11:57 AM



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