-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcrys.m
More file actions
22 lines (20 loc) · 877 Bytes
/
crys.m
File metadata and controls
22 lines (20 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clear;clc;
A = load('A.out');
% Axial vectors
a1 = A(1,:);
a2 = A(2,:);
a3 = A(3,:);
vol = sqrt(3)*0.5*a1(1)*a1(1)*a3(3)
%cBya = a3(3) / a1(1)
alpha = (180/pi())*acos(getDotproduct(a1,a2)/(sqrt(getDotproduct(a1, ...
a1))*sqrt(getDotproduct(a2,a2))));
beta = (180/pi())*acos(getDotproduct(a2,a3)/(sqrt(getDotproduct(a3, ...
a3))*sqrt(getDotproduct(a2,a2))));
gamma = (180/pi())*acos(getDotproduct(a1,a3)/(sqrt(getDotproduct(a3, ...
a3))*sqrt(getDotproduct(a1,a1))));
mag_a1 = sqrt(getDotproduct(a1,a1));
mag_a2 = sqrt(getDotproduct(a2,a2));
mag_a3 = sqrt(getDotproduct(a3,a3));
%cBya = mag_a3 / mag_a1
M = [mag_a1,mag_a2,mag_a3;alpha,beta,gamma]
cBYa = (0.5*mag_a3) / (0.25*mag_a1)