Vous êtes sur la page 1sur 4

clear all;close all;clc

%format short g
% format long

x=1:1:12 ;
y=1:1:8 ;
[X,Y]=meshgrid(x,y);
plot(X,Y,X',Y','linewidth',3,'color',[1 0 0])
% ----------------
hold on

u=[2 2 3 3];
v=[6 7 7 6];
fill(u,v,'y') %fill3, patch

u1=[3 3 4 4];
v1=[6 7 7 6];
fill(u1,v1,'y') %fill3, patch

u2=[4 4 5 5];
v2=[6 7 7 6];
fill(u2,v2,'y') %fill3, patch

u3=[5 5 6 6];
v3=[6 7 7 6];
fill(u3,v3,'y') %fill3, patch

u4=[6 6 7 7];
v4=[6 7 7 6];
fill(u4,v4,'y') %fill3, patch

u5=[7 7 8 8];
v5=[6 7 7 6];
fill(u5,v5,'y') %fill3, patch

u6=[8 8 9 9];
v6=[6 7 7 6];
fill(u6,v6,'y') %fill3, patch

u7=[9 9 10 10];
v7=[6 7 7 6];
fill(u7,v7,'y') %fill3, patch

u8=[10 10 11 11];
v8=[6 7 7 6];
fill(u8,v8,'y') %fill3, patch

u9=[3 3 4 4];
v9=[5 6 6 5];
fill(u9,v9,'y') %fill3, patch

u10=[4 4 5 5];
v10=[5 6 6 5];
fill(u10,v10,'y') %fill3, patch
u11=[5 5 6 6];
v11=[5 6 6 5];
fill(u11,v11,'y') %fill3, patch

u12=[6 6 7 7];
v12=[5 6 6 5];
fill(u12,v12,'y') %fill3, patch

u13=[7 7 8 8];
v13=[5 6 6 5];
fill(u13,v13,'y') %fill3, patch

u14=[8 8 9 9];
v14=[5 6 6 5];
fill(u14,v14,'y') %fill3, patch

u15=[9 9 10 10];
v15=[5 6 6 5];
fill(u15,v15,'y') %fill3, patch

u16=[4 4 5 5];
v16=[4 5 5 4];
fill(u16,v16,'y') %fill3, patch

u17=[5 5 6 6];
v17=[4 5 5 4];
fill(u17,v17,'y') %fill3, patch

u18=[6 6 7 7];
v18=[4 5 5 4];
fill(u18,v18,'y') %fill3, patch

u19=[7 7 8 8];
v19=[4 5 5 4];
fill(u19,v19,'y') %fill3, patch

u20=[8 8 9 9];
v20=[4 5 5 4];
fill(u20,v20,'y') %fill3, patch

u21=[5 5 6 6];
v21=[3 4 4 3];
fill(u21,v21,'y') %fill3, patch

u22=[6 6 7 7];
v22=[3 4 4 3];
fill(u22,v22,'y') %fill3, patch

u23=[7 7 8 8];
v23=[3 4 4 3];
fill(u23,v23,'y') %fill3, patch

u24=[6 6 7 7];
v24=[2 3 3 2];
fill(u24,v24,'y') %fill3, patch

hold on
p1=-2;
p2=-4;
p3=-2;
p4=-2;
p5=-1;
p6=-2;
p7=-3;
p8=-4;
p9=-4;
p10=-6;
p11=-3;
p12=-2;
p13=-2;
p14=-3;
p15=-2;
p16=-4;
p17=6;
p18=13;
p19=-2;
p20=-5;
p21=-4;
p22=17;
p23=8;
p24=5;
p25=21;

text(2.35,6.5,['$ = ', num2str(p1)] )


text(3.35,6.5,['$ = ', num2str(p2)] )
text(4.35,6.5,['$ = ', num2str(p3)] )
text(5.35,6.5,['$ = ', num2str(p4)] )
text(6.35,6.5,['$ = ', num2str(p5)] )
text(7.35,6.5,['$ = ', num2str(p6)] )
text(8.35,6.5,['$ = ', num2str(p7)] )
text(9.35,6.5,['$ = ', num2str(p8)] )
text(10.35,6.5,['$ = ', num2str(p9)] )
text(3.35,5.5,['$ = ', num2str(p10)] )
text(4.35,5.5,['$ = ', num2str(p11)] )
text(5.35,5.5,['$ = ', num2str(p12)] )
text(6.35,5.5,['$ = ', num2str(p13)] )
text(7.35,5.5,['$ = ', num2str(p14)] )
text(8.35,5.5,['$ = ', num2str(p15)] )
text(9.35,5.5,['$ = ', num2str(p16)] )
text(4.35,4.5,['$ = ', num2str(p17)] )
text(5.35,4.5,['$ = ', num2str(p18)] )
text(6.35,4.5,['$ = ', num2str(p19)] )
text(7.35,4.5,['$ = ', num2str(p20)] )
text(8.35,4.5,['$ = ', num2str(p21)] )
text(5.35,3.5,['$ = ', num2str(p22)] )
text(6.35,3.5,['$ = ', num2str(p23)] )
text(7.35,3.5,['$ = ', num2str(p24)] )
text(6.35,2.5,['$ = ', num2str(p25)] )
title('Diagrama del pit con L&G 2D')
xlabel('x')
ylabel('y')

Vous aimerez peut-être aussi