22 Nisan 2010 Perşembe

Matlab file Matris Tanımlama

m14

%www.ethemsulan.com
subplot(2,2,1)
hold on
x=-10:0.01:10;
y=x;
plot(3/5*x,y)
y=0*x;
plot(x,y)
y=x;
plot(0*x,y)
y=3/5*x;
plot(x,y)
y=x;
plot(-3/5*x,y)
y=3/5*x;
plot(-x,y)
subplot(2,2,2)
hold on
axis([-20 25 -20 20])
hold on
ad=[-8 -6 -4 -6 -6 -8 -4 -6 -6;-6 -4 -6 -4 -2 -2 -2 -2 0]
ad=[ad;ones(1,size(ad,2))]
plot(ad(1,:),ad(2,:))
x1=-8:0.01:-4;
x2=-4:-0.01:-8;
y1=sqrt(4-abs(x1+6).^2)+2;
y2=-sqrt(4-abs(x1+6).^2)+2;
cem=[x1 x2;y1 y2];
plot(cem(1,:),cem(2,:))
cem=[cem;ones(1,size(cem,2))]
matris=[-1 -1.5 -1;-1 0 -3;0 0 1];
ncem=matris*cem;
nad=matris*ad;
plot(ncem(1,:),ncem(2,:)) ;               
plot(nad(1,:),nad(2,:))

Hiç yorum yok:

Yorum Gönder