-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvisualize_test.m
More file actions
56 lines (47 loc) · 1.53 KB
/
Copy pathvisualize_test.m
File metadata and controls
56 lines (47 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
function animate_M(folder_name)
dynamics = load([folder_name, '/dynamics1.dat']);
tindex = dynamics(:,1);
time = dynamics(:,2);
dt = dynamics(:,3);
E = dynamics(:,4);
Mx = dynamics(:,5);
My = dynamics(:,6);
Mz = dynamics(:,7);
M = dynamics(:,8);
torque = dynamics(:,9);
clear dynamics
fig = figure; set(fig, 'name', folder_name);
set(gcf, 'OuterPosition', [0 0 1280 800]);
%set(gcf, 'OuterPosition', [0 0 300 200]);
subplot(221);
plot(time, E, '-');
%axis tight;
%grid on;
xlabel('time'); title('Energy (eV)');
print(gcf, ['dynamics_E'], '-depsc');
subplot(221);
plot(time, Mx, time, My, time, Mz, time, M);
%axis tight;
ylim([-1 1]);
%grid on;
legend('Mx', 'My', 'Mz', 'M');
xlabel('time'); title('Magnetization (A/m)');
print(gcf, ['dynamics_Mavg'], '-depsc');
subplot(221);
%plot(time, torque, '-');
semilogy(time, torque, '-');
%axis tight;
%grid on;
xlabel('time'); title('Normalized maximum Torque (M\timesH/M_s^2)'); axis tight
print(gcf, ['dynamics_torque'], '-depsc');
subplot(221);
%plot(time, dt, '-');
semilogy(time, dt, '-');
%axis tight;
%grid on;
xlabel('time'); title('Time step (\Deltat)'); axis tight
print(gcf, ['dynamics_dt'], '-depsc');
%print(gcf, ['dynamics'], '-depsc');
%print(gcf, ['dynamics'], '-dpdf');
%keyboard
end % function