Code covered by the BSD License
-
blsvis(varargin)
BLSVIS M-file for blsvis.fig
-
dfdb_port_opt(varargin)
DF_PORT_OPT Datafeed Portfolio Optimizer - Graphical User Interface.
-
PortVaRmc(nsim)
portfolio VaR using Monte Carlo
-
blsimpv(so,x,r,t,call,maxiter...
BLSIMPV Black-Scholes implied volatility.
-
bondprice2spread(varargin)
BONDPRICE2SPREAD: Static Spread to a reference spot curve.
-
excelget(FileName, SheetNo, R...
EXCELGET Load Excel data into MATLAB.
-
excelget(FileName, SheetNo, R...
EXCELGET Load Excel data into MATLAB.
-
excelget(FileName, SheetNo, R...
EXCELGET Load Excel data into MATLAB.
-
garchFXdemo
GARCH(1,1) Foreign Exchange (FX) Simulation/Estimation Demo.
-
montecarlo(iVal,mRet,volat,t,...
MONTECARLO Monte-Carlo Simulation.
-
multimc(hVal,t,nSim)
-
oprice
-
oprice
-
optrisk
Delta-gamma VaR estimation on Portfolio Data
-
termfit(...
TERMFIT Fitted smoothed zero curve from coupon bond prices.
-
zbtprice(Bonds, Prices, Settl...
ZBTPRICE An updated Zero Curve Bootstrapping from Coupon Bond Data Given Price.
-
PortVaRreturns.m
-
ProcessInst.m
-
ProcessInstBDT.m
-
spotcurvefit.m
-
DataFeed/Database Portfolio O...
-
View all files
from
Financial Seminar Demos
by Michael Weidman
Demos commonly used at The MathWorks financial modeling seminars.
|
| excelget(FileName, SheetNo, Range)
|
function Data = excelget(FileName, SheetNo, Range)
% EXCELGET Load Excel data into MATLAB.
% DATA = EXCELGET(FileName, SheetNo, Range) returns cell array DATA with
% values from the selected range in Excel file.
% FileName - string with file name and full path,
% for example 'c:\office\book1.xls'
% SheetNo - sheet number where the data is located
% Range - string with range selection, for example 'A1:B4'
%
% See also: EXCELPUT
% Author(s): Taras Chaban 8-Jan-99
% Copyright (c) 1995-99 by The MathWorks Ltd.
% start Excel application
ExHandle = actxserver('Excel.Application');
% make it visible
ExHandle.Visible = 0;
% open data file
invoke(ExHandle.Workbooks, 'Open', FileName);
% get collection of sheets
SheetCollect = ExHandle.ActiveWorkBook.Sheets;
% retrieve one sheet from the collection
SheetObj = get(SheetCollect, 'Item', SheetNo);
% select range of cells in Excel
RngHandle = get(SheetObj, 'Range', Range);
% get the values from the selected range
Data = RngHandle.Value;
invoke(ExHandle, 'quit');
delete(ExHandle);
return
|
|
Contact us at files@mathworks.com