How can I rotate a SC structure along x, y and z axis?

1 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Vector Fields 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by