how I can automatically save the output of a for loop?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I created a loop that performs operations on a series of 2D matrices, each cycle I want to save the output matrix, so I need a way to automatically save these matrices creating an automatic generation of file names
3 Commenti
Risposte (1)
Star Strider
il 8 Mar 2015
Modificato: Star Strider
il 8 Mar 2015
If you’re creating a series of 2D matrices, I would concatenate them into a single resultant 3D matrix (use something like: Savemat=cat(3, Savemat, Mat); then save the updated ‘Savemat’ in the same .mat file at each iteration, or preferably after the loop.
That way, you have all your 2D matrices in one 3D matrix that you can load from one file and easily address in your code.
6 Commenti
Star Strider
il 8 Mar 2015
This seems quite distant from your original Question here.
Create a new Question that describes in some detail what you really want to do, expanding on your last Comment. It seems like a much more complicated project than I want to deal with.
Write the code to implement it yourself. If you have problems with your code, post the relevant parts of it along with a description of what you want your code to do and what it is doing, including the entire red text of any error messages that your code throws.
We will then help you get it to run.
I will delete my Answer — including this Comment — in a few hours, since it does not address your actual problem.
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements 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!