Hi everybody there. I have created a GUI in MATLAB's guide application. In the GUI I am appearing on the screen a frame from a camera by pushing a button. My problem that sometimes the application works fine, but some others something is going wrong and I get the following error message: ??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> LEDsFinal>txtGrabFrame_Callback at 164 A(width, i, Blue) = abs(fread(portCMU, 1, 'uint8'))/255; What does the error message mean? What seems to be the problem? How can I overcome it? I would really apprecicate any help of you. Thank you in advance... NM
nm: <SNIP hardware problem... > Error in ==> LEDsFinal>txtGrabFrame_Callback at 164 > A(width, i, Blue) = abs(fread(portCMU, 1, > 'uint8'))/255; a guess: for whatever reasons, your hardware does not always seem to return a frame when you think it should - or the frame is not always complete at this time... one solution use a temp var and check for its existence/size before you add it to your var <A>, eg, tmpframe=fread(portCMU,1,'uint8'); if ~isempty(tmpframe) % add size check A(width,i,Blue)=abs(tmpframe)/255; else % possible debug point... end this also allows you to debug/check if needed... us