% This is material illustrating the methods from the book
% Financial Modelling  - Theory, Implementation and Practice with Matlab
% source
% Wiley Finance Series
% ISBN 978-0-470-74489-5
%
% Date: 02.05.2012
%
% Authors:  Joerg Kienitz
%           Daniel Wetterau
%
% Please send comments, suggestions, bugs, code etc. to
% kienitzwetterau_FinModelling@gmx.de
%
% (C) Joerg Kienitz, Daniel Wetterau
% 
% Since this piece of code is distributed via the mathworks file-exchange
% it is covered by the BSD license 
%
% This code is being provided solely for information and general 
% illustrative purposes. The authors will not be responsible for the 
% consequences of reliance upon using the code or for numbers produced 
% from using the code. 



function PlotIt(X1, YMatrix1)
%CREATEFIGURE(X1,YMATRIX1)
%  X1:  vector of x data
%  YMATRIX1:  matrix of y data

%  Auto-generated by MATLAB on 22-May-2012 09:40:50

% Create figure
figure1 = figure('PaperSize',[20.98 29.68],'Color',[1 1 1]);

% Create axes
axes1 = axes('Parent',figure1);
hold('all');

% Create multiple lines using matrix input to plot
plot1 = plot(X1,YMatrix1,'Parent',axes1,'Color',[0 0 0]);
set(plot1(1),'MarkerSize',2,'Marker','*','DisplayName','N=4');
set(plot1(2),'MarkerSize',3,'Marker','x','DisplayName','N=5');
set(plot1(3),'LineStyle','-.','DisplayName','N=6');
set(plot1(4),'LineStyle',':','DisplayName','N=7');
set(plot1(5),'LineStyle','--','DisplayName','N=8');
set(plot1(6),'Marker','.','DisplayName','N=9');
set(plot1(7),'Marker','o');

% Create xlabel
xlabel('Strike');

% Create ylabel
ylabel('Price');

% Create title
title('\Gamma Bermuda Option COS');

% Create legend
legend(axes1,'show');

