I keep getting the error "Subscripted assignment dimension mismatch" for the x_values line. I've tried switching parenthesis but I can't figure it out. I'm not very good with MATLAB and this code is super long so I didn't want to post the whole thing.
for m = 1:num_part;
for n = 2:num_steps;
x_values(m,n) = x_values(m,n-1)+ stride_length .* (cos(step_angle(m,n)));
y_values(m,n) = y_values(m,n-1)+ stride_length .* (sin(step_angle(m,n)));
r_values (m,n) = sqrt(x_values(m,n).^2 + y_values(m,n).^2);
if bound_cross(m)~=0;
continue;
elseif bound <= r_values(m,n);
bound_cross (m,1) = n;
end
end