You are on page 1of 7

clear;

clc;
fprintf('DIGITE DEL (1-3)\n');
fprintf('1.- MRU\n');
fprintf('2.- MRUA\n');
fprintf('3.- MP\n');
fprintf('seleccione el proceso que se desea hallar\n');

n=input('->');
switch n
case 1
disp('MRU')
disp('--DIGITE (1-3)-- ')
fprintf('1.- DISTANCIA \n')
fprintf('2.- VELOCIDAD \n')
fprintf('3.- TIEMPO \n')
a=input('->');
switch a
case 1
disp('introducir velocidad en m/s:')
v=input('->');
disp('introducir tiempo en s ')
t=input('->');
d=v*t;
disp('entonces la distancia en metros seria : ')
disp(d)

case 2
disp('introducir distancia en m:')
d=input('->');
disp('introducir tiempo en s ')
t=input('->');
v=d/t;
disp('entonces la velocidad en m/s seria : ')
disp(v)
case 3
disp('introducir velocidad en m/s:')
v=input('->');
disp('introducir distancia en m :')
d=input('->');
t=d/v;
disp('entonces el tiempo en segundos seria : ')
disp(t)

end

case 2
disp('MRUA')
disp('--DIGITE OPCION(1-5)--')
fprintf('1.- NO HAY DISTANCIA .\n')
fprintf('2.- NO HAY VELOCIDAD FINAL .\n')
fprintf('3.- NO HAY VELOCIDAD INICIAL .\n')
fprintf('4.- NO HAY TIEMPO .\n')
fprintf('5.- NO HAY ACELERACION .\n')
b=input('->');
switch b
case 1
disp('--digite 1-4-- ')
fprintf('1.- HALLAR VELOCIDAD FINAL\n')
fprintf('2.- HALLAR VELOCIDAD INICIAL \n')
fprintf('3.- HALLAR ACELERACION \n')
fprintf('4.- HALLAR TIEMPO \n')
z=input('->');
switch z
case 1
disp('digitar velocidad inicial en m/s :')
v=input('->');
disp('digitar aceleracion en m/s^2')
a=input('->');
disp('digitar tiempo s ');
s=input ('->');
b=v+a*s;
disp('entinces la velocidad final seria')
disp(b)
case 2
disp('digitar velocidad final en m/s')
b=input('->');
disp('digitar aceleracion en m/s^2 ')
a=input('->');
disp('digitar tiempo en s ')
s=input('->')
v=b-a*s;
disp('entonces la velocidad inicial es :')
disp(v);
case 3
disp('digitar velocidad final')
b=input('->');
disp('digitar velocidad inicial')
v=input('->');
disp('digitar tiempo ')
s=input('->');
a=(b-v)/s;
disp('entonces la aceleracion es ')
disp(a);
case 4
disp('digitar velocidad final')
b=input('->');
disp('digitar velocidad inicial')
v=input('->');
disp('digitar aceleracion ')
a=input('->');
s=(b-v)/a;
disp('entonces la aceleracion es ')
disp(s);

end

case 2
disp('--digite 1-4-- ')
fprintf('1.- HALLAR DISTANCIA \n')
fprintf('2.- HALLAR TIEMPO \n')
fprintf('3.- HALLAR ACELERACION \n')
fprintf('4.- HALLAR VELOCIDAD INICIAL \n')
p=input('->');
switch p
case 1
disp('digitar velocidad inicial')
v=input('->');
disp('digitar aceleracion ')
a=input('->');
disp('digitar tiempo en s')
s=input('->');
d=v*t+(a/2)*t^2;
disp('entonces la distancia es .')
disp(d)
case 2
disp('digitar distancia ')
d=input('->');
disp('digitar aceleracion ')
a=input('->');
disp('digitar velocidad inicial en m/s')
v=input('->');
t = (-v+(sqrt(v^2+2*a*d)))/a;
l = (-v-(sqrt(v^2+2*a*d)))/a;
disp('entonces el tiempo en segundos es .')
disp(t)
disp(l)
case 3
disp('digitar velocidad inicial')
v=input('->');
disp('digitar distancia ')
d=input('->');
disp('digitar tiempo en s')
s=input('->');
a=2*(d-v*t)/t^2;
disp('entonces la aceleracion en m/s^2 ')
disp(a)
case 4
disp('digitar distancia')
d=input('->');
disp('digitar aceleracion ')
a=input('->');
disp('digitar tiempo en s')
s=input('->');
v=(d+a*t^2)/2*t;
disp('entonces la velocidad inicial ')
disp(v)
end

