solution16

solution16 - % Assignment 16 solutions % Prob 1 % method in...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
% Assignment 16 solutions % Prob 1 % method in which all three curves are plotted with one plot command x=-1:0.01:1; y=0:1:3; [X,Y]=meshgrid(cos(pi*x/2),exp(-0.25*y)); T=20*X.*Y; plot(x,T(1,:),'-k',x,T(2,:),'--k',x,T(3,:),':',x,T(4,:),'-.k') xlabel('x'), ylabel('T') legend('y=0','y=1','y=2','y=3') title('Temperature Distribution in a Semi-Infinite Slab')
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
% Assignment 16 solutions % Prob 1b % method in which the hold command is used x=-1:0.01:1; y=0:1:3; [X,Y]=meshgrid(cos(pi*x/2),exp(-0.25*y)); T=20*X.*Y; plot(x,T(1,:),'-k') hold on plot(x,T(2,:),'--k') plot(x,T(3,:),':k') plot(x,T(4,:),'-.k') xlabel('x'), ylabel('T') legend('y=0','y=1','y=2','y=3') title('Temperature Distribution in a Semi-Infinite Slab') hold off
Background image of page 2
% Prob 1c % method in which the 'line' command is used x=-1:0.01:1; y=0:1:3; [X,Y]=meshgrid(cos(pi*x/2),exp(-0.25*y)); T=20*X.*Y; plot(x,T(1,:),'-k') line(x,T(2,:),'Linestyle', '--','color','k') line(x,T(3,:),'Linestyle',':','color','k') line(x,T(4,:),'Linestyle','-.','color','k')
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/27/2010 for the course ENME 271 taught by Professor Marks during the Summer '08 term at Maryland.

Page1 / 8

solution16 - % Assignment 16 solutions % Prob 1 % method in...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online