for i = 1:n
ymin = realmax;
ymax = 0;
for j = 1:4 % each perceptron
for k = 1:40
yval = waves0(k,j,i);
if(yval > ymax) ymax = yval;
if(yval < ymin) ymin = yval;
end
end
end
I’m trying to find the min and max value, yet when I run the function I get:
parse error near line 20 of file /Volumes/FDISK/mlr/YvalDistance.m
syntax error
parse error near line 20 of file /Volumes/FDISK/mlr/YvalDistance.m
syntax error
parse error near line 20 of file /Volumes/FDISK/mlr/YvalDistance.m
syntax error
parse error near line 20 of file /Volumes/FDISK/mlr/YvalDistance.m
syntax error
Line 20 is the last line of the function, and is empty.
If I comment if(yval < ymin) ymin = yval; I don’t get the parse error anymore. What’s up?
octave:39> version
ans = 3.2.4
Why not get rid of your syntax error and speed up your code with: