from
Plot Stock Prices
by Malcolm Wood
Retrieves and plots historical stock prices
|
| chart_example.m |
% Copyright 2006-2010 The MathWorks, Inc.
%% Create a new figure. It will have 4 sets of axes, laid out 2*2
figure('Name','DataFeed Toolbox Example','visible','off');
%% Select the first set of axes and plot the Microsoft share price over the past month
subplot(2,2,1);
plot_prices('MSFT');
%% Select the second set of axes and plot the Microsoft share price over the past year
subplot(2,2,2);
plot_prices('MSFT',365);
%% Select the third set of axes and plot the Google share price over the past month
subplot(2,2,3);
plot_prices('GOOG');
%% Select the final set of axes and plot the Google share price over the past year
subplot(2,2,4);
plot_prices('GOOG',365);
%% Show the results
set(gcf,'Visible','on');
|
|
Contact us at files@mathworks.com