I can create the shaded boundary (y1 and Y2) individually but I have issues merging the two codes together. The data file is attached and the code is shown below. Thank you.
data=load('Jun15_VelocityUV.txt');b= data(:,1);y=b(104:127,:);% Input x-axis
x = linspace(1,24,24);xi=1:0.01:24;yi=interp1(x,y,xi,'spline');h=plot(xi,yi)% Define Limit
y1=0.6;y2 = -0.6;hold on%area(xi, min(yi, y2), y2,'EdgeColor', 'none', 'FaceColor', [.7 .7 .7])
hold onarea(xi, max(yi, y1), y1, 'EdgeColor', 'none', 'FaceColor', [.7 .7 .7])
hold off
Best Answer