Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to read N number of .log files at a time?

1 vue (au cours des 30 derniers jours)
vaddadi swamy
vaddadi swamy le 9 Juil 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
I have 4_0.log , 4_5.log, 5_0.log, 5_5.log..... files. How to read all these files and how to make average of the data each individual file?
clc
clear all
close all
format long
W = dlmread('10_0.log','%f',5,1);
E = 10.0
W = sum(W)/(numel(W))

Réponses (1)

Rik
Rik le 9 Juil 2019
Generate the file names with sprintf and loop over the files.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by