image error

4 views (last 30 days)
pdp rpa
pdp rpa on 19 Mar 2012
x=imread('pp.jpg');
>> [m,n]=size(x);
>> x=[[1:m]' x];
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.
why this error occured and how to remove this error?
  1 Comment
Image Analyst
Image Analyst on 19 Mar 2012
What are you trying to do? Put up a ramp from 1 to m along the first row or first column of x? Be aware that if the number of rows is more than 255 your ramp will get clipped to 255.

Sign in to comment.

Accepted Answer

Andreas Goser
Andreas Goser on 19 Mar 2012
Your code would work with some images, but in your case, x likely is 3 dimensional. E.g this examples image is
imdata = imread('ngc6543a.jpg');
Depending on what you need, you may want to convert x or extract the data relevant for you.
  3 Comments
Andreas Goser
Andreas Goser on 20 Mar 2012
That sounds like a good reason for you to contact Technical Support. Alone or with your professor.
pdp rpa
pdp rpa on 22 Mar 2012
thnks .i am doing this project alone. plz help me

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!