Prev: Determine eccentric points on a rotated ellipse?
Next: How to use matlab in terminal in ubuntu?
From: Matt Fig on 11 Apr 2010 01:22 "Matt Fig" <spamanon(a)yahoo.com> wrote in message > This may be even faster on some systems: > > idx = [ones(1,NSims);(StockPrice>H);inf(1,NSims)]; > idx = strfind(idx(:).',[1 zeros(1,D)]); > ParisPayoffs4 = max(StockPrice(Length+1,:)-K,0); > ParisPayoffs4(ceil(idx/(Length+3))) = 0; I don't know why I thought I needed to pad with an INF. This is faster without that padding, and changing the index in the last line to (Length + 2) instead of (Length + 3). Sorry for the confusion.
First
|
Prev
|
Pages: 1 2 3 Prev: Determine eccentric points on a rotated ellipse? Next: How to use matlab in terminal in ubuntu? |