Note: Done accordingly. Please comment for any problem. Please
Uprate. Thanks.
fever.m
prompt = 'Please give vector of temperatures. ';
T = input(prompt);
index=1;
haveFever=0;
noFever=0;
while index <= length(T)
if T(index) >= 99
haveFever=haveFever+1;
else
noFever=noFever+1;
end
index=index+1;
end
fprintf('%d persons have fever and %d persons dont have
fever\n',haveFever,noFever);
Output:
![>> fever Please give vector of temperatures. [98.6,102,101, 99,98.9,102.1,100.3,101.2] 6 persons have fever and 2 persons don](http://img.homeworklib.com/images/17f02385-33e2-4eda-8e24-e6b655bf6661.png?x-oss-process=image/resize,w_560)
areas.m
choice=1;
while and(choice>0,choice <4)
prompt = 'Please choose for which you want to calculate
area\n1)Cylinder\n2)Circle\n3)Rectangle\n4)Any other to
exit.\n';
choice = input(prompt);
if choice==1
r = input('Enter Radius of Cylinder :');
h=input('Enter height of Cylinder :');
area = (2*pi*r*h)+(2*pi*r^2);
fprintf('Area of Cylinder = %0.3f\n', area);
elseif choice==2
radius = input('Enter Radius of Circle');
area = pi * radius^2;
fprintf('Area of Circle = %0.3f\n', area);
elseif choice==3
length = input('Enter Length of Rectangle :');
width=input('Enter width of Rectangle :');
area=length*width;
fprintf('Area of Circle = %0.3f\n', area);
end
end
Output:

BME 2013 Spring 2019 Exam 3 Matlab Review Sheet 1. Given the vector of patient body temperatures ...