p_r=timeseries(0.7*[0 0 -1 -1 -2 -2 -2.5 -2.5 -2.7 -2.7 -2.8 -2.8 -2 -1 -1 0 0 1 1 2 2 3 3],[0 70 70 150 150 200 200 300 300 350 350 400 400 450 450 500 500 550 550 600 600 650 650]);
simtime=400;
Kdist=1;
Phidist=-2*0;
AdaptOn=1;
sim('simLinModelAdapt_1MEAS')
close all
figure(1)
subplot(211)
    Pbottom.Name='P';
plot(Pbottom+24)
hold on
plot(Pref+24,'r')
subplot(212)
z_c.Name='z_c';
plot(z_c+30)

figure(2)
subplot(211)
Ku.Name='Ku';
plot(Ku)
subplot(212)
Kp.Name='Kp';
plot(Kp)
tilefigs