case 3
disp('--digite 1-4-- ')
fprintf('1.- HALLAR DISTANCIA \n')
fprintf('2.- HALLAR TIEMPO \n')
fprintf('3.- HALLAR ACELERACION \n')
fprintf('4.- HALLAR VELOCIDAD FINAL \n')
q=input('->');
switch q
case 1
disp('digitar velocidad final')
b=input('->');
disp('digitar aceleracion ')
a=input('->');
disp('digitar tiempo en s')
s=input('->');
d=b*t+(a/2)*t^2;
disp('entonces la distancia es .')
disp(d)
case 2
disp('digitar distancia ')
d=input('->');
disp('digitar aceleracion ')
a=input('->');
disp('digitar velocidad final en m/s')
v=input('->');
t = (-b+(sqrt(b^2+2*a*d)))/a;
l = (-b-(sqrt(b^2+2*a*d)))/a;
disp('entonces el tiempo en segundos es .')
disp(t)
disp(l)
case 3
disp('digitar velocidad final')
b=input('->');
disp('digitar distancia ')
d=input('->');
disp('digitar tiempo en s')
s=input('->');
a=2*(d-b*t)/t^2;
disp('entonces la aceleracion en m/s^2 ')
disp(a)
case 4
disp('digitar distancia')
d=input('->');
disp('digitar aceleracion ')
a=input('->');
disp('digitar tiempo en s')
s=input('->');
b=(d+a*t^2)/2*t;
disp('entonces la velocidad final ')
disp(b)
end

case 4
disp('--digitar 1-4--')
fprintf('1.- HALLAR VELOCIDAD FINAL .\n')
fprintf('2.- HALLAR VELOCIDAD INICIAL.\n')
fprintf('3.- HALLAR ACELERACION\n')
fprintf('4.- HALLAR DISTANCIA \n')
k=input('->');
switch k
case 1
disp('digitar velocidad inicial .')
v=input('->');
disp('digitar aceleracion .')
a=input('->');
disp('digitar distancia .')
d=input('->')
b=sqrt(v^2 + 2*a*d);
disp('entonces la velocidad final es :')
disp(b)
case 2
disp('digitar velocidad final.')
b=input('->');
disp('digitar aceleracion .')
a=input('->');
disp('digitar distancia .')
d=input('->')
v=sqrt(b^2 - 2*a*d);
disp('entonces la velocidad inicial es :')
disp(v)
case 3
disp('digitar velocidad final . ')
b=input('->');
disp('digitar velocidad inicial .')
v=input('->');
disp('digitar distancia .')
d=input('->');
a=(b^2 - v^2)/2*d;
disp('entonces la aceleracion es ')
disp(a)
case 4
disp('digitar velocidad final . ')
b=input('->');
disp('digitar velocidad inicial .')
v=input('->');
disp('digitar aceleracion .')
a=input('->');
d=(b^2 - v^2)/2*a;
disp('entonces la aceleracion es ')
disp(d)
end

case 5
disp('---digitar 1-4---')
fprintf('1.- HALLAR VELOCIDAD INICIAL .\n')
fprintf('2.- HALLAR VELOCIDAD FINAL .\n')
fprintf('3.- HALLAR TIEMPO \n')
fprintf('4.- HALLAR DISTANCIA \n')
h=input('->');
switch h
case 1
disp('digitar la velocidad final .')
b=input('->');
disp('digitar la distancia .')
d=input('->');
disp('digitar el tiempo .')
s=input('->');
v=((2*d)/s)-b;
disp('entonces la velocidad inicial sera :')
disp(v)
case 2
disp('digitar la velocidad inicial .')
v=input('->');
disp('digitar la distancia .')
d=input('->');
disp('digitar el tiempo .')
s=input('->');
b=((2*d)/s)-v;
disp('entonces la velocidad final sera : ')
disp(b);
case 3
disp('digitar velocidad inicial .')
v=input('->');
disp('digitar velocidad final .')
b=input('->');
disp('digitar distancia .')
d=input('->');
s=(2*d)/(v+b);
disp('entonces el tiempo es igual a :')
disp(s)
case 4
disp('digitar velocidad inicial .')
v=input('->');
disp('digitar velocidad final .')
b=input('->');
disp('digitar tiempo .')
s=input('->');
d=s*(v+b)/(2*d);
disp('entonces el tiempo es igual a :')
disp(d)
end

end

case 3
disp('----MOVIMENTO PARABOLICO----')
fprintf('1.- HALLAR TIEMPO DE SUBIDA O BAJADA, TIEMPO DE VUELO
Y ALTURA MAXIMA :\n')
fprintf('2.- HALLAR DESPLAZAMIENTO HORIZONTAL \n')
fprintf('3.- HALLAR VELOCIDAD EN UN PUNTO DE LA PARABOLA \n')
disp('--digite del 1-3--')
u=input('->');
switch u
case 1
disp('digitar velocidad en el eje y ')
y=input('->');
t=y/(9.8);
disp('entonces el tiempo de subida o bajada es ')
disp(t)
v=2*t;
disp('el tiempo de vuelo')
disp(v)
m=t^2;
disp('y la altura máxima es')
disp(m)
case 2
disp('digite la velocidad en el eje x ')
x=input('->');
disp('digite la velocidad en el eje y ')
y=input('->');
g=x*(2*y)/9.8;
disp('entonces el desplazamiento horizontal es ')
disp(g)
case 3
disp('digite la velocidad en el eje x del punto')
x=input('->');
disp('digite la velocidad en el eje y del punto')
y=input('->');
p=sqrt(x^2 + y^2);
disp('entonces la velocidad en ese punto de la
parábola es ')
disp(p)

end

end

You might also like