find distance between [2261,582] and [2261,583] in matlab

To find the distance between two points in Matlab, you can use the "pdist" function. Here's how you can use this function to find the distance between the points [2261,582] and [2261,583]:

main.m
% Define the points
point1 = [2261, 582];
point2 = [2261, 583];

% Compute the distance between the points
distance = pdist([point1; point2], 'euclidean');
156 chars
7 lines

The output "distance" will be 1, which is the distance between the two points.

gistlibby LogSnag