141k views
4 votes
Use MATLAB to plot the functions u = 2 log10 (60x + 1) and v = 3 cos(6x) over the interval 0 ≤ x ≤ 2. Properly label the plot and each curve. The variables u and v represent speed in miles per hour; the variable x represents distance in miles.

1 Answer

4 votes

Answer:

title ('Graph of Speed agaist Distance');

xlabel('Distace in miles');

ylabel('Speed in miles per hour');

legend('u','v');

x = 0: 0.01:2;

u = 2* log10(60*x + 1);

plot (x,u);

hold on

v = 2* cosd (6*x);

plot (x,v)

grid on

Explanation:

#Define the title of the plot

title ('Graph of Speed against Distance');

#Define both the x-axis ad y-axis label of the plot

xlabel('Distance in miles');

ylabel('Speed in miles per hour');

#Define the what each plot sigifies

legend('u','v');

#Define the x-axis range of the plot

x = 0: 0.01:2;

#Define the function u and plot it on the graph

u = 2* log10(60*x + 1);

plot (x,u);

#allow another plot to be on the same graph

hold on

#Define the function v and plot it on the graph

v = 2* cosd (6*x);

plot (x,v)

#make the grid visible

grid on

Use MATLAB to plot the functions u = 2 log10 (60x + 1) and v = 3 cos(6x) over the-example-1
User Seth Robertson
by
7.4k points