Yes, it is possible with MATLAB.
However:
- "at the same time" can mean that you want taking the images to be synchronized. This could be important for accurate location determination for moving objects for example. Not all cameras have the ability to synchronize; you would typically want to look for "genlock" or "external trigger". As synchronization becomes more important, you generally tend to prefer timestamps and Data Acquisition Toolbox facilities
- If the cameras show up with exactly the same device name, then it can take extra work to be able to select cameras after the first; there is a known method, but some people have found that it does not work for them
- Historically, people have had problems using more than 2 cameras on a single USB controller. Whether you use webcam() or use the facilities of the Image Acquisition Toolbox can make a difference
- Historically, some people have had trouble using more than 1 or 2 cameras from some manufacturers, due to driver or firmware problems at the camera level
- Some of the reasons for multiple cameras fall into the topic of Sensor Fusion; https://www.mathworks.com/products/sensor-fusion-and-tracking.html and https://www.mathworks.com/help/driving/examples/sensor-fusion-using-synthetic-radar-and-vision-data.html
- multiple cameras might be for the purposes of 3D vision; https://www.mathworks.com/discovery/stereo-vision.html
