Insert multiple txt files, and calculate their mean

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)

  1. Use a=importdata('TextData.txt') to import your data.
  2. Use mean() to calculate the mean value
  3. Use basic calculation c=a+b to add them all together based on your need.
  4. Use csvwrite() or dlmwrite() to write your data to a text file.

Categories

Asked:

on 2 Aug 2011

Community Treasure Hunt

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

Start Hunting!