Your line
x=[197, 161, 144, 162, 185, 154, 136, 130]
should be commented out. The code from "Usage:" on down should be saved in myttestfcn.m . To invoke the function you will need to go to the command line and invoke it there, such as
x=[197, 161, 144, 162, 185, 154, 136, 130];
y=[204, 182, 140, 178, 183, 163, 156, 143]';
[ci, crit, h, df] = myttestfcn(x, y, 2, 1, 0.5)
