Error using dot(A,B) - size/dimension problem
24 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello.
I get the error "Error using dot (line 15) A and B must be same size." (Which is dot(A,B) ) I have tried numbers of time now, and I still don't know what I am doing wrong here.
I have the normal vector. 'n' and a point 'x' in the plane and the output is 's' in my formula.
I have attempted to get same dimension with size, but it appears not to been working so well.
...
n = vector
x = point in a plane
size(x,dim)
size(n,dim)
s=x+2*(d-dot(x,n))*n;
...
Regards
Cillian
0 Kommentare
Antworten (2)
Daniel Shub
am 4 Mai 2012
The error seems pretty clear to me your n and x are different sizes.
8 Kommentare
Jan
am 4 Mai 2012
While the multiplication between "a" and "b" works now, I guess that "b" and "n" have different sizes and the matrix multiplication fails.
However, Cillian, it is time to stop the confused guessing. Please post the complete relevant part of the code and explain what you want to compute. It seems like there is a problem in the mathematical part already.
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!