You are on page 1of 1

PUNTO 1

g=9.81;

l=0.5;

B=pi/16;

t=[0.0:0.1:2];

z=B*cos(sqrt(g/l)*t);

plot(t,z)

PUNTO 2

x=[0.7 0.9 1.1 1.3 1.5 1.7 1.9 2]

y=[-0.196 -0.130 0.031 0.169 0.183 0.062 -0.104 -0.165]

n=3

polyfit(x,y,n)

n=1

polyfit(x,y,n)

t=[0:0.1:2]

b=p(1)+p(2)*t

plot(t,b)

You might also like