Write a matlab function that will take a set

Assignment Help MATLAB Programming
Reference no: EM132101284

To plot the FFA curve, engineers often use this function Q = b + a/k[ 1 - (- log (1 - P))^k i (1) where P is the exceedence probability, and Q is the volumetric flow rate ( ft^3/ s ) of the river, and a, b, and k are values which depend on the river under question.

For this assignment, you are given three different sets of values of a, b, and k for 3 different rivers.

They are a = [2000, 1000, 4000] b = [30000, 40000, 50000] k = [-0.3, -0.1, -0.4]

Write a Matlab function that will take a set of a, b and k vectors and create a figure of FFA curves (Q vs T) for these rivers using equation (1) and the given parameter values, all on the same graph, with appropriate axis labels.

The function definition (first line of the function) should be function []=FFAplot(a,b,k)

You should use a loop in your function, since the function should be able to handle an unknown number of [a, b, k] values.

Your function should also check that a, b, and k are the same size. The return period should range from 1 year to 100 years.

It will be easiest if you add the legend separately using the legend command, in the command window outside of your function code.

Reference no: EM132101284

Questions Cloud

Maps the province names to the names of province : Given a variable , province_premier, that is associated with a dictionary that maps the province names to the names of province premiers, associate.
Abolition movement in the united states : 1) In your opinion, which individual had the greatest impact on the Abolition Movement in the United States?
What is the minimum number of socks orfkleeg needs : Plutonians have three feet. Suppose the Plutonian Orfkleeg has a box with an infinite number each of red, blue, yellow, green, and white socks.
Jackson administration indian removal policy : In Florida, the Jackson administration's Indian removal policy led to the Second Seminole War.
Write a matlab function that will take a set : You should use a loop in your function, since the function should be able to handle an unknown number of [a, b, k] values.
Declaration of the rights of man and of the citizen : What is the significance of the "Declaration of the Rights of Man and of the Citizen" in history?
Create a test java class called Banking : Write the class Banking that tests the transferTo method of Account class and print the results of accounts before and after transfer
Secession in the declarations of causes : What did the seceding southern states list as their primary reason for secession in the Declarations of Causes and Orders of Secession?
Generate a pseudo-random color bmp image of size : Prompt the user for the output filename with a bmp extension where the image is to be stored (in the directory from which your program is run).

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd