# In MATLAB two cameras are installed with PC. How to choose the desired one from them?

Status
Not open for further replies.

#### nikhildascl

##### Full Member level 3
Code:
  camera_info = imaqhwinfo('winvideo')
camera_info =

DeviceIDs: {[1]  [2]}
DeviceInfo: [1x2 struct]
I have two cameras installed on PC. But i cannot select one from the. When there was only one PC, I used to get the input from the same by using this code

Code:
   camera_id = camera_info.DeviceInfo.DeviceID(end)
Now it is returning an error as shown below

??? Error using ==> end
Incorrect cell or structure reference involving "end".
Most likely cause is a reference to multiple elements of a cell or
structure followed by additional subscript or structure references.

Status
Not open for further replies.