it is a Matlab Programming Question A can of your favorite b

it is a Matlab Programming Question

A can of your favorite beverage is placed in a fridge. You want to determine how many minutes it will take to cool your beverage from the initial temperature to the fridge temperature of 10 degrees Celsius. Write a function to complete the following tasks: Use the appropriate input mechanism to allow the user to input the initial temperature (in degrees Celsius) of the beverage. Find the number of minutes it will take to cool your beverage to a temperature less than or equal to 10 degrees Celsius. Based on the insulation properties of a can and the thermal properties of a fridge, assume that the temperature of the beverage is reduced by 8% of the current temperature for each minute the can is in the fridge. Count the number of minutes needed to cool the beverage. Use the appropriate output mechanism to output the number of minutes and the final temperature. Test Case 1: Test the function with an initial temperature of 25 degrees Celsius. Test Case 2: Test the function with one other initial temperature. Solution for initial temperature of 25 degrees Celsius: Minutes = 11 Temperature = 9.9909

Solution

Matlab codes;

%clearing window, variables and figures
clear all;
close all;
clf;
clc;
t=input(\'Enter the temperature of the bottle:\');
min=0;
while(t>=10)
t=t-t*8/100;
min=min+1;
end
fprintf(\'\ Minutes:%d\',min);
fprintf(\'\ Temperature:%d\ \',t);

Result;

Enter the temperature of the bottle:25

Minutes:11
Temperature:9.990934e+00

Result2;

Enter the temperature of the bottle:30

Minutes:14
Temperature:9.335785e+00

it is a Matlab Programming Question A can of your favorite beverage is placed in a fridge. You want to determine how many minutes it will take to cool your beve

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site