plot con vectores de diferentes dimensiones
Publicado por Javier (2 intervenciones) el 21/03/2019 17:34:35
Buenas tardes. Estoy modificando un programa y necesito plotear unas gráficas. Quiero que la grafica correspondiente al trYAO_DF solo me represente el 3er punto, pero nose como hacer un vector de 3 posiciones que en la primera y segunda no muestre datos.
Al dejarlo así me da este error:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in TiempoRetraso_LoL_Paper_Densidad (line 468)
ley = [h2 h4 h6 h8];
gracias de antemano por las ayudas ;)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
x = [1 2 3];
exp1 =[tr7d6 tr15d2 trBASE];
trNARAY_ADF = [trA trB trC];
trYAO_DF = [trF];
trYAO_ADF = [trG trH trI];
subtightplot(1,2,1,0.1)
[h1] = plot(x,trNARAY_ADF,'go','markerSize',6);
hold on
[h2] = plot(x,trNARAY_ADF,'g','linewidth',1.5);
hold on
[h3] = plot(x,trYAO_DF,'bo','markerSize',6);
hold on
[h4] = plot(x,trYAO_DF,'b','linewidth',1.5);
hold on
[h5] = plot(x,trYAO_ADF,'ro','markerSize',6);
hold on
[h6] = plot(x,trYAO_ADF,'r','linewidth',1.5);
hold on
[h7] = plot(x,exp1,'ko','markerSize',6);
hold on
[h8] = plot(x,exp1,'k','linewidth',1.5);
hold on
ylim([-0.05 3]);
xlim([0.95 3.05]);
grid on
set(gca,'YTick',[0:0.5:3.5]);
set(gca,'XTick',[1.0 2.0 3.0]);
text(0.95,-0.18,'7.6','BackgroundColor',[.99 .99 .99],'FontName','Arial','FontSize',9);
text(1.95,-0.18,'15.2','BackgroundColor',[.99 .99 .99],'FontName','Arial','FontSize',9);
text(2.95,-0.18,'22.8','BackgroundColor',[.99 .99 .99],'FontName','Arial','FontSize',9);
ley = [h2 h4 h6 h8];
legend(ley,'Naray ADF','YAO DF','YAO ADF','Experimental');
ylabel('Ignition Delay [ms]','FontName','Arial','FontSize', 9);
xlabel('Operating Condition','FontName','Arial','FontSize', 9);
Al dejarlo así me da este error:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in TiempoRetraso_LoL_Paper_Densidad (line 468)
ley = [h2 h4 h6 h8];
gracias de antemano por las ayudas ;)
Valora esta pregunta
0