p0=-90;
pi=-20;
pf=90;
T=10;
t=[0:0.01:T]';

close all

% c0=p0;
% c1=0;
% c2=0;
% c3=(-26*p0-6*pf+32*pi)./T^3;
% c4=(47*p0+17*pf-64*pi)./T^4;
% c5=(-22*p0-10*pf+32*pi)./T^5;
% 
% p=c0+c1*t+c2*t.^2+c3*t.^3+c4*t.^4+c5*t.^5;

c0=p0;
c1=0;
c2=(-7*p0-pf+8*pi)/T^2;
c3=(6*p0+2*pf-8*pi)/T^3;

p=c0+c1*t+c2*t.^2+c3*t.^3;

plot(t,p)
grid on