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

Change language to:
English - Français - 日本語 - Русский

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

Ajuda do Scilab >> Funções de Compatibilidade > firstnonsingleton

firstnonsingleton

Finds first dimension which is not 1

Syntax

[dim]=firstnonsingleton(A[,opt])

Arguments

dim

first dimension of A which is not 1

A

a variable of any Scilab data type

opt

a character string giving the type of output we want

"num"

returned value is a numerical value

"str"

returned value is a character string if possible ("r" instead of 1 and "c" instead of 2)

Description

This function is used by mfile2sci to emulate Matlab behavior under Scilab, particularly for functions which treat the values along the first non-singleton dimension of A in Matlab while in Scilab they treat all values of A.

Examples

A = [1 2 3;4 5 6];
// Scilab max
M = max(A)
// Matlab max emulation
M = max(A,firstnonsingleton(A))
Report an issue
<< Funções de Compatibilidade Funções de Compatibilidade mstr2sci >>

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:
Tue Feb 14 15:09:57 CET 2017