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:
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 ...
Problem: Given information about a circle, rectangle and a triangle, calculate the area of the shape from the information supplied. Write pseudocode to solve this problem and write a Python program that asks the user to input the required information for a shape and then calculates the area of the shape. Geometry Calculator 1. Calculate the Area of a Circle 2. Calculate the Area of a Rectangle 3. Calculate the Area of a Triangle 4. Quit Enter your choice (1...
Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture i sent is the first page 5. Write and save a function Sphere Area that accepts Radius as input argument, and returns SurfaceArea (4 tt r) as output argument. Paste the function code below. Paste code here 6. Validate your Sphere Area function from the command line, checking the results against hand calculations. Paste the command line code and results below. 7. Design an...