function [H, HI, Dp, Dm, e_1, e_m] = d1_upwind_7(m,h)

    BP = 6;
    if(m<2*BP)
        error(['Operator requires at least ' num2str(2*BP) ' grid points']);
    end

    Hv=ones(m,1);
    Hv(1:6) = [0.19087e5/0.60480e5; 0.84199e5/0.60480e5; 0.18869e5/0.30240e5; 0.37621e5/0.30240e5; 0.55031e5/0.60480e5; 0.61343e5/0.60480e5; ];
    Hv(m-5:m)=rot90(Hv(1:6),2);
    Hv = Hv*h;
    H = spdiag(Hv,0);
    HI = spdiag(1./Hv,0);

    q_diags = [-3 -2 -1 0 1 2 3 4];
    q_stencil = [-1/105 +1/10 -3/5 -1/4 +1 -3/10 +1/15 -1/140];
    Qp = stripeMatrix(q_stencil, q_diags,m);

    Q_U =[
        -0.265e3/0.300272e6 0.1587945773e10/0.2432203200e10 -0.1926361e7/0.25737600e8 -0.84398989e8/0.810734400e9 0.48781961e8/0.4864406400e10 0.3429119e7/0.202683600e9;
        -0.1570125773e10/0.2432203200e10 -0.26517e5/0.1501360e7 0.240029831e9/0.486440640e9 0.202934303e9/0.972881280e9 0.118207e6/0.13512240e8 -0.231357719e9/0.4864406400e10;
        0.1626361e7/0.25737600e8 -0.206937767e9/0.486440640e9 -0.61067e5/0.750680e6 0.49602727e8/0.81073440e8 -0.43783933e8/0.194576256e9 0.51815011e8/0.810734400e9;
        0.91418989e8/0.810734400e9 -0.53314099e8/0.194576256e9 -0.33094279e8/0.81073440e8 -0.18269e5/0.107240e6 0.440626231e9/0.486440640e9 -0.365711063e9/0.1621468800e10;
        -0.62551961e8/0.4864406400e10 0.799e3/0.35280e5 0.82588241e8/0.972881280e9 -0.279245719e9/0.486440640e9 -0.346583e6/0.1501360e7 0.2312302333e10/0.2432203200e10;
        -0.3375119e7/0.202683600e9 0.202087559e9/0.4864406400e10 -0.11297731e8/0.810734400e9 0.61008503e8/0.1621468800e10 -0.1360092253e10/0.2432203200e10 -0.10677e5/0.42896e5;
    ];


    Qp(1:6,1:6)=Q_U;
    Qp(m-5:m,m-5:m)=rot90(Q_U,2)';

    Qm=-Qp';

    e_1=sparse(m,1);e_1(1)=1;
    e_m=sparse(m,1);e_m(m)=1;

    Dp=HI*(Qp-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ;

    Dm=HI*(Qm-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ;
end
