Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Português


nanmedian

median of the values of a numerical vector or matrix

Syntax

m = nanmedian(x)
m = nanmedian(x, orientation)

Arguments

x

real or complex vector or matrix

orientation

index of the dimension along which the nanmedian is computed. It can be either

  • a character "*" (default), "r" or "c"
  • a positive integer: 1 or 2. 1 is equivalent to "r" and 2 is equivalent to "c".
m

real or complex scalar or vector

Description

For a vector or a matrix x, m = nanmedian(x) or m = nanmedian(x, "*") returns in the vector m the median of the values (ignoring the NANs) of vector x.

m = nanmedian(x,'r') (or, equivalently, m = nanmedian(x,1)) are the rowwise medians. It returns in each position of the row vector m the medians of data (ignoring the NANs) in the corresponding column of x.

m = nanmedian(x,'c') (or, equivalently, m = nanmedian(x,2)) are the columnwise medians. It returns in each position of the column vector m the medians of data (ignoring the NANs) in the corresponding row of x.

In Labostat, NAN values stand for missing values in tables.

Examples

x=[0.2113249 %nan 0.6653811;0.7560439 0.3303271 0.6283918]
m=nanmedian(x)
m=nanmedian(x,1)
m=nanmedian(x,2)

Bibliography

Wonacott, T.H. & Wonacott, R.J.; Introductory Statistics, fifth edition, J.Wiley & Sons, 1990.

Report an issue
<< nanmeanf Data with Missing Values nanreglin >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:16:52 CEST 2024