ComputerProblem1 - u %A(t)= (1/2) * (M + m) - (1/2) * (M -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Zeljko Divkovic %Computer Problem #1 % function udot=udpol(t,u) f %t = the number of hours past midnight; M = 49; % 49 Degrees m = 21; % 21 Degrees w0= 3.14/12; %Ensures the period of this function is 24 hours tspan = [0 24]; %Tiem span to integrate over u0 = [0; u(0)]; %initial conditions
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: u %A(t)= (1/2) * (M + m) - (1/2) * (M - m)*cos(w0*(t-3)); %Ambient Temperature A(t) = 35 - 14*cos(w0*(t-3)); %u(0) = u0 %A(h) = (du/dh + k*u(h))/k; % [t,u] = ode45(@udpol), tspan, u0); plot(t,(u(:1), t,u(:2),'--')...
View Full Document

Ask a homework question - tutors are online