
syms p1 p2 t x11 y11 x12 y12 x13 y13 x14 y14 x15 y15 x16 y16 ...
u avf11 avf12 avf13 avf14 avf15 avf16

u=p2.*cos(2*pi./p1.*t);

avf11 =0.394507E6.*x11.^3+0.157803E7.*x11.*x12.^2+0.355056E7.*x11.* ...
  x13.^2+0.631211E7.*x11.*x14.^2+0.986267E7.*x11.*x15.^2+ ...
  0.142023E8.*x11.*x16.^2;

avf12 =0.157803E7.*x11.^2.*x12+0.631211E7.*x12.^3+0.142023E8.*x12.* ...
  x13.^2+0.252484E8.*x12.*x14.^2+0.394507E8.*x12.*x15.^2+0.56809E8.* ...
x12.*x16.^2;

avf13 =0.355056E7.*x11.^2.*x13+0.142023E8.*x12.^2.*x13+0.319551E8.* ...
  x13.^3+0.56809E8.*x13.*x14.^2+0.88764E8.*x13.*x15.^2+0.12782E9.* ...
x13.*x16.^2;

avf14 =0.631211E7.*x11.^2.*x14+0.252484E8.*x12.^2.*x14+0.56809E8.* ...
  x13.^2.*x14+0.100994E9.*x14.^3+0.157803E9.*x14.*x15.^2+ ...
  0.227236E9.*x14.*x16.^2;

avf15 =0.986267E7.*x11.^2.*x15+0.394507E8.*x12.^2.*x15+0.88764E8.* ...
  x13.^2.*x15+0.157803E9.*x14.^2.*x15+0.246567E9.*x15.^3+ ...
  0.355056E9.*x15.*x16.^2;

avf16 =0.142022E8.*x11.^2.*x16+0.56809E8.*x12.^2.*x16+0.12782E9.*x13.^2.* ...
 x16+0.227236E9.*x14.^2.*x16+0.355056E9.*x15.^2.*x16+0.511281E9.* ...
 x16.^3;


f1=y11;
f2=(-1).*avf11+0.22508E-1.*u+(-0.426165E2).*x11+(-0.4E-1).*y11+ ...
  0.888577E1.*y12+0.355431E1.*y14+0.228491E1.*y16;
f3=y12;
f4=(-1).*avf12+(-0.133938E4).*x12+(-0.888577E1).*y11+(-0.4E-1).*y12+ ...
 0.159944E2.*y13+0.634697E1.*y15;
f5=y13;
f6=(-1).*avf13+0.7503E-2.*u+(-0.7397E4).*x13+(-0.159944E2).*y12+( ...
  -0.4E-1).*y13+0.228491E2.*y14+0.888577E1.*y16;
f7=y14;
f8=(-1).*avf14+(-0.240601E5).*x14+(-0.355431E1).*y11+(-0.228491E2).* ...
 y13+(-0.4E-1).*y14+0.296192E2.*y15;
f9=y15;
f10=(-1).*avf15+0.4502E-2.*u+(-0.595109E5).*x15+(-0.634697E1).*y12+( ...
  -0.296192E2).*y14+(-0.4E-1).*y15+0.363509E2.*y16;
f11=y16;
f12=(-1).*avf16+(-0.12427E6).*x16+(-0.228491E1).*y11+(-0.888577E1).* ...
  y13+(-0.363509E2).*y15+(-0.4E-1).*y16;


F=sco_sym2funcs(...
    [f1; f2; f3; f4; f5; f6; f7; f8; f9; f10; f11; f12], ...
    {t, [x11; y11; x12; y12; x13; y13; x14; y14; x15; y15; x16; y16], [p1 p2]}, {'t', 'x', 'p'}, ...
        'vector',[0,1,1],...            
        'filename','sym_pipepo',...   
        'maxorder',3,...                
        'multifile',true,...            
        'folder','private',...          
        'output',{'derivatives','funcstr'}); 
                                         


