Professional Documents
Culture Documents
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = graficador_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
opcion = get(handles.data_popupmenu,'value');
switch opcion
case 1 % cuando el movimiento parabolico es de un angulo menor a
45 grados
v = 120
a = 26
g = 9.81
vox = v.*cos(a.*pi/180);
voy = v.*sin(a.*pi/180);
thmax = voy./g;
hmax = voy.^2/(2.*g);
ttot = 2.*thmax;
dmax=vox.*ttot;
tplot=linspace(0,ttot,200);
X = vox.*tplot;
Y = voy.*tplot-0.5.*g.*tplot.^2;
plot(X,Y)
grid
case 2 %cuando el movimiento parabolico es de un angulo de 45
grados
v = 120
a = 45
g = 9.81
vox = v.*cos(a.*pi/180);
voy = v.*sin(a.*pi/180);
thmax = voy./g;
hmax = voy.^2/(2.*g);
ttot = 2.*thmax;
dmax=vox.*ttot;
tplot=linspace(0,ttot,200);
X = vox.*tplot;
Y = voy.*tplot-0.5.*g.*tplot.^2;
plot(X,Y)
grid
case 3 %cuando movimiento parabolico con un angulo mayor de 45
grados
v = 120
a = 53
g = 9.81
vox = v.*cos(a.*pi/180);
voy = v.*sin(a.*pi/180);
thmax = voy./g;
hmax = voy.^2/(2.*g);
ttot = 2.*thmax;
dmax=vox.*ttot;
tplot=linspace(0,ttot,200);
X = vox.*tplot;
Y = voy.*tplot-0.5.*g.*tplot.^2;
plot(X,Y)
grid
case 4 %cuando el movimiento parabolico con una angulo menor de
90 grados
v = 120
a = 70
g = 9.81
vox = v.*cos(a.*pi/180);
voy = v.*sin(a.*pi/180);
thmax = voy./g;
hmax = voy.^2/(2.*g);
ttot = 2.*thmax;
dmax=vox.*ttot;
tplot=linspace(0,ttot,200);
X = vox.*tplot;
Y = voy.*tplot-0.5.*g.*tplot.^2;
plot(X,Y)
grid
case 5 % cuando el movimiento parabolico con un angulo de 90
grados
v = 120
a = 90
g = 9.81
vox = v.*cos(a.*pi/180);
voy = v.*sin(a.*pi/180);
thmax = voy./g;
hmax = voy.^2/(2.*g);
ttot = 2.*thmax;
dmax=vox.*ttot;
tplot=linspace(0,ttot,200);
X = vox.*tplot;
Y = voy.*tplot-0.5.*g.*tplot.^2;
plot(X,Y)
grid
case 6 %cuando el movimiento parabolico con un angulo mayor a 90
grados
v = 120
a = 110
g = 9.81
vox = v.*cos(a.*pi/180);
voy = v.*sin(a.*pi/180);
thmax = voy./g;
hmax = voy.^2/(2.*g);
ttot = 2.*thmax;
dmax=vox.*ttot;
tplot=linspace(0,ttot,200);
X = vox.*tplot;
Y = voy.*tplot-0.5.*g.*tplot.^2;
plot(X,Y)
grid
case 7 %cuando el movimiento parabolico es 180 grados
v = 120
a = 180
g = 9.81
vox = v.*cos(a.*pi/180);
voy = v.*sin(a.*pi/180);
thmax = voy./g;
hmax = voy.^2/(2.*g);
ttot = 2.*thmax;
dmax=vox.*ttot;
tplot=linspace(0,ttot,200);
X = vox.*tplot;
Y = voy.*tplot-0.5.*g.*tplot.^2;
plot(X,Y)
grid
end
end
function popupmenu2_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called
GUIDE MATLAB