cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript - modeling Z(x,y)

DonRoth
Active Participant

Re: Mathscript - modeling Z(x,y)

ps. Actually it would not be a bad idea to include most if not all of the options available for the LabVIEW surface graph.....Don
DonRoth
Active Participant

Re: Mathscript - modeling Z(x,y)

Is there a way using Mathscript to plot more than one 3d plot on one graph.  In other words,  Z(x,y)  actually now becomes  Z(x,y,c) where c is the 4th variable.  So we would have  several Z(x,y) plots  as a function of  c.

Sincerely,

Don
GrantM
NI Employee (retired)

Re: Mathscript - modeling Z(x,y)

Hello Don,

Unfortunately, this is not possible with the 3D plotting commands in MathScript.  One way to accomplish this for 2D plots is to use the command
hold on
Each successive plot command will then work on the current plot.  However, this does not work for the MathScript 3D plots.  I have attached a VI that shows how to perform the computations in MathScript but to use LabVIEW to generate the multiple surface plot.

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

Message Edited by GrantM on 05-11-2007 08:46 AM

Message Edited by GrantM on 05-11-2007 08:55 AM

GrantM
NI Employee (retired)

Re: Mathscript - modeling Z(x,y)

Message contains an attachment
I seem to be having difficulty attaching a VI that works.  Let's try a zip file now.

Message Edited by GrantM on 05-11-2007 09:00 AM

Highlighted
DonRoth
Active Participant

Re: Mathscript - modeling Z(x,y)

Message contains an attachment

I think the multiple surface.vi will have to be reposted.  I could not open it (I am still using LabVIEW 8.2, not 8.2.1).

My strategy for doing this in LabVIEW was to import the mathscript into a mathscript node, create the outputs needed, create the X and Y vectors for the surface graph, and manually add plots to the surface graph.  Attached is the resulting VI.....

 

Don

DonRoth
Active Participant

Re: Mathscript - modeling Z(x,y)

Message contains an attachment
Based on what you posted, I modifed my VI to just use one mathscript node and used the set plot.vi fx.....Don