Re: Asking about MSPScript
- To: mathgroup at smc.vnet.net
- Subject: [mg42098] Re: Asking about MSPScript
- From: bghiggins at ucdavis.edu (Brian Higgins)
- Date: Thu, 19 Jun 2003 03:59:04 -0400 (EDT)
- References: <bcp139$7tl$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Loh Lee,
You can add the follow scripts to your msp page. For your first query
you would do the following:
<%Mathlet Fun[x1_,x2_,x3_] : = x1*u^3 + x2*u^2 + x3*5 %>
Then to use the function
<%Mathlet Fun[1,2,3] %>
To plot two curves in one graph you can do the following
<%Mathlet MSPShow[Plot[{Sin[x],Cos[x]},{x,0,3Pi}]]%>
Note the following syntax is for webMathematica 1; in webMathematica 2
java server page syntax is used, though the above still works.
Hope this helps,
Cheers
Brian
"lohleeping" <lohleeping at hotmail.com> wrote in message news:<bcp139$7tl$1 at smc.vnet.net>...
> Hi there,
> I would like to know how to assign a function in MSPScript.
> For example,
> Fun(x1_,x2_,x3_):= x1*u^3 + x2*u^2 + x3*5;
>
> Another question, how to plot 2 curves in one graph in
> MSPScript.
>
> Thank you.
>
> Best regards,
> Loh Lee Ping