Scilab Function
Last update : 13/3/2006

c_AVRG - Function to make a selective columnwise average (excluding missing data)

Calling Sequence

MOY = c_AVRG(MissCode,DATA)

Parameters

Description

WARNING : This function is written in C language and interfaced with SCILAB (HYDROGR.dll).

This function has been designed to realise average over different rainfall stations and produce a catchment rainfall

For each line of DATA, the missing data are excluded and the average is performed on the remaining data.

If no data is available, MissCode is returned

Examples

   P1 = [rand(10,1); -9.99 * ones(5,1) ; rand(5,1)];
   P2 = [rand(6,1); -9.99 * ones(13,1) ; rand(1,1)];   
   Pm = c_AVRG(-9.99,[P1 P2]);
  

Authors

Julien Lerat CEMAGREF Antony, HBAN Unit, julien.lerat@cemagref.fr