Azzera filtri
Azzera filtri

Looping to create multiple variables?

38 visualizzazioni (ultimi 30 giorni)
Amos Tan
Amos Tan il 13 Ott 2017
Commentato: Amos Tan il 14 Ott 2017
I would like to run the following code 50 times, each time saving the output into a new variable (eg. s1, s2, s3,...,s50)
s = [reshape(randperm(32),[],1),randi(8,32,1)];
How would I do that?
Thank you! (sorry if this is a very trivial question, I'm new)
  2 Commenti
Adam
Adam il 13 Ott 2017
You should never want 50 variables in your workspace when 1 would do!
Amos Tan
Amos Tan il 14 Ott 2017
thank you for the advice! (:

Accedi per commentare.

Risposta accettata

KL
KL il 13 Ott 2017
Modificato: KL il 13 Ott 2017

Più risposte (1)

Image Analyst
Image Analyst il 13 Ott 2017

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by