How to create a table of 3 variables ?
Show older comments
I have a matrix Thm = [hours,days,months], where hours is [1x24], days is [1x31] and months [1x12]. I would like to create a table of hours and days [hours, days] for each month. I was wondering if i could substitute a vector of months 1:12 to a vector of a string {'Jan','Feb',...}...Could anyone help me with this, please ?
Accepted Answer
More Answers (1)
Aleksandra Ksiezyk
on 19 Jan 2020
0 votes
2 Comments
Adam Danz
on 19 Jan 2020
I see now. Previously you described your variable as a matrix (see the 4th word in your question), not a a 3D array.
But this part is still unclear,
"I would like to create a table of hours and days [hours, days] for each month"
Does that mean you'll have 12 different tabes or do you want all of it in 1 table?
Adam Danz
on 20 Jan 2020
Aleksandra Ksiezyk 's answer moved here as comment.
ajc... sorry .. my mistake... yes, my idea was to created a for loop to get 12 tables with my value
Categories
Find more on Tables 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!