MATLAB: My improfile results get shorter

improfile

This might be a simple or dumb question but please help
I'm brand new to MATLAB and am trying to get intensity data out of images using improfile.
This image 'A' is a 422 X 85 image (gray scale) and I'm using the function as I1=improfile(A,[1 1],[1 422]), I2=improfile(A,[2 1],[2 422]) …
The first I1 result gives me '422 X 1' size, but then it keeps getting shorter afterwords. (I2 – 421X1, I3 – 420X1, …)
Am I doing something wrong?
Thanks in advance for your help.

Best Answer

This is expected. The number of pixels used is probably max() of delta x and delta y, with it producing one result for each integer offset in that space