Generar integral (Area Bajo la cuerva teniendo como origen un txt)
Publicado por Addison (15 intervenciones) el 21/11/2017 21:34:12
Necesito ayuda para poder generar la integral de dos señales, los datos estan en un archivo txt, el sistema abre el archivo pero necesito integrar estas señales, en el txt adjunto, aparencen 2 columnas y estan separadas por coma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
linea = fgetl(id); % lee toda la línea
fclose(id); % cierra el archivo leído
linea;
a=importdata([ruta, archivo]);
A=a.data;
for i=1:size(A,2);
subplot(4,1,1);
plot (A(:,1),'color', rand(1,3));
title(linea,'fontsize',18, 'FontWeight','bold','Color','b');
axis([0 inf 190 inf]);
subplot(4,1,2);
plot (A(:,2))
axis([0 inf 190 inf])
end
RMS1=rms(A(:,1))
RMS2=rms(A(:,2))
Z1 = cumtrapz(A(:,1))
Z2 = cumtrapz(A(:,2))
subplot(4,1,3);
plot (A(:,1))
axis([0 inf 190 inf])
subplot(4,1,4);
plot (A(:,2))
axis([0 inf 190 inf])
- 2-columnas.zip(1,4 KB)
Valora esta pregunta
0