So here is my code... ~~~~~~~~
function []= FFAplot(a,b,k)
P=.01;
T=1/P;
if length(a)==length(b) && length(b)==length(k)
for i=1:length(a)
Q=b(i)+(a(i)/k(i))*(1-(-log(1-P))^k(i));
loglog(T,Q)
xlim([1,100]);
hold on
grid on
end
else
error('Length of vectors not the same')
end
xlabel('Return period (yr)')
ylabel('Flood magnitude (cfs)')
legend('show')
end
By the way I used these as my a, b, k variables.
a=[2000 1000 4000];
b=[30000 40000 50000];
k=[-.3 -.1 -.4];
HOWEVER, the plot is not showing the lines.... It shows that there are line in the legend just not lines on the loglog graph. PLEASE SOME ONE HELP I AM GOING CRAZY.
<<
>>