How to create a matrix with several days using eval fuction?
Show older comments
First of all, sorry for my english.
for i=1:2
dia={eval(['day' num2str(i) '= i'])}
figure
pcolor(longitude(lon_useful),latitude(lat_useful),squeeze(temperatura(lon_useful,lat_useful,i))'),
title (day{i})
shading flat
colorbar
daspect([1,1,1])
end
I have this code and everytime he runs I want to create a plot with the title "day 1" for the first time, "day 2" for the second and i want to creat a matrix that have "day i" for 'i' times in order to get easier and to change day={'day1','day2'} .
I hope you guys could help me.
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing 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!