Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Integral calculation with parameters and age dependents

1 回表示 (過去 30 日間)
Orongo
Orongo 2019 年 1 月 27 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi, I have a working function of an integral that I would like to expand. I want to consider different parameters dependent on age.
  • param_1938 for ages >=76
  • param_1945 for ages 66 to75
  • param_1955 for ages 61 to 65
The working function that I would like to expand looks like this
x=(0:1:106)';
mu_x=@(t) f_lx(t,param_in);
for ii=1:size(x,1)-61
l_x(ii,1) = exp(-integral(mu_x,0,60+ii));
end
%%
function res=f_lx(x,param)
a=param(1);
b=param(2);
c=param(3);
res = zeros(size(x));
ind = x>100;
res(ind) = a+b*exp(c*100)+(x(ind)-100)*0.001;
res(~ind) =a+b*exp(c*x(~ind));
end
I'm thinking changing param_in to param1938,param_1945,param_1955. How can I do this?
A mathematical way demonstrating what I want
temp.png

回答 (0 件)

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by