Calculate radial displacement from X,Y,Z displacements of a cylinder node
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ash Ahamed
el 12 de Feb. de 2020
Comentada: darova
el 13 de Feb. de 2020
Hello,
How do I calculate the radial displacement of a node on a cylinder from it's XYZ displacement. Center coordinate system sometimes is at center of the cylinder sometimes it's not. because I have more than one cylinder. I tried trignometry and the values does not make any sense. Below is the code I used. M\aybe what I need to calculate is the distance shown using the yellow line.
I have attached a sketch for reference. What am I missing here?
r=sqrt(bsxfun(@plus, bsxfun(@plus,x.^2,y.^2),z.^2 ));
5 comentarios
Respuesta aceptada
darova
el 12 de Feb. de 2020
THe solution
x1 = x + x_;
y1 = y + y_;
dr = sqrt(x1.^2+y1.^2) - r;
2 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!