Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.2 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Matlab to Scilab Conversion Tips > Matlab-Scilab equivalents > M > min (Matlab function)

min (Matlab function)

Minimum

Matlab/Scilab equivalent

Matlab Scilab

Particular cases

Matlab min function can work with complexes, what Scilab min can not, so a emulation function called mtlb_min has been written.

Note that in Scilab, second input parameter can give the dimension to use to find the minimum values or another matrix (minimum of two matrices), in Matlab, dimension parameter is given in a third input parameter (in this case, second parameter must be []).

C=min(A)

If A is a matrix, min(A) is equivalent to min(A,[],1) in Matlab whereas in Scilab min(A) gives the minimum value found in A. Matlab min treats the values along the first non-singleton dimension.

Examples

Matlab Scilab
A = [1,2,3;4,5,6]
C = min(A)
C = [1,2,3]
C = min(A,[],1)
C = [1,2,3]
B = [7,8,9;2,3,4]
C = min(A,B)
C = [1,2,3;2,3,4]
A = [1,2,3;4,5,6]
C = min(A)
C = 1
C = min(A,"r")
C = [1,2,3]
B = [7,8,9;2,3,4]
C = min(A,B)
C = [1,2,3;2,3,4]
Report an issue
<< max (Matlab function) M mkdir (Matlab function) >>

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:
Wed Apr 01 10:25:14 CEST 2015