hw #2b computer assignment felipe bento oliveira

4
Scanned by CamScanner

Upload: felipe-bento

Post on 21-Nov-2015

216 views

Category:

Documents


0 download

DESCRIPTION

hw fluid mechanics

TRANSCRIPT

  • Scanned by CamScanner

  • Scanned by CamScanner

  • vet=1:1:5 ;

    cont=0;

    for l=20:10:60

    tang=atand(80/l);

    A1=31.2/3;

    A2=0;

    A3=20.8*l^2;

    A4=(-3896*l^2)-(10400/(sind(tang))^2);

    poli=[A1 A2 A3 A4];

    sol=roots(poli);

    B1=sol(1);

    B2=sol(2);

    B3=sol(3);

    if B1>0

    cont=cont+1;

    disp (B1)

    vet(cont)=B1

    end

    if B2>0

    cont=cont+1;

    disp(B2)

    vet(cont)=B2

    end

    if B3>0

    cont=cont+1;

    disp(B3)

    vet(cont)=B3

    end

    end

    l=20:10:60;

    plot(l,vet)

    title('l x h');

    xlabel('l (ft)');

    ylabel('h (ft)');