This error generally means you are trying to run the function from the MathScript Window's script editor instead of calling the function with parameters. Try saving your function as functionname.m and then calling it from the MathScript window by typing functionname(inp1, inp2) in the command window.
Grant M. Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
I have the same problem. When I define function ave=compute_average(x,y) %compute_average determine the average ave=(x+y)/2; save it and run in the mathscript windows it shows "Unknown symbol on line 1: compute_average" why is that?
In order to define a function, you must use the function keyword. Try changing the first line of your file to be function ave = compute_average(x, y)
The error you are seeing is because your file is currently interpreted as a script. The first line is interpreted as a function call to compute_average, which MathScript cannot find.
Grant M. Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments