Sets the font size of the legend to 6 title

Info icon This preview shows pages 9–11. Sign up to view the full content.

View Full Document Right Arrow Icon
%Sets the font size of the legend to 6 title( 'Horizontal Velocity vs Time' %Titles the graph xlabel( 'Time (s)' %x-axis label ylabel( 'Horizontal Velocity (m/s)' %y-axis label xlim([0 106])  %Creates an x-limit from 0-106 ylim([0 310])  %Helps make the graph of u vs t when k = 0 visible grid  on   %Makes grid lines appear hold  on   %Retains plots from this loop and previous loops so that new plots do  not delete existing plots. clc  %Clears the warning messages   %Creates the graph for v vs t figure(4);  %Makes a new figure for the v vs t graph vt = plot(t,v);  %Plots the graph of vertical velocity vs time legend( 'k = 0' , 'k = 0.005' , 'k = 0.01' , 'k = 0.02' , 'k = 0.04' , 'k = 0.08' );  %Creates the legend title( 'Vertical Velocity vs Time' %Titles the graph xlabel( 'Time (s)' %x-axis label ylabel( 'Vertical Velocity (m/s)' %y-axis label xlim([0 106])  %Creates an x-limit from 0-106 grid  on   %Makes grid lines appear hold  on   %Retains plots from this loop and previous loops so that new plots do  not delete existing plots. clc  %Clears the warning messages   end main_range.m clear, clc %Grant Jensen, AER E 161, Project #2, main_range
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Flight Path of a Projectile 10 %Uses the functions flightpath.m and plot_range to graph Range(x) vs Air  Resistance(k) and Total flight time(t) vs Air Resistance(k) v_0 = 600;  %Launch velocity in m/s l_ang = 60;  %Launch angle in degrees above the horizontal k = 0:0.001:0.08;  %Coefficent of friction in s^-1 for  j = 1:length(k)  %Loops 6 times      %Calls the flightpath function. The i value in k(i) changes every  iteration to generate new vectors     [ t , u , v , v_t , x , y ] = flightpath( v_0 , l_ang , k(j) );     rng = x/1000;  %Converts the x values from meters to kilometers     rng = max(rng);  %This makes it so only the maximum range is graphed, which makes it much easier for the computer     f_t = max(t);  %This makes it so only the total time is graphed, which  makes it much easier for the computer      %Calls the plot_range function to create the x vs k and t vs k graphs     [krng , kf_t] = plot_range( rng , k(j) , f_t ); end plot_range.m function  [ krng, kf_t ] = plot_range( rng , k , f_t ) %Grant Jensen, AER E 161, Project #2, plot_range %Plots graphs for range      %Graphs Range(x) vs Air Resistance(k) and       %Total flight time(t) vs Air Resistance(k)      %To call the function: plot_range(x,k,t)      %Input arguments: x, k, t      %Where: rng is a value of range      %       k is air resistance      %       f_t is a value of time      %Outputs: graphs of k vs range and k vs f_t      %Next 8 lines create the range vs air resistance graph figure(5) ;  %Creates a new figure. It is index as 5 because the graphs from  plot_flightpaths have already taken up 4 new figures
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

0/0 PREVIEWS LEFT
Sign up to access 24/7 study resources for your classes

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern