Filter löschen
Filter löschen

what is the meaning of this error, "??? Undefined function or method 'Restart' for input arguments of type 'char' when using Matlab?

2 Ansichten (letzte 30 Tage)
what is the meaning of this error, "??? Undefined function or method 'Restart' for input arguments of type 'char' when using Matlab?
  6 Kommentare
ELISHA ANEBI
ELISHA ANEBI am 8 Jul. 2023
This code is not ploting any graph as expected. Please what do you think is wrong?
Image Analyst
Image Analyst am 8 Jul. 2023
It plots what you told it to plot. If you're plotting the wrong things, then probably your equations are wrong.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sandeep Mishra
Sandeep Mishra am 10 Jul. 2023
Hello ELISHA,
I tried running your commented code and found some different issue in your while loop.
Your code is running out of Root_array range, which is giving me error, you can stop that by checking width of Root_array as below
while (f<width(Root_array) && Root_array(f,1)==0 && Root_array(f,2)==0)
f=f+1;
end
while (f1<width(Root_array) && Root_array(f1,1)~=0)
f1=f1+1;
end
I also found that you are getting no plot in figure 1 and figure 2 because the plot inputs are empty (0×1 or 1×0 size)
Unstable =Rev_value(1,Rev_value_Cr:length(Rev_value))
unstable = 1×0 empty double row vector
Root_array(Rev_value_Cr:length(Rev_value),2)
Root_array = 0×1 empty double column vector
You can debug your code to fix these issues.
  1 Kommentar
ELISHA ANEBI
ELISHA ANEBI am 11 Jul. 2023
Sandeep Mishra,
Thank you for your input. I copied the code you sent and replaced mine but it didn't still work. Please find below my equations and necessary parameters. I am ploting bifurcation graph- "Force of infection" against the "basic reproduction no Rev".
Please help me plot this graph.
% The Matlab Codes for the forward bifurcation diagram
Rev_value=0.018:0.01:4;
Root_array=zeros (length (Rev_value), 2);
qI=0.001923; qA=0.00000004013; etaA=0.1213; etaQ=0.003808; w=0.5925;
Lambda=0.1598643e-7; theta=0.022;
delta=0.125; mu=0.01119; pi=0.464360344; deltaQ=6.847e-4; beta=1.086e-1;
qE=1.8113e-4; rhoQ=0.0815; a=0.16255; k=0.15; v1=0.71; v2=0.29;alpha=0.57e-1; deltaI=0.00000000223; rhoA=0.1; rhoI=0.0666666;
c1=mu+v1; c2=1-w; c3=mu+alpha+v2;c4=1-k; c5=qE+delta+mu; c6=rhoA+mu; c7=delta*(1-a); c8=rhoI+qI+deltaI+mu; c9=rhoA+deltaQ+mu;
b1=1-theta;
B=delta*a*c8*c9+c7*k*qI*rhoQ+c8*k*qE*rhoQ;
G=qI*c7*c6+qE*c8*c6;
H1=c2*c5*c6*c8*c9;
H2=c5*c6*c8*c9*(c3*+c1*c2)-(b1*c2+c2*theta)*(c6*c9*c7*pi*beta+pi*G*beta*etaQ+pi*B*beta*etaA);
H3=c5*c6*c8*c9*(c3*c1-v1*v2)*(1-b1*Rev_value)-(c3*theta+c2*v1*theta)*(c6*c9*c7*pi*beta+pi*G*beta*etaQ+pi*B*beta*etaA);
hold on
for i=1:1:length(Rev_value);
Rev=Rev_value(i);
% bifurcation parameter
%Coefficients of quadratic equation H1, H2, H3
p=[H1,H2,H3];
r =roots(p);
len=length(r);
for t=1:1:len

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Nonlinear Dynamics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by