Since you are new, let us show you how Trendy works.

Close-button

Daily High-Low in Anchorage

This plot is broken.

Error using griddedInterpolant
The grid vectors are not strictly monotonic increasing.

Error in matlab:matlab.internal.la
  • Created by: Ned Gulley
  • Latest result: Error using <a href="matlab:matlab.internal.language.introspective.errorDocCallback('griddedInterpolant')" style="font-weight:bold">griddedInterpolant</a> The grid vectors are not strictly monotonic increasing. Error in <a href="matlab:matlab.internal.la
  • Created on: 01 Feb 2012

Plot Image
t1 = time1328;
d1 = data1328;
t2 = time1155;
d2 = data1155;

[t1,ix] = unique(t1);
d1 = d1(ix);
[t2,ix] = unique(t2);
d2 = d2(ix);

tn = unique([t1; t2]);
tn(tn < max(t1(1),t2(1))) = [];
tn(tn > min(t1(end),t2(end))) = [];
d1n = interp1(t1,d1,tn);
d2n = interp1(t2,d2,tn);

plot(tn,d2n,'r');
hold on
plot(tn,d1n,'b');
fill([tn; flipud(tn)],[d1n; flipud(d2n)], ...
  0.9*[1 1 1],'EdgeColor','none');
hold off
ylim([-20 100])
datetick

title('Daily High and Low Temperatures in Anchorage, AK')
ylabel('temp (deg. F)')
legend({'high','low'})
Tags:

Add Tags


0 comments