Man Scilab

mtlb_norm
M2SCI function

mtlb_norm - Matlab norm emulation function

Description

Matlab and Scilab norm behave differently in some particular cases:

  • For the -%inf norm: Matlab norm can process the -%inf norm of a matrix but not Scilab norm .
  • The function mtlb_norm(A,p) is used by mfile2sci to replace norm(A,p) when it was not possible to know what were the inputs while porting Matlab code to Scilab. This function will determine the correct semantic at run time. If you want to have a more efficient code it is possible to replace mtlb_norm calls:

  • If A is a vector or a scalar and whatever p is mtlb_norm(A,p) may be replaced by norm(A,p)
  • If p is not equal to -%inf and whatever A is mtlb_norm(A,p) may be replaced by norm(A,p)
  • If p is equal to -%inf and A is a matrix mtlb_norm(A,p) may be replaced by max(sum(abs(A'),1))
  • Caution: mtlb_norm has not to be used for hand coded functions.

    Authors

    V.C.

    Back