Académique Documents
Professionnel Documents
Culture Documents
LABORATORIO 1 TRABAJO 2
COMANDOS USADOS:
Plot: Si X e Y son ambos vectores, entonces deben tener la misma longitud. La función de diagrama representa Y
frente a X.
TITLE:Esta función MATLAB agrega el título especificado a los ejes o gráficos devueltos por el comando
Label: son componentes de la aplicación que usan texto para identificar otros componentes
GRAFICA ENSAYO VERSUS DISTANCIA
100
90
distancia ecorrida
80
70
60
50
1 2 3 4 5 6 7 8 9 10
NUMERO DE ENSAYO
LABORATORIO 1 TRABAJO 3
F=NUM./DEN
G=F(1,1)+(F(1,2))/(F(1,3)^2)
plot(X,F)
title( 'GRAFICA F CONTRA X' )
xlabel( 'VALOR DE X' )
ylabel( 'VALOR DE LA FUNCION' )
GRAFICA F CONTRA X
7
6
VALOR DE LA FUNCION
2
4 4.5 5 5.5 6 6.5 7
VALOR DE X
LABORATORIO 1 TRABAJO 4
% UNIVERSIDAD NACIONAL DEL CALLAO
% FACULTAD DE INGIENERIA ELECTRICA Y ELECTRONICA
% INGIENERIA ELECTRONICA
% CURSO:COMPUTACION APLICADA ALA INGIENERIA
% LABO 14
% 04/09/2017
% JARA MORALES STEFHANO GUILLERMO
% ENUNCIADO:
% obtenga los valores contenidos en el vector C
despues de ejecutarse las
% siguientes instrucciones, donde A y B contienen
los valores
% indicados.verifique susrespuestas usando comando
matlab
% A=[2 -1 5 0]
% B=[3 2 -1 4]
%a)C=A+B-3
%b)C=A./B
%c)C=2*A+A.^B
%d)C=2.^B+A
%e)C=2*B/3.*A
%*******************
A=[2 -1 5 0]
B=[3 2 -1 4]
C2=A+B-3
C3=A./B
C4=2*A+A.^B
C5=2.^B+A
C6=2*B/3.*A
LABORATORIO 1 TRABAJO 5
polinomio-lineal/lineal polinomio-log/lineal
15000 15000
10000 10000
y
y
5000 5000
0 0
0 10 20 30 40 50 -1 0 1 2
10 10 10 10
5
polinomio-lineal/log 5
polinomio-log/log
10 10
y
0
y 0
10 10
0 10 20 30 40 50 -1 0 1 2
10 10 10 10
x x
COMANDOS USADOS :
Subplot: Esta función MATLAB divide la figura actual en una cuadrícula m-by-n y crea ejes en la
posición especificada por p.
LABORATORIO 1 TRABAJO 6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%
start_time=input('teclee tiempo inicial(ensegundos):');
end_time=input('teclee tiempo final (max 120 segundos ):');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
time_incre=(end_time-start_time)/99
time=start_time:time_incre:end_time;
velocity=0.00001*time.^3-0.00488*time.^2+0.75795*time+181.3566
aceleration=3-0.000062*velocity.^2
subplot(2,1,1),plot(time,velocity),title('velocidad'),...
ylabel('metros/segundo'),grid,...
subplot(2,1,2),plot(time,aceleration )
*COMENTARIO GENERAL: