9 Nisan 2010 Cuma

Matlab ile Bardak Çizme Örneği

m8

%www.ethemsulan.com
close all
clear all
clc
xmin=100;
ymin=100;
axis([-xmin xmin -ymin ymin]);
hold on 
ob_1=[10 10 20 20
    20 10 10 20
    1 1 1 1];
t=0:0.01:2*pi;
x=sqrt(25).*sin(t)+15;
y=sqrt(25).*cos(t)+20;
ob_2=[x;y;ones(1,size(x,2))];
plot(ob_1(1,:),ob_1(2,:),'linewidth',3);
hold on
plot(x,y,'linewidth',3,'color','red')
a=3;
b=2.5;
S=[a 0 0;
   0 b 0;
   0 0 1]
ob_1_new=S*ob_1
ob_2_new=S*ob_2
plot(ob_1_new(1,:),ob_1_new(2,:))
hold on
plot(ob_2_new(1,:),ob_2_new(2,:))

Hiç yorum yok:

Yorum Gönder