f



HELP HELP HELP...

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
0
5/1/2007 12:55:43 PM
comp.soft-sys.matlab 211266 articles. 15 followers. lunamoonmoon (258) is leader. Post Follow

1 Replies
2125 Views

Similar Articles

[PageSpeed] 56

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
0
us1 (8051)
5/1/2007 1:03:41 PM
Reply: