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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Vector Fields 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!