plotting list-valued procedures

August 18 2010 by scook4242 0
false
Maple

0


I have a function (procedure) of one real variable that returns a list of 2 real numberssay f(x)=[y1,y2].  The procedure involves a lot of looping, so it's a little slow.  My questions regards efficiently plotting this function.  y1 and y2 typically differ widely, so plotting both outputs on the same plot renders the smaller one useless (essentially looks like the zero function).  (I.e. plot(f(x),x=0..10)).  But if I use 2 distinct plot commands, the procedure seems to run twice and take twice as long (I.e. plot(f(x)[1],x=0..10); plot(f(x)[2],x=0..10);).  Is there a way to get maple to plot 2 distinct graphs from one turn through the procedure?

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account