how to solve the error like index exceeds matrix dimensions?

1 view (last 30 days)
i m using image acquisiiton toolbox in which i m trying to convert a yuy into rgb format vid = videoinput('winvideo',1,vinfo.SupportedFormats{'1280*720'}); but in this function the error comes like index exceeds matrix dimensions how can i solve it ?
  1 Comment
Geoff Hayes
Geoff Hayes on 2 Jul 2014
What this error typically means is that the code is trying to access a vector or matrix element using an index that lies outside the dimensions of the matrix. For example, if Z is a 2x2 matrix, then Z(3,1) will throw this error.
When your code raises this error message, are you given any other information as to the line number that corresponds to this error?
I noticed that the text string for the format is
1280*720
Should this be
1280x720
instead? i.e with an x instead of the asterisk?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!