ÿþhttp://jabbarinh.profcms.um.ac.ir/imagesm/920/Cdes_Shabani_PHD_stu_1398/dec-den  function [ lZ ] = monotone_density( Z )  X=input('input the lifetime vector');  Y=input('input the truncation vector');  n=length(X);  t=t'.*.95;  X=X'; [  Gn ,  x1,n1 ]=G_n_LB( X,t );  %X=sort(X);  G=zeros(n,1); %  G=1-exp(-X);  for i=1:n  for j=2:n1  if (X(i)< x1(j) && X(i)>= x1(j-1))  G(i)=Gn(j);  end  end  end  X=sort(X);  G=sort(G);  dX=zeros(1,n);  for i=1:n  if i==1  dX(i)=X(1);  else  dX(i)=X(i)-X(i-1);  end  end  dZ=([eye(n-1);zeros(1,n-1)]-[zeros(1,n-1);eye(n-1)])';  Z=ones(1,n);  A=[dX;dZ];  b=[1,zeros(1,n-1)];  Z=sort(Z);  dZ=([eye(n-1);zeros(1,n-1)]-[zeros(1,n-1);eye(n-1)])';  if (dX*Z<=ones(1,n)&& - dZ*Z<=0)  lZ=-sum(log(Z))+n.*log(sum(Z.*G')); end
An Error occurred while handling another error:
yii\web\HeadersAlreadySentException: Headers already sent in  on line 0. in /var/www/html/prof-homepages/vendor/yiisoft/yii2/web/Response.php:366
Stack trace:
#0 /var/www/html/prof-homepages/vendor/yiisoft/yii2/web/Response.php(339): yii\web\Response->sendHeaders()
#1 /var/www/html/prof-homepages/vendor/yiisoft/yii2/web/ErrorHandler.php(136): yii\web\Response->send()
#2 /var/www/html/prof-homepages/vendor/yiisoft/yii2/base/ErrorHandler.php(135): yii\web\ErrorHandler->renderException()
#3 [internal function]: yii\base\ErrorHandler->handleException()
#4 {main}
Previous exception:
yii\web\HeadersAlreadySentException: Headers already sent in  on line 0. in /var/www/html/prof-homepages/vendor/yiisoft/yii2/web/Response.php:366
Stack trace:
#0 /var/www/html/prof-homepages/vendor/yiisoft/yii2/web/Response.php(339): yii\web\Response->sendHeaders()
#1 /var/www/html/prof-homepages/vendor/yiisoft/yii2/base/Application.php(656): yii\web\Response->send()
#2 /var/www/html/prof-homepages/vendor/faravaghi/yii2-filemanager/models/Files.php(696): yii\base\Application->end()
#3 /var/www/html/prof-homepages/vendor/faravaghi/yii2-filemanager/controllers/FilesController.php(484): faravaghi\filemanager\models\Files->getFile()
#4 [internal function]: faravaghi\filemanager\controllers\FilesController->actionGetFile()
#5 /var/www/html/prof-homepages/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#6 /var/www/html/prof-homepages/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams()
#7 /var/www/html/prof-homepages/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction()
#8 /var/www/html/prof-homepages/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction()
#9 /var/www/html/prof-homepages/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest()
#10 /var/www/html/prof-homepages/backend/web/index.php(16): yii\base\Application->run()
#11 {main}