x,y and z coordinates of a particular image has been saved as a matrix, by using the following code:
[x,y]=find(any(A,3)); % A is the variable which x and y coordinates are saved in.
xyz = [x, y];xyz(:,1) =xyz(:,1).*0.0003; % multiplied by a calibration factor
xyz(:,2) =xyz(:,2).*0.0003; % -do-
xyz(:,3) = 2; % add the z coordinate to the matrix
save('A_new.mat', 'xyz','-v7','-append') % save the xyz variable
Here is the output which i am getting for the above code:
X extent: 0 to 1576Y extent: 0 to 1894Z extent: 0 to 9
Note: z column is added to the x and y column by appending it. My question is why i am getting a low length for the z column (why is it upto 9 instead of being 1576) Can anyone help me to resolve this matter?
Best Answer