I made this program were the user can type in a year between 2009 and 2011 and get snow depth and air temperature data for the chosen year displayed on a graph.
I have o
Try this,
snowDepth_full = zeros(365,3); % make a temporary variable to hold everything
snowDepth_full(1:121,:) = snowDepth(1:121,:); % First 121 days up to april 30
snowDepth_full(end-90,:) = snowDepth(122:end,:); % Last 91 days from oct 1 on
snowDepth = snowDepth_full; % Copy it back
Then as before...
snowdepth2009 = snowdepth(:,1);
snowdepth2010 = snowdepth(:,2);
snowdepth2011 = snowdepth(:,3);
...