05-22-2008 08:51 PM
05-22-2008 08:56 PM
05-23-2008 12:12 AM - edited 05-23-2008 12:12 AM
Yes, to use the matlab script, you need matlab installed.
You can also chose scilab as a script server for a free alternative (see http://www.scilab.org/download/index_download.php?page=SLG.html), it is similar to matlab.
Open the example finder and e.g. search for mathscript. Maybe one of the examples will answer your questions. Have you tried?
What is your LabVIEW version?
05-23-2008 10:52 AM
05-24-2008 02:14 AM
05-24-2008 11:46 AM
sean1985 wrote: labvie 8.5. why? is there any problem?
02-05-2010 07:32 PM
Hello Sir Knight AltenBach:
Some comments on capabilities of MathScript versus Matlab and recently the new ScieLab 5.2. I started using it for LV8.2 for work involving quantum noise statistics in image sensors . Although it has increased more analysis functions and speed for each new LabVIEW release, there are serious limitations of this tool. So its probably only good as some small code insertions between codes for hardware calls for processing signals when they become available as arrays. First, "not all functions is supported in LabVIEW Runtime" e.g. get (), set () etc. so scripts stays as long as LV Development environment stays with it to execute it. Second is - it still does not support "multi-dimensional arrays" - consider for example converting an RGB image to an array in LabVIEW and wiring the result as input node array here [nn,mm,nc] = size(array); can't work but [nn,mm] = size(array); don't receive a complain - in other words we can't go beyond 2D array math with MathScript. The third, is Mathlab will not work entirely with calls to Matlab or Scielab toolkits (Scielab nodes only works on LV8.0 to 8.2 for lower than 5.2) . So m-scripts should be written carefully inside these nodes! Forget cell arrays {}, forget structs, forget multidimensional arrays. Fourth, is that you can define m-functions and actually execute it but only on a MathScript Window, you need to actually wire in every text on the script inside a MathScript in a new VI identifying all the entries and exit node variables to connect to. If your trying to save ~USD$5K for a Matlab license and felt you need to do it in "hybrid style programming" interfacing the IO instrumentation capability of LabVIEW with the efficient array processing in Matlab - you probably need to work with them together anyway because you need to cut and paste every command you did in Matlab to the command window of MathScript - type help for each keyword built-in function and observe how they behave if at all they do the same thing or not.
02-10-2010 02:04 PM
We have used the matlab script window heavily out of necessity. Our lab equipment and some initial analysis was done in LabView. The whizbang "algorithmists" did their work in matlab. For us to meet some deadlines, it was necessary for us to make the things work together and still maintain their seperate maintenance envrionments. What we did was to bring all the input variables into the matlab script window, make a directory definition line of code and then call the function in matlab, passing in all the variables defined at the input edge of the script window. When the function call to matlab completed, it wrote the output variables to the output variables we had defined in the function call and then returned the MatLab directory to where it had been before the call. (This is Texas, always close the gate after you go through or you get to go find the cows...). By doing it this way, we allowed the matlab developers to work "independently" from the LabView developers....each using the latest version of their software. MatLab has some powerful tools in its development environment.
If you do it this way, you should be able to break down the functions within Matlab and convert / test them a little at a time.
Hope that helps
Hummer1