Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - 日本語 - Русский
Ajuda do Scilab >> Dicas de Conversão de Matlab para Scilab > Matlab-Scilab equivalents > R > randperm (Matlab function)

# randperm (Matlab function)

Uniformly distributed random numbers and arrays

### Matlab/Scilab equivalent

 Matlab Scilab `randperm(n) ; randperm(n ,k)` `grand(1, "prm", (1:n)')' ; v = grand(1, "prm", (1:n)')', v(1:k)`

### Description

Matlab's randperm(n) is equivalent to grand(1, "prm", (1:n)')' in Scilab.

randperm(n, k) corresponds to the k first elements of the above command, so the equivalent is stored in v(1:k), if v = grand(1, "prm", (1:n)')'.

### Comments

Add a comment:
Please login to comment this page.

 Report an issue << randn (Matlab function) R rcond (Matlab function) >>

 Scilab EnterprisesCopyright (c) 2011-2017 (Scilab Enterprises)Copyright (c) 1989-2012 (INRIA)Copyright (c) 1989-2007 (ENPC)with contributors Last updated:Thu Feb 14 15:01:10 CET 2019
{"ft_lang_label":"__label__en","ft_lang_prob":0.5630131,"math_prob":0.5063459,"size":982,"snap":"2019-35-2019-39","text_gpt3_token_len":297,"char_repetition_ratio":0.30163598,"word_repetition_ratio":0.040816326,"special_character_ratio":0.26374745,"punctuation_ratio":0.10909091,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99068457,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-22T23:23:56Z\",\"WARC-Record-ID\":\"<urn:uuid:c0cc78be-3863-4a38-af83-44b8852b57e2>\",\"Content-Length\":\"23431\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:640e1e1b-4882-496f-8274-6b32d0808a5a>\",\"WARC-Concurrent-To\":\"<urn:uuid:79bc75de-c472-4473-ba22-44ce83ac5b1d>\",\"WARC-IP-Address\":\"176.9.3.186\",\"WARC-Target-URI\":\"https://help.scilab.org/docs/6.0.2/pt_BR/m2sci_randperm.html\",\"WARC-Payload-Digest\":\"sha1:IE2Y5V3DMFP4ABPC4PHWWIYEGWEOC25N\",\"WARC-Block-Digest\":\"sha1:2WCQC3PWPUFPM65BUVPZ6NK35AVWQS7M\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027317516.88_warc_CC-MAIN-20190822215308-20190823001308-00454.warc.gz\"}"}