[hp50g] how enter the rand function for graphing?
|
10-13-2022, 12:21 PM
Post: #15
|
|||
|
|||
RE: [hp50g] how enter the rand function for graphing?
(10-13-2022 07:06 AM)Gil Wrote: By the way, how would you increase the number of graphed points with your "trick" «RAND » STEQ? When plotting a function, the graphing engine of the 50g looks at all of the given parameters (mostly residing in the PPAR object for this scenario), then repeatedly sets the value of the independent variable (X in this case) to what it has determined as the current value to plot. After setting X, it calls the program stored in EQ. Whatever the result is from that program becomes the Y value for the given iteration. In this case, we don't really care what X is, so it doesn't need to show up in the EQ program. Getting more points plotted becomes a matter of changing the environment so that the \<< RAND \>> program gets called more times. The previous program used a "canvas" with the default dimensions (131x80). Let's say that we want to increase the size of that canvas to 500x500, with plotted points covering that entire image. Increasing the size of the canvas will inherently spread out the results, so I'll apply multiple plots to provide more points in the final graph: Code: \<< Here's the final output that the above program generates: |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)