Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.3 - Français

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

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

Aide Scilab >> Fonctions de compatibilité > mtlb_randn

mtlb_randn

Fonction d'émulation de la fonction Matlab randn

Description

Dans plusieurs cas particuliers, la fonction Matlab randn et la fonction Scilab rand(...,"normal") se comportent différemment :

  • Avec une entrée qui est un scalaire : La fonction Matlab randn retourne une matrice n x n alors que la fonction Scilab rand(...,"normal") retourne un scalaire.

La fonction mtlb_randn(A) est utilisée par mfile2sci pour remplacer randn(A) quand il n'était pas possible de savoir ce qu'étaient les opérandes pendant la conversion d'un code Matlab vers Scilab. Cette fonction va déterminer la sémantique correcte pendant l'exécution. Pour obtenir un code plus performant on peut remplacer les appels à mtlb_randn :

  • Si A est un scalaire mtlb_randn(A) peut être remplacé par rand(A,A,"normal")

  • Si A n'est pas un scalaire mtlb_randn(A) peut être remplacé par rand(A,"normal")

Attention : mtlb_randn ne doit pas être utilisée pour une programmation manuelle.

Auteurs

  • V.C.
<< mtlb_rand Fonctions de compatibilité mtlb_rcond >>

Copyright (c) 2022-2023 (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 Oct 05 12:11:04 CEST 2011