Insert multiple txt files, and calculate their mean
Show older comments
Hi im new in Matlab, i am confused so i need your help! i have many data files (matrixes) on txt form (each file 160x3)
i was wondering how i insert multiple files and then calculate the mean of those files in a final file
thanks in advance!
Answers (2)
Fangjun Jiang
on 2 Aug 2011
0 votes
- Use a=importdata('TextData.txt') to import your data.
- Use mean() to calculate the mean value
- Use basic calculation c=a+b to add them all together based on your need.
- Use csvwrite() or dlmwrite() to write your data to a text file.
Walter Roberson
on 2 Aug 2011
0 votes
Categories
Find more on Data Import and Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!