Derek,
After looking at the code you posted, it all seems correct and indeed runs on my system if I create sample Dataset1v6 and sigdetectv6.m files. This leads me to believe that there is some unsupported syntax in that function. MathScript tries to compile the files, if needed, when they are called. If there is an error in the function and it is unable to compile, you will see the unknown symbol error. There are a couple of options to try to determine if this is the problem.
1) Load sigdetectv6.m into the Script Editor. Click the Save & Compile button. This will save the file and attempt to compile it so that LabVIEW can run it. Any compiler errors will be reported in the Output Window. Currently, this is the only mechanism where function compiler errors are reported.
2) Load sigdetectv6.m into the Script Editor. Comment out the line declaring the function. Load your data file and make sure that the actual parameter names passed to the function match the formal parameter names expected by the function. If not, rename your variables to what the function expects. Then click the Run button. Since the body of the function is running like a regular script, any errors will be reported.
Either one of these options should report any errors in the file. If this is the case, you may be able to make a simple modification to work around the problem.
Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments