Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Linear Algebra > Matrix Analysis > cond

cond

condition number

Calling Sequence

c = cond(X)
c = cond(X, p)

Arguments

X

real or complex matrix. If c = cond(X, p), X must be real or complex square matrix.

p

scalar or string (type of norm) (default value = 2).

c

real scalar, the condition number.

Description

c = cond(X)

returns condition number in 2-norm.cond(X) is the ratio of the largest singular value of X to the smallest.

c = cond(X, p)

returns condition number in p-norm : norm(X, p) * norm(inv(X), p). If p is specified, p can be equal to :

  • p = 1. cond(X, p) returns condition number in 1-norm.

  • p = 2. cond(X, p) returns condition number in 2-norm.

  • p = %inf or 'inf'. cond(X, p) returns condition number in infinity norm.

  • p = 'fro'. cond(X, p) returns condition number in Frobenius norm.

Examples

A=testmatrix('hilb',6);
// condition number in 2-norm
cond(A)
cond(A, 2)

// condition number in 1-norm
cond(A, 1)

// condition number in infinity norm
cond(A, %inf)

// condition number in Frobenius norm
cond(A, 'fro')

See Also

  • rcond — inverse condition number
  • svd — singular value decomposition
  • norm — норма матрицы

History

ВерсияОписание
5.4.0

Calling cond(X), where X is non square matrix, is now managed. For example:

X = [1 0; 1 -1; 0 1];
cond(X)

Calling cond(X, p) allows to calculate p-norm condition number. For example:

X = [1 -6 0; 1 0 -4;1 0 2];
cond(X, 1) // condition number in 1-norm (p = 1)
Report an issue
<< Matrix Analysis Matrix Analysis det >>

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:
Fri Apr 11 14:19:37 CEST 2014