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 error-throwing code in a try...catch block
B) Use "defensive programming" and test for the size mismatch and either don't execute the known-to-fail code or fixup the size mismatch so it doesn't fail.