Read different matrix into a loop
10 views (last 30 days)
Show older comments
Iago Martinez Alonso on 17 May 2021
Answered: Tarunbir Gambhir on 24 May 2021
This is my first post and I hope that I am posting properly.
I have some temporal yearly data into .txt files for each year and in order to read it i made the following code:
I've sorted all data by months and now I have twelve matrix called "monthData1","monthData2"...
Now, I want to do a loop similar in order to read those 12 matrix and make further calculations whithin a loop with the monthData%d option, but for 2D matrix array the sprintf funtcion does not work.
This is what I would like to do:
is there any function that makes that or I have to pass all the matrix to .txt files?
Tarunbir Gambhir on 24 May 2021
You can concat all the monthData matrices into a single matrix called monthData. Then you can use the following
Is this what you are trying to acheive?
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!