
Problemas Subplot en bucle for
Publicado por Ignacio (26 intervenciones) el 18/03/2014 13:18:14
Hola, trato de hace un subplot en un bucle for que vaya graficando a cada vuelta en la posición correspondiente. He probado con ejemplos de por ahí y funciona pero no sé por qué el mío no. Os adjunto el código
El error que me aparece es :
Error using .*
Integers can only be combined with integers of the same class, or scalar doubles.
Error in subplot (line 335)
inset = inset .* [width, height, width, height];
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
MVC=[1133,1652,812,818,810,833,939,1614]; % En GUI se pueden meter valores manualmente
load('Zalain.mat')
CH=datablock1.data;
L=length(CH(:,1));
for i=1:L %Normalizamos los valores de las señales con respecto a la MVC
for j=1:channels
CHNorm(i,j)=CH(i,j)*100/MVC(j);
end
end
c=[0,14,30,50,70,100];%Niveles de porcentaje de trabajo de corte
f=round(channels/4);
l=length(c);
for i=1:channels
H(1:l,i)=histc(CHNorm(:,i),c);
subplot (f,4,i) %AQUÍ ES DONDE ME DA ERROR
plot(H(:,i))
end
El error que me aparece es :
Error using .*
Integers can only be combined with integers of the same class, or scalar doubles.
Error in subplot (line 335)
inset = inset .* [width, height, width, height];
Valora esta pregunta


0