bttg6 - s for x=-1:0.01:1; if x<0...

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

View Full Document Right Arrow Icon
% bttg6 % for x=-1:0.01:1; if x<0 y1=-x^2-4*x+exp(-3*x); hold on subplot 221 plot (x,y1) elseif x==0 y2=-x^2+5; hold on subplot 222 plot (x,y2,'*') elseif x>0 y3=-x+log(x); hold on subplot 223 plot(x,y3) end end e subplot 224
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: s for x=-1:0.01:1; if x&lt;0 y1=-x^2-4*x+exp(-3*x); hold on plot(t,y1,'-b') elseif x==0 y2=-x^2+5; hold on plot (x,y2,'*') elseif x&gt;0 y3=-x+log(x); hold on plot(x,y3,'-r') end end...
View Full Document

Ask a homework question - tutors are online