From: Peter Smith on 11 Aug 2010 04:12 Hi all i am having a problem linking together matrices. Basically i have three matrices of the same dimentions 400*93 one matrix contains data on spreads - if the spreads are negative the element reads NaN. However i want to basically tell matlab, if the matrix element = NaN, i want the same element in the ask matrix and the bid matrix to also read NaN and therefore overwrite the data that is in that particular element of the ask or bid matrix Can anyone suggest any help?
From: Pekka Kumpulainen on 11 Aug 2010 04:32 "Peter Smith" <fe09ae(a)mail.wbs.ac.uk> wrote in message <i3tm0l$6ur$1(a)fred.mathworks.com>... > Hi all > > i am having a problem linking together matrices. > Basically i have three matrices of the same dimentions 400*93 > > one matrix contains data on spreads - if the spreads are negative the element reads NaN. > > However i want to basically tell matlab, if the matrix element = NaN, i want the same element in the ask matrix and the bid matrix to also read NaN and therefore overwrite the data that is in that particular element of the ask or bid matrix > > Can anyone suggest any help? First, read "Matrices and arrays" in the Getting Started section of documentation. Then doc isnan. Then you can do something like this inds = isnan(spreadmatrix); ask(inds) = nan; bid(inds) = nan;
From: Peter Smith on 11 Aug 2010 05:05 thanks, you are the man
|
Pages: 1 Prev: enforce correct entry - callback method Next: Moncler jackets |