How does null function works?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi guys,
I'm doing a project in which I have to find the circle that describes the intersection of 2 spheres. I found in the internet a cool matlab algorithm that works really well but I don't understand how it works.
Let C1 = [x1,y1,z1] and C2 = [x2,y2,z2] be two row vectors defining the spheres' centers and r1 and r2 their respective radii.
C21 = C2-C1;
d2 = dot(C21,C21);
C0 = (C1+C2)/2+(r1^2-r2^2)/(2*d2)*C21;
R = sqrt(((r1+r2)^2-d2)*(d2-(r2-r1)^2)/(4*d2));
N = null(C21).';
T = linspace(0,2*pi).';
V = bsxfun(@plus,C0,R*[cos(T),sin(T)]*N);
In particular, I would like to understand how does the null function works.
I understand what is the result if I use the function as null(matrix,'r') but if I use null(matrix) I don't understand what it does.
I hope I have explained myself well. Thanks for your help ;)
Ana
0 Kommentare
Akzeptierte Antwort
Matt J
am 15 Aug. 2013
Bearbeitet: Matt J
am 15 Aug. 2013
I understand what is the result if I use the function as null(matrix,'r') but if I use null(matrix) I don't understand what it does.
The difference between null(matrix,'r') and null(matrix) is that the latter produces an orthonormal basis for the null space, whereas you may not get orthonormality from null(matrix,'r').
2 Kommentare
Matt J
am 15 Aug. 2013
There are some steps. You can view the contents of null.m by doing
>>type null
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra 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!