25.07.2013 Views

Ph.D. Thesis - Physics

Ph.D. Thesis - Physics

Ph.D. Thesis - Physics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This is the script that calls the above function, used for studying the effective J value<br />

as a function of the gradient in the state-dependent force.<br />

% ising_small_rs_script.m<br />

% Rob Clark<br />

% 27 March 2009<br />

clear;<br />

close all;<br />

J = 1e3;<br />

B = -J;<br />

A = 0.1;<br />

grads = linspace(0,1,10); % Gradient is relative to A.<br />

for ii = 1:length(grads)<br />

% Calculate average J for a given grad<br />

Jav = J;<br />

[Jm(ii),bigerrs(ii)] = ising_small_rs_fn(J,Jav,A,grads(ii));<br />

% Calculate error with new average J<br />

[Jcr,smallerrs(ii)] = ising_small_rs_fn(J,Jm(ii),A,grads(ii));<br />

end<br />

figure(101);<br />

plot(grads,Jm,’ro’);<br />

xlabel(’Force gradient’);<br />

ylabel(’J_{av}’);<br />

figure(102);<br />

plot(grads,bigerrs,’ro’);<br />

xlabel(’Force gradient’);<br />

ylabel(’Uncorrected error’);<br />

figure(103);<br />

plot(grads,smallerrs,’ro’);<br />

xlabel(’Force gradient’);<br />

ylabel(’Corrected error’);<br />

234

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!