prog2b_2533_sp11

prog2b_2533_sp11 - line4y=[1 8]; line5x=[1 7]; line5y=[5 5];

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

View Full Document Right Arrow Icon
% CSC 2533 % Spring 2011 % Assignment 2b x1=1:.001:3; g1=(x1+9)./(1+sin(pi/4*(x1-1))); h1=(x1-1).^4./(x1.^2-2*x1+5); x2=3:.001:5; g2=6+(x2-1).*sin(pi/4*(x2-3)); h2=1+sqrt(1+(x2-3).^3); x3=5:.001:7; g3=8+1/2*(x3-7).^2; h3=1+(x3-2).*cos(pi/4*(x3-5)); line1x=[1 1]; line1y=[0 10]; line2x=[3 3]; line2y=[2 6]; line3x=[5 5]; line3y=[4 10]; line4x=[7 7];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: line4y=[1 8]; line5x=[1 7]; line5y=[5 5]; plot(x1,g1,'g',x1,h1,'g',x2,g2,'r',x2,h2,'r',x3,g3,'b',x3,h3,'b',line1x,line1y,'m', ... line2x,line2y,'k--',line3x,line3y,'k--',line4x,line4y,'m',line5x,line5y,'c--') ; axis([0 8 -1 11]); set(gca,'ytick',-1:11); xlabel('x'); ylabel('y'); title('Assignment 2b');...
View Full Document

Ask a homework question - tutors are online