# How do I estimate a function to obtain its different values while varying one of its parameter? So that I can obtain my estimate in form of the parameter am varying[nuA], I declared the parameter as a symbol and later declare it as the interval.

1 ビュー (過去 30 日間)
Mayowa Micheal Ojo 2018 年 10 月 28 日
Commented: Rena Berman 2019 年 12 月 12 日
clear all
clc
%%%%%%%%%%%%%%Declaring of Parameter values %%%%%%%%%%%%%%
syms nuA
% nuA=0.14868;
mu=1/(56*365);
pi=mu*182202000*(1/365);
omegaA=(1/5)*(1/365);
eta=1;
epsilon=((1.90)/2);
betaA=0.43296; betac=0.43296;
gammacA= 0.1118; gammacc=0.1118;
gammaIA=0.1128; gammaIc=0.1128;
gammacAc=0.1118; gammaIAc=0.1128;
sigmaA=0.0548; sigmac=0.0548; sigmaAc=0.0548;
kappaA = 0.0031; kappac = 0.0031; kappaAc = 0.0031;
deltaA=0.1923; deltac=0.1923; deltaAc=0.1923;
%%%%%%%%%%%%%%%Declaring the representations %%%%%%%%%%%%%
k1=(nuA+mu);
k2=(omegaA+mu);
k3=(sigmaA+ gammacA + mu);
k4=(gammaIA+ mu+ deltaA);
k5=(kappaA+mu);
k6=(sigmac+ gammacc + mu);
k7=(gammaIc+ mu + deltac);
k8=(kappac+mu);
k9=(sigmaAc+gammacAc+mu);
k10=(gammaIAc+mu+deltaAc);
k11=(kappaAc+mu);
p=(1-epsilon);
P1=(k4*gammacA+gammaIA*sigmaA);
P2=(k7*gammacc+gammaIc*sigmac);
lambdaA=0.0811;
a=(pi*k4*k5*p)+(pi*k5*sigmaA*p)+(pi*p*P1);
b=(pi*k2*k4*k5)+(pi*k3*k4*k5*p)+(pi*k4*k5*p*nuA)+(pi*k2*k5*sigmaA)+(pi*k5*sigmaA*p*nuA)+(pi*P1*k2)+(pi*P1*p*nuA)-(betaA*eta*k4*k5*p)-(betaA*pi*k5*sigmaA*p);
c=(pi*k2*k3*k4*k5)+(pi*k3*k4*k5*nuA)-(betaA*eta*pi*k4*k5*P1*nuA)-(betaA*eta*pi*k2*k4*k5)-(betaA*pi*k2*k5*sigmaA)-(betaA*pi*k5*sigmaA*p*nuA);
SA=pi*k3*k4*k5*(p*lambdaA+k2)/((k3*k4*k5*(lambdaA+k1)*(p*lambdaA+k2)-k3*k4*k5*omegaA*nuA)-(lambdaA*kappaA*P1*(p*lambdaA+k2+p*nuA))); %Susceptible population%
VAA=nuA*pi*k3*k4*k5/((k3*k4*k5*(lambdaA+k1)*(p*lambdaA+k2)-k3*k4*k5*omegaA*nuA)-(lambdaA*kappaA*P1*(p*lambdaA+k2+p*nuA))); %Vaccinated population%
NA=(pi*k3*k4*k5*(p*lambdaA+k2+nuA)+(lambdaA*pi*k4*k5+lambdaA*pi*sigmaA*k5+lambdaA*pi*P1)*(p*lambdaA+k2+p*nuA))/((k3*k4*k5*(lambdaA+k1)*(p*lambdaA+k2)-k3*k4*k5*omegaA*nuA)-(lambdaA*kappaA*P1*(p*lambdaA+k2+p*nuA))); %Total population%
%%%%%%%%%%%Evaluating Invasion Reproduction Number of A over C %%%%%%%%%
nA=[0.1:0.2:2];
RcA= betac*((eta*k7+sigmac)*(SA+VAA))/(k6*k7*NA)

#### 2 件のコメント

Stephen Cobeldick 2019 年 11 月 16 日
Original Question (from Google Cache) by Mayowa Micheal Ojo "How do I estimate a function to obtain its different values while varying one of its parameter? So that I can obtain my estimate in form of the parameter am varying[nuA], I declared the parameter as a symbol and later declare it as the interval.":
clear all
clc
%%%%%%%%%%%%%%Declaring of Parameter values %%%%%%%%%%%%%%
syms nuA
% nuA=0.14868;
mu=1/(56*365);
pi=mu*182202000*(1/365);
omegaA=(1/5)*(1/365);
eta=1;
epsilon=((1.90)/2);
betaA=0.43296; betac=0.43296;
gammacA= 0.1118; gammacc=0.1118;
gammaIA=0.1128; gammaIc=0.1128;
gammacAc=0.1118; gammaIAc=0.1128;
sigmaA=0.0548; sigmac=0.0548; sigmaAc=0.0548;
kappaA = 0.0031; kappac = 0.0031; kappaAc = 0.0031;
deltaA=0.1923; deltac=0.1923; deltaAc=0.1923;
%%%%%%%%%%%%%%%Declaring the representations %%%%%%%%%%%%%
k1=(nuA+mu);
k2=(omegaA+mu);
k3=(sigmaA+ gammacA + mu);
k4=(gammaIA+ mu+ deltaA);
k5=(kappaA+mu);
k6=(sigmac+ gammacc + mu);
k7=(gammaIc+ mu + deltac);
k8=(kappac+mu);
k9=(sigmaAc+gammacAc+mu);
k10=(gammaIAc+mu+deltaAc);
k11=(kappaAc+mu);
p=(1-epsilon);
P1=(k4*gammacA+gammaIA*sigmaA);
P2=(k7*gammacc+gammaIc*sigmac);
lambdaA=0.0811;
a=(pi*k4*k5*p)+(pi*k5*sigmaA*p)+(pi*p*P1);
b=(pi*k2*k4*k5)+(pi*k3*k4*k5*p)+(pi*k4*k5*p*nuA)+(pi*k2*k5*sigmaA)+(pi*k5*sigmaA*p*nuA)+(pi*P1*k2)+(pi*P1*p*nuA)-(betaA*eta*k4*k5*p)-(betaA*pi*k5*sigmaA*p);
c=(pi*k2*k3*k4*k5)+(pi*k3*k4*k5*nuA)-(betaA*eta*pi*k4*k5*P1*nuA)-(betaA*eta*pi*k2*k4*k5)-(betaA*pi*k2*k5*sigmaA)-(betaA*pi*k5*sigmaA*p*nuA);
SA=pi*k3*k4*k5*(p*lambdaA+k2)/((k3*k4*k5*(lambdaA+k1)*(p*lambdaA+k2)-k3*k4*k5*omegaA*nuA)-(lambdaA*kappaA*P1*(p*lambdaA+k2+p*nuA))); %Susceptible population%
VAA=nuA*pi*k3*k4*k5/((k3*k4*k5*(lambdaA+k1)*(p*lambdaA+k2)-k3*k4*k5*omegaA*nuA)-(lambdaA*kappaA*P1*(p*lambdaA+k2+p*nuA))); %Vaccinated population%
NA=(pi*k3*k4*k5*(p*lambdaA+k2+nuA)+(lambdaA*pi*k4*k5+lambdaA*pi*sigmaA*k5+lambdaA*pi*P1)*(p*lambdaA+k2+p*nuA))/((k3*k4*k5*(lambdaA+k1)*(p*lambdaA+k2)-k3*k4*k5*omegaA*nuA)-(lambdaA*kappaA*P1*(p*lambdaA+k2+p*nuA))); %Total population%
%%%%%%%%%%%Evaluating Invasion Reproduction Number of A over C %%%%%%%%%
nA=[0.1:0.2:2];
RcA= betac*((eta*k7+sigmac)*(SA+VAA))/(k6*k7*NA)
Rena Berman 2019 年 12 月 12 日

サインイン to comment.

### 採用された回答

Walter Roberson 2018 年 10 月 28 日

RcA_numeric = double( subs(RcA, nuA, nA) );

#### 3 件のコメント

Mayowa Micheal Ojo 2018 年 10 月 28 日
Hello Walter, thank you for your quick response! However, I can't figure out there to declare the code you wrote. I want to vary nuA with nuA=[0.1:0.2:2] on RcA. Do I still need to follow my code from where I declared sysm nuA? Thanks
Walter Roberson 2018 年 10 月 28 日
It goes after your existing code.
Mayowa Micheal Ojo 2018 年 10 月 28 日
Thank you so much Walter for your concern. I appreciate this. My code is perfectly working now.

サインイン to comment.