LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

maths script functions does not work? dot.m files

I am trying to write some dot.m functions to call from the LabView maths script. I have followed the description in the links here - verbatium:

http://zone.ni.com/reference/en-XX/help/371361F-01/lvhowto/mathscript_function_syntax/
https://forums.ni.com/t5/LabVIEW-MathScript-RT-Module/MathScript-Nugget-10-How-To-Call-User-Defined-...

but when I write the call to the function in the script LabView does not recognize it. How do I get this working.

this does not work either from defining a function in the same script or trying to call it as a dot.m file. I am using LabView 2015.

0 Kudos
Message 1 of 3
(3,861 Views)

here are script and VI files:

Download All
0 Kudos
Message 2 of 3
(3,823 Views)

dot.m file:

 

function a = add2(x)
% add2 is a subfunction. Only fadd3 can call this function.
% add2 computes the constant 2 using Euler's formula:
% e^ (i * theta) = cos(theta) + i * sin(theta)
a = x - (exp(i*pi) - 1);

0 Kudos
Message 3 of 3
(3,820 Views)