Info

This question is closed. Reopen it to edit or answer.

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

1 view (last 30 days)
vaddadi swamy
vaddadi swamy on 9 Jul 2019
Closed: MATLAB Answer Bot on 20 Aug 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))

Answers (1)

Rik
Rik on 9 Jul 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!