I need to use MATLAB to solve this problem httpwwwcheggcomho

I need to use MATLAB to solve this problem.

http://www.chegg.com/homework-help/A-First-Course-in-Differential-Equations-with-Modeling-Applications-10th-edition-chapter-3.2-problem-20E-solution-9781111827052

and I have no idea how to start it

All I got is

-----------------------------------------------------------------------------------

function room( h, tmax )
%Type in room(0.01, 4) if you want to have step size .01 and 4 hours the
%future.

n=1
t=0
u=75
% u= temp

while t < tmax
TimeTable(n)=t
TempTable(n)=u
n=n+1
t=t+h
u=u+h*(0.08*(101.5+6.5*cos(pi*(t-4)/12)-u))
end
plot (TimeTalbe,TempTable)

end

-----------------------------------------------------------------------

m file should be looks like this.

please help

Solution

Use the Editor section features to evaluate the file section-by-section.
This method helps you to experiment with, debug, and fine-tune your program.
You can navigate among sections, and evaluate each section individually.
To evaluate a section, it must contain all the values it requires, or the values must exist in the MATLAB workspace.
The section evaluation features run the section code currently highlighted in yellow.
MATLAB does not automatically save your file when evaluating individual code sections.
The file does not have to be on your search path.
Operation 1) Run the code in the current section.  
Instructions :- Place the cursor in the code section.
On the Editor tab, in the Run section, click and Run Section
Operation 2) Run the code in the current section, and then move to the next section.  
Instructions :- Place the cursor in the code section.
On the Editor tab, in the Run section, click and Run and Advance.
Operation 3) Run all the code in the file.  
Instructions :- Type the saved script name in the Command Window.
On the Editor tab, in the Run section, click and Run

I need to use MATLAB to solve this problem. http://www.chegg.com/homework-help/A-First-Course-in-Differential-Equations-with-Modeling-Applications-10th-edition-

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site