help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2D matrixes into a 3D matrix


From: antonio palestrini
Subject: Re: 2D matrixes into a 3D matrix
Date: Tue, 30 Jan 2007 11:18:18 +0100

2007/1/30, Francesco Potorti` <address@hidden>:
>then cut the non-filled part with the "excise" function applied to the
>vectorized matrix A.

What is excise?  I cannot find it.

Here it is Francesco,
is a function removing rows with NaNs or
the missing code you specify.
ciao
antonio

#       EXCISE Remove rows with missing values.
#       EXCISE(X) removes rows of X containing any NaNs.
#       EXCISE(X,CODE) uses the value CODE instead of NaN.
#       GKS  3 May 92, 4 June 93.
function x=excise(x,miss_code);
 if nargin==1,
    miss=isnan(x);
 else
    miss=(x==miss_code);
 end;

 [m n]=size(x);
 if n==1,
    x(miss) = [];
 else
    x(any(miss'),:) = [];
 end;
endfunction



--
Prof. Antonio Palestrini
DSGSS - University of Teramo, Italy
e-mail: address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]