How do I move the center of my cyclinder to a specific point?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Victor Falola
am 27 Okt. 2022
Beantwortet: Torsten
am 27 Okt. 2022
Hi, I plotted a cylinder using this code:
r = 5e-7;
[X,Y,Z] = cylinder(r);
h = 20e-7;
Z = Z*h;
cyl = surf(X,Y,Z,'FaceColor','none');
rotate(cyl, [0 1 0], 90)
how do i move the cyclinder so its center becomes [0 0 0]?
Thanks.
0 Kommentare
Akzeptierte Antwort
Torsten
am 27 Okt. 2022
r = 5e-7;
[X,Y,Z] = cylinder(r);
h = 20e-7;
Z = Z*h - 2*r;
cyl = surf(X,Y,Z,'FaceColor','none');
rotate(cyl, [0 1 0], 90)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Scatter Plots 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!