

% Example 1.1 ( Sunspot data )

load sunspots1.txt;  %import sunspot dataset file sunspots1.txt

plot(sunspots1,'.-'); % plot a figure for sunspot data

title('Number of Sunspots'); % add a title for the figure

xlabel('time'); % add a label for x-axis 


% Example 1.2 ( Canadian lynx data )

figure  % produce a new figure

load lynx.dat; % import lynx dataset from the file lynx.dat

Log10_lynx=log10(lynx); % make log transformation for lynx dataset 

plot(Log10_lynx,'.-'); % plot figure 

title('Number of trapped lynx'); % add a title for the figure


% Example 1.3 ( Interest rate data )

figure % produce a new figure

load tbill03m.dat % import three-month Treasury bill dataset 
 
load tbill06m.dat % import six-month Treasury bill dataset

load tbill12m.dat % import twelve-month Treasury bill dataset

subplot(3,1,1) % decompose one figure to 3 sub-figures and active the first sub-figure 

plot(tbill03m(:,2)) % plot the figure for three-month Treasury bill

title('Yields of 3-month Treasury bills'); %add a title for the figure

subplot(3,1,2); % active second sub-figure 

plot(tbill06m(:,2)); % plot the figure for three-month Treasury bill

title('Yields of 6-month Treasury bills'); %add a title for the figure

subplot(3,1,3); % active third sub-figure

plot(tbill12m(:,2)); % plot the figure for three-month Treasury bill

title('Yields of 12-month Treasury bills'); % add a title for the figure



% Example 1.4 ( The Standard and Poor's 500 index )

figure

load SP500.mat % import The Standard and Poor's 500 Index dataset
 
plot(log(data(7088:-1:1,4))) % make log transformation and plot figure

title('The Standard and Poor 500 Index');  % Added title 



