LEARN TO USE MATLAB.
0.25:.5:25
ans =
Columns 1 through 11
0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 5.25
Columns 12 through 22
5.75 6.25 6.75 7.25 7.75 8.25 8.75 9.25 9.75 10.25 10.75
Columns 23 through 33
11.25 11.75 12.25 12.75 13.25 13.75 14.25 14.75 15.25 15.75 16.25
Columns 34 through 44
16.75 17.25 17.75 18.25 18.75 19.25 19.75 20.25 20.75 21.25 21.75
Columns 45 through 50
22.25 22.75 23.25 23.75 24.25 24.75
The point is, the colon operator would be nearly the first thing you would learn were you to read the getting started tutorial in MATLAB. Don't skip reading the manual.
Next, you want to repeat this. For how many days? You can count how many you need for 5 years. The simplest way to repeat a vector is to use repmat. So you might end up with this:
h = repmat(0.25:.5:25,1,5*365);
Again, repmat is one of those things you will see in the basic getting started tutorials. READ THEM, as they were put there for you to use and learn from. Otherwise, you will be asking dozens of basic questions you would have learned the answer to in just a few minutes of reading.
Best Answer