This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ic=1:4, | |
% construct Cluster label: C1,C2... | |
Clab =['C' num2str(ic)]; | |
% obtain time table of WBD data | |
TTWBD=caa_download(['listdata:' Clab '_CE_WBD_WAVEFORM_CDF']); | |
% obtain time table of EFW internal burst data | |
TTIB =caa_download( ['listdata:' Clab '_CP_EFW_L1_IB']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% generate random time series | |
t=irf_time(now,'datenum2epoch')+[1:10]; t=t(:); | |
frGSE = [t rand(numel(t),1)-0.5 rand(numel(t),1)-0.5 rand(numel(t),1)-0.5]; | |
% example of conversion to GSM | |
frGSM = irf_gse2gsm(frGSE); | |
% example of conversion to GEO using irf routine | |
frGEO = irf.geocentric_coordinate_transformation(frGSE,'GSE>GEO'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%% To run batch file with matlab commands. | |
% Execute from terminal: | |
cat batch_file.m | matlab -nodisplay -logfile log.txt | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%% To run batch file that includes plotting. | |
% 1) create framebuffer X server executing from terminal: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Number of magnetic nulls in random fields applying conditions in paper | |
N = 100000; | |
iReal = 0; | |
iNull = 0; | |
for i=1:N | |
M = rand(3)-0.5; | |
traceM = M(1,1)+M(2,2)+M(3,3); | |
maxM = max(abs(M(:))); | |
E = eig(M); | |
maxRealE = max(abs(real(E))); |