My code like this,
……….. …………
x_error=zeros(1,1);
y_error=zeros(1,1);
z_error=zeros(1,1);
lz=1.5; %lx=1.35; %ly=1.4;
for i=1:1:5 ly=i;
for j=1:1:5; lx=j; ...................... X=abs(x(1,1)); Y=abs(x(1,2)); H=abs(x(1,3)); x_error(i,j)=abs(X-lx); y_error(i,j)=abs(Y-ly); z_error(i,j)=abs(abs(z1-H)-lz); endend x_er=x_errory_er=y_errorz_er=z_error
it's work but when i change i=1:1:5 to i=1:0.1:5 and j=1:1:5; to j=1:0.1:5;
then error like this >>Attempted to access x_error(1.1,1); index must be a positive integer or logical.
how can i solve this i need to get the x_error value in matrix form not in a cell array form
Best Answer