Home > utility > goPlotReturn.m

goPlotReturn

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 clear all
0002 r=linspace(eps, 8)'/100;
0003 n=20;
0004 curves=[];
0005 for i=1:n
0006     curve=(1+r/12).^(12*i);
0007     curves=[curves, curve];
0008 end
0009 subplot(1,2,1)
0010 plot(r*100, curves);
0011 grid on
0012 xlabel('年利率(%)');
0013 ylabel('倍數');
0014 for i=1:n
0015     text(r(end)*100, curves(end, i), int2str(i));
0016 end
0017 
0018 subplot(1,2,2);
0019 year=log(2)./(12*log(1+r/12));
0020 plot(r*100, 100*r.*year);
0021 xlabel('年利率(%)');
0022 ylabel('年利率*(本利和變兩倍所需的年數)');

Generated on Tue 01-Jun-2010 09:50:34 by m2html © 2003