THE CODE BELOW GIVES MULTIPLE PLOTS FOR A PLOT COMMAND, NEED A SINGLE PLOT
古いコメントを表示
I HAD EXPECTED THE CODE BELOW TO GENERATE A SINGLE PLOT BUT IT GENERATES THE NUMBER OF PLOTS EQUAL TO THE LENGTH OF THE INPUT VECTOR (t). Don't know what is wrong. % Function that calculates the ML by prompting the user for inputs function output =Gen_ML(t) %Accept the initial time value firstIndex =input('Enter first index:'); %Accept the final time value lastIndex = input('Enter last index:'); %Accept the value of first constant alpha a=input('Enter alpha vaule'); %Accept the value of the second constant beta b=input('Enter beta value'); %Accept the value of constant lambda one l1=input('Enter lambda one'); %Accept the value of constant lambda two l2=input('Enter lambda two'); t=firstIndex:lastIndex; for n=firstIndex:lastIndex output(n,:) = 0.0635*(t.^-0.6)* sum((l1*t.^a*n)/(gamma(n*a+b))) +0.0268*(t.^-0.6)* sum((l2*t.^a*n)/(gamma(n*a+b))) ; end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!