Hello Sunan,
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