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!