Professional Documents
Culture Documents
Programas Matlab Consumo y Ruta Corta
Programas Matlab Consumo y Ruta Corta
1 NaN NaN
2 648 0
3 650.5000 0
4 650.5000 0
5 650.5000 0
6 650.5000 0
7 908.5000 5
8 908.5000 5
9 908.5000 5
10 908.5000 5
11 908.5000 5
12 648.5000 0
13 648.5000 0
14 648.5000 0
15 648.5000 0
16 651 0
17 651 0
18 651 0
19 651 0
20 1055 0
21 1055 0
22 1055 0
23 1055 0
24 1055 0
25 899.5000 3
26 899.5000 3
27 899.5000 3
28 899.5000 3
29 1113 6
30 1113 6
31 1113 6
32 1113 6
33 1.3445e+03 6
RPMS VSS
34 1.3445e+03 4
35 1.3445e+03 4
36 1.3445e+03 4
37 1.3445e+03 4
38 832.5000 4
39 832.5000 4
40 832.5000 4
41 832.5000 4
42 1.2325e+03 0
43 1.2325e+03 0
44 1.2325e+03 0
45 1.2325e+03 0
46 623.5000 0
47 623.5000 0
48 623.5000 0
49 623.5000 0
50 623.5000 0
51 640 0
52 640 0
53 640 0
54 640 0
55 653 0
56 653 0
57 653 0
58 653 0
59 641 0
60 641 0
61 641 0
62 641 0
63 641 0
64 748.5000 2
65 748.5000 2
66 748.5000 2
67 748.5000 2
RPMS VSS
68 662.5000 2
69 662.5000 2
70 662.5000 2
71 662.5000 2
72 637.5000 0
73 637.5000 0
74 637.5000 0
75 637.5000 0
76 637.5000 0
77 762.5000 0
78 762.5000 0
79 762.5000 0
80 762.5000 0
81 670 1
82 670 1
83 670 1
84 670 1
85 662 1
86 662 3
87 662 3
88 662 3
89 662 3
90 651 0
91 651 0
92 651 0
93 651 0
94 648 0
95 648 5
96 648 5
97 648 5
98 648 5
99 662.5000 4
100 662.5000 4
⋮
Clear temporary variables
clear opts
VSS = VSSf;
RPM = RPMSf;
figure, scatter(VSS,RPM,5);
xlabel("Velocidad (km/h)")
ylabel("rpm ");
r=VSS./RPM;
r(isnan(r)|isinf(r))= 0;
marcha = kmeans(r,7);
figure,scatter(VSS,RPM,5,marcha);
xlabel("Velocidad (km/h)")
ylabel("rpm ");
Consumo y Emisiones de CO2
Importación de la Información
opts = delimitedTextImportOptions("NumVariables", 142);
limpiar datos
ecxeldatos=ecxeldatos(8:end,:)
Conversión de temperatura de °F a °C
ecxeldatos.IAT=ecxeldatos.IAT-32/1.8;
Conversión de temperatura de °F a °C
ecxeldatos.ETC=ecxeldatos.ETC-32/1.8;
numero_muestras = 7793
tiempo_total=muestreo*numero_muestras
tiempo_total = 1.5586e+03
vec_tiempo=linspace(0,tiempo_total,numero_muestras)';
R = 8.3146
T=ecxeldatos.IAT+273.15 %K
T = 7793×1
350.3722
350.3722
350.3722
350.3722
350.3722
350.3722
350.3722
350.3722
350.3722
350.3722
⋮
n=(1000*P.*V)./(R.*T);
M_air = 28.97 % g/mlock
M_air = 28.9700
m_air=n*M_air; % g
rev=ecxeldatos.RPM;
m_af= (m_air.*rev)./(60*2)
m_af = 7793×1
2.5320
2.5320
2.5320
2.5320
2.4394
2.4394
2.4394
2.4394
2.4624
2.4624
⋮
AFR= 14.7
AFR = 14.7000
densidad = 737
consumo_total = trapz(vec_tiempo,V_fuel)
consumo_total = NaN
subplot(1,3,2);
boxplot(kml2);
title('60 km/h <= Velocidad < 90 km/h');
ylabel('Rendimiento de Consumo de Combustible (km/l)');
subplot(1,3,3);
boxplot(kml3);
title('Velocidad >= 90 km/h');
ylabel('Rendimiento de Consumo de Combustible (km/l)');
CO2_PL = 2310
CO2 = 7793×1
0.5399
0.5399
0.5399
0.5399
0.5201
0.5201
0.5201
0.5201
0.5250
0.5250
⋮
figure,scatter(ecxeldatos.Longitude,ecxeldatos.Latitude,5,CO2);
colorbar; % Añade la barra de colores
c = colorbar; % Captura el handle de la barra de colores
c.Label.String = 'CO2'; % Añade una etiqueta a la barra de colores
xlabel('LONGITUD')
ylabel('LATITUD')
title('Gráfico de Dispersión de Emisiones de CO2:');