ComputerProblem1 - 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 =

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

This note was uploaded on 01/24/2011 for the course ENGR 1020 taught by Professor Keith during the Spring '10 term at Utah State University.

Ask a homework question - tutors are online