Conversion to double from struct is not possible.
Mostrar comentarios más antiguos
Hello everyone,
I'm a matlab beginner. I imported txt files to matlab whitout problem, so I want to remove all DC noise of them in a loop. Could someone help me to reach this goal?
Filenames = dir('*mat');
numfiles1 = length(Filenames);
EEGSinDC = [];
for i = 1 : numfiles1
load (Filenames(i).name);
EEGSinDC(i) = Filenames(i);
EEGsinDC = EEGSinDC(i) - mean(EEGSinDC(i));
end
Conversion to double from struct is not possible.
2 comentarios
James Tursa
el 30 de Jul. de 2020
What variables are in the mat files?
Stephen23
el 30 de Jul. de 2020
Víctor Magdaleno's incorrectly posted "Answer" moved here:
registro is the variable

Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 6 de Ag. de 2020
Filenames = dir('*mat');
numfiles1 = length(Filenames);
EEGSinDC = cell(numfiles1, 1);
for i = 1 : numfiles1
filedata = load(Filenames(i).name);
EEGSinDC{i} = filedata.registro - mean(filedata.registro);
end
1 comentario
Víctor Magdaleno
el 8 de Ag. de 2020
Categorías
Más información sobre Workspace Variables and MAT Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!