MATLAB: Matlab code erro massage where ~ used

matlab coding

Hi,
I am running matlab code but I getting error massages. The first massage I get is '?? Error: File: matlablabtest.m Line: 62 Column: 11 Expression or statement is incorrect–possibly unbalanced (, {, or [.
Also getting same error in line: 67,69,74,98,169,225,230,232,237,298 where (~)is used. I have attached the data is that help in checking it. I have attached the m file and data in case that help to get the answer.
Regards Sarah

Best Answer

The ~ is used to omit output arguments. It was introduced in R2009b, as far as I remember. If you use an earlier version, replace it e.g. by "dummy".