How can I rotate a SC structure along x, y and z axis?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
xcord=[0 1 0 0 1 1 0 1];
ycord=[0 0 1 0 1 0 1 1];
zcord=[0 0 0 1 0 1 1 1];
scatter3(xcord(:), ycord(:), zcord(:),500,'fill','b')
axis([0 1 0 1 0 1])
hold on
Hey everyone,
I have written a small code plotting a Simple Cubic crystal structure. However, for my project, I need to analyze these structures' symmetries. So, I need to write a code to rotate the above plot along for example X axis for 90 degrees, 180 degrees, Y axis for 270 degrees and so on. I tried taking an input and using if else to plot the function according to the input. I needed to manually change the x, y and z coordinates for every if condition.
Is there any way I can do it shorter and a more logical way?
Thanks
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Coordinate Systems 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!