From: Angela on
I've been writing it outside the function for debugging purposes, and once I had it working sufficiently and the way I wanted it, I put it into the function and it suddenly has problems. The problem is that when there are cross or dot products in the code it tells me the vectors aren't the same size, although they are and even when I do the cross or dot manually in the command window it produces an answer. Do you have any suggestions?

thank you!
From: John D'Errico on
"Angela " <apuente11(a)verizon.net> wrote in message <hrt3pr$jq0$1(a)fred.mathworks.com>...
> I've been writing it outside the function for debugging purposes, and once I had it working sufficiently and the way I wanted it, I put it into the function and it suddenly has problems. The problem is that when there are cross or dot products in the code it tells me the vectors aren't the same size, although they are and even when I do the cross or dot manually in the command window it produces an answer. Do you have any suggestions?
>
> thank you!

Well apparently you have made a mistake. The
debugger will resolve your problem.0

help dbstop
dbstop if error

John
From: Walter Roberson on
Angela wrote:
> I've been writing it outside the function for debugging purposes, and
> once I had it working sufficiently and the way I wanted it, I put it
> into the function and it suddenly has problems. The problem is that
> when there are cross or dot products in the code it tells me the vectors
> aren't the same size, although they are and even when I do the cross or
> dot manually in the command window it produces an answer. Do you have
> any suggestions?

Such things can happen if you accidentally name a variable the same
thing as an existing matlab function.