You should use a loop in your function since the function


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.

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: You should use a loop in your function since the function
Reference No:- TGS02894739

Expected delivery within 24 Hours