I want to use the same function over and over again and store its outputs into an array or a matrix.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Maximilian Groß
il 12 Nov 2021
Risposto: Cris LaPierre
il 12 Nov 2021
Hey all,
I have just started programming so please excuse incorrect terminology etc..
I want to use the same function over and over again and store its outputs into an Array or a Matrix.
I know about the concept of loops but I myself can not find a way to use one here.
To get a bit more specific I have created a function that outputs doubles.
Now I want to run this same function over and over again and have each individual output stored in a big array or matrix.
0 Commenti
Risposta accettata
Cris LaPierre
il 12 Nov 2021
See Ch 12 of MATLAB Onramp. It covers for loops, which are used to run the same code over and over. As part of that, it will teach you how to capture the result of each loop in an array.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!