Homework Solution: You are designing a gravity-driven water tank possible within monetary cost limitations. As shown in the figure and pipe system to deliver wate…

    You are designing a gravity-driven water tank possible within monetary cost limitations. As shown in the figure and pipe system to deliver water at the highest velocity below, the tank will be built on hill at some height (2). The velocity of water exiting the pipe must be at least 10 m/s. You have $600 to spend on the pipe, and the pipe costs $25 per meter for t meter. Write a MATLAB m-file to achieve the following goals: he first I0 meters(and $15 per meter for cach additional 1. Calculate the velocity of water exiting the pipe forleleven equally-spaced values of z ranging rom 0 to 30 m. Create a plot of water exit velocity for z values manging frotn o k0m abel he as o 30 m. Label the axes, 3. Determine the hcight2 for which the exit velocity is too slow and indicate this height on the 4. For each of the eleven equally spaced values of z, compute the cost of the pipe, and create a 5. Determine the height z for which the pipe is too expensive and indicate this height on the plot including the correct units plot with a vertical line made of 20 xs. plot of pipe cost vs, z. Label the axes, including correct units. with a vertical line made of 20 oS Turn in a printout of your completed m-file and the two plots. z=0.9x Pipe Length . Exit Velocity = V2gz

    media%2Fab2%2Fab27fba4-82b2-47b7-bd64-b3

    media%2F61a%2F61a87e6d-6e70-4463-9590-e3

    The problem must be done using matlab please help me with the code

    thank you

    You are designing a gravity-driven water tank possible within monetary cost limitations. As shown in the figure and pipe system to deliver water at the highest velocity below, the tank will be built on hill at some height (2). The velocity of water exiting the pipe must be at least 10 m/s. You have $600 to spend on the pipe, and the pipe costs $25 per meter for t meter. Write a MATLAB m-file to achieve the following goals: he first I0 meters(and $15 per meter for cach additional 1. Calculate the velocity of water exiting the pipe forleleven equally-spaced values of z ranging rom 0 to 30 m. Create a plot of water exit velocity for z values manging frotn o k0m abel he as o 30 m. Label the axes, 3. Determine the hcight2 for which the exit velocity is too slow and indicate this height on the 4. For each of the eleven equally spaced values of z, compute the cost of the pipe, and create a 5. Determine the height z for which the pipe is too expensive and indicate this height on the plot including the correct units plot with a vertical line made of 20 x's. plot of pipe cost vs, z. Label the axes, including correct units. with a vertical line made of 20 o'S Turn in a printout of your completed m-file and the two plots. z=0.9x Pipe Length . Exit Velocity = V2gz

    Expert Answer

     
    minVelocity=10; maxCost=600;

    You are cunning a gravity-driven insinuate tank feasible amid monetary consume limitations. As shown in the emblem and pipe regularity to give-up insinuate at the leading swiftness beneath, the tank earn be built on hill at some culmination (2). The swiftness of insinuate debouchureing the pipe must be at meanest 10 m/s. You bear $600 to waste on the pipe, and the pipe consumes $25 per meter coercion t meter. Write a MATLAB m-file to conclude the coercionthcoming goals: he leading I0 meters(and $15 per meter coercion cach joined 1. Calculate the swiftness of insinuate debouchureing the pipe coercionleleven akin-spaced values of z ranging rom 0 to 30 m. Fashion a devise of insinuate debouchure swiftness coercion z values manging frotn o k0m abel he as o 30 m. Label the axes, 3. Determine the hcight2 coercion which the debouchure swiftness is to-boot lingering and evidence this culmination on the 4. Coercion each of the eleven akin spaced values of z, value the consume of the pipe, and fashion a 5. Determine the culmination z coercion which the pipe is to-boot high-priced and evidence this culmination on the devise including the punish units devise with a upright method made of 20 xs. devise of pipe consume vs, z. Label the axes, including punish units. with a upright method made of 20 oS Turn in a printout of your completed m-file and the two devises. z=0.9x Pipe Length . Debouchure Swiftness = V2gz

    media%2Fab2%2Fab27fba4-82b2-47b7-bd64-b3

    media%2F61a%2F61a87e6d-6e70-4463-9590-e3

    The tallness must be performed using matlab
    please acceleration me with the code

    thank you

    You are cunning a gravity-driven insinuate tank feasible amid monetary consume limitations. As shown in the emblem and pipe regularity to give-up insinuate at the leading swiftness beneath, the tank earn be built on hill at some culmination (2). The swiftness of insinuate debouchureing the pipe must be at meanest 10 m/s. You bear $600 to waste on the pipe, and the pipe consumes $25 per meter coercion t meter. Write a MATLAB m-file to conclude the coercionthcoming goals: he leading I0 meters(and $15 per meter coercion cach joined 1. Calculate the swiftness of insinuate debouchureing the pipe coercionleleven akin-spaced values of z ranging rom 0 to 30 m. Fashion a devise of insinuate debouchure swiftness coercion z values manging frotn o k0m abel he as o 30 m. Label the axes, 3. Determine the hcight2 coercion which the debouchure swiftness is to-boot lingering and evidence this culmination on the 4. Coercion each of the eleven akin spaced values of z, value the consume of the pipe, and fashion a 5. Determine the culmination z coercion which the pipe is to-boot high-priced and evidence this culmination on the devise including the punish units devise with a upright method made of 20 x’s. devise of pipe consume vs, z. Label the axes, including punish units. with a upright method made of 20 o’S Turn in a printout of your completed m-file and the two devises. z=0.9x Pipe Length . Debouchure Swiftness = V2gz

    Expert Solution

     

    minVelocity=10;
    maxCost=600;
    price1=25;
    price2=15;
    g=9.81;
    z=linspace(0,30,11);
    exitVelocity=sqrt(2*g*z);

    plot(z,exitVelocity);
    xlabel(‘culmination of insinuate tank(m)’);
    ylabel(‘debouchure swiftness(m/s)’);
    hold on

    minVelZ=(minVelocity^2)/(2*g);
    zLine=minVelZ*ones(1,20);
    vLine=linspace(min(exitVelocity),max(exitVelocity),20);
    plot(zLine,vLine,’x’);
    pipeCost=zeros(1,11);

    coercion i=1:11
    x=z(i)/.9;
    pipeLength=sqrt(x^2+(z(i))^2);
    if pipeLength<=10
    pipeCost(i)=price1*pipeLength;
    else
    pipeCost(i)=price1*10+(pipeLength-10)*price2;
    end
    end

    figure(2)
    plot(z,pipeCost)
    xlabel(‘culmination of insinuate tank(m)’);
    ylabel(‘consume of pipe($)’)
    hold on;

    maxLength=(maxCost-price1*10)/price2+10;
    maxHeight=.9*maxLength/(sqrt(1+.9^2));
    zLine2=maxHeight*ones(1,20);
    cLine=linspace(min(pipeCost),max(pipeCost),20);
    plot(zLine2,cLine,’o’)