You are on page 1of 3

ACTIVITY NO.

3
PLOTTING

Solve the following problems using Matlab software. Write the complete syntax
(command) and box your final answer. Use short bond paper. (20 pts each)

1. Here are some wind tunnel data for force (F) versus velocity (v):

These data can be described by the following function:

Use MATLAB to create a plot displaying both the data (using circular magenta symbols) and the
function (using a black dash-dotted line). Plot the function for v = 0 to 100 m/s and label the plot’s
axes.
2. Manning’s equation can be used to compute the velocity of water in a rectangular open
channel:

where U = velocity (m/s), S = channel slope, n = roughness coefficient, B = width (m), and H =
depth (m). The following data are available for five channels:

Store these values in a matrix where each row represents one of the channels and each column
represents one of the parameters. Write a single-line MATLAB statement to compute a column
vector containing the velocities based on the values in the parameter matrix.
3. The following equation can be used to compute values of y as a function of x:

where a and b are parameters. Write the equation for implementation with MATLAB, where a =
2, b =5, and x is a vector holding values from 0 to π/2 in increments of x = π/40. Include a legend
on the plot. For y, use a 1.5-point, dash dotted red line with 14-point, red edged, white-faced
pentagram-shaped markers.

You might also like