
Re: Matrix dimensions must agree.
Posted:
Mar 20, 2014 1:57 PM


dpb <none@non.net> wrote in message <lgf8jc$vlq$4@speranza.aioe.org>... > On 3/20/2014 12:22 PM, Vitor Andrade wrote: > > I'm new programmer, so I need to help of you. > > > > I have two matrices, wherein I would like to subtract one from the other: > > > > Comprimento = pe2(:,2)  pe1(:,2); > > But, my arrays are sizes different, one the size 11x2 and other the size > > 12x2. However, I would like to delete the row where my error occurs and > > continue my calculations. > > > > I hope I have to been clearer. > > A) Enclose the errorthrowing code in a try...catch block > > B) Use "defensive programming" and test for the size mismatch and either > don't execute the knowntofail code or fixup the size mismatch so it > doesn't fail. > >  I don't understand you. I would like to delete the row that is left over. Is there anyway? I want to implement this on my code.

