Error invalid expression input variable
Show older comments
%% Posible questios for Covid Project
%%If everyone got vaccienated how will it affet the death rates
%%If no one got vaccinated compare both.
%%How has social life affected death rate in different age groups below 50's ish
prompt= "Length of simulation in days: ";
x=input(prompt);
people="Number of new people per day: ";
N=input(people);
gp=3.42;%gestation period
tvs=8; %% average recovery period in days for vaccinated person
tus=14; %% average recovery period of unvaccinated person in days
tHv=5.6; %average time in the hopsital for vaccinated person
tHu=6.7;% average time in the hospital for unvaccinated person
%to=zeros(1,x); %% Total old
%ta=zeros(1,x); %% total adult
%ty=zeros(1,x); %% total young
%% For Old
fprintf("This part of the simulation is for old people above 65 years old \n");
u=zeros(1,x);%% inital people unvaccinated who get the vaccine
up="inital people unvaccinated who get the vaccine: ";
u1=input(up);
r=zeros(1,x);%% initial peope who reject vaccine
rp="initial people who reject the vaccine: ";
r(1)=input(rp);
H=zeros(1,x);
H(1)=u(1)+r(1);%% total initial population
fprintf("Total population for simulation is %d \n", H(1))
rr="Fraction of people who refuse vacciantion: ";
avgr=input(rr);
q1=(1-avgr)*N;%% peopel who accept the vaccine
q2=avgr*N;%people who refuse the vaccine;
This is the code I used, however in the line (u1=input(up);) it says invalid expresssion. I don't understand why it is an invalid expression though.
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!