Computing with multiple files

1 view (last 30 days)
Chris Martin
Chris Martin on 20 Aug 2014
Edited: dpb on 20 Aug 2014
Dear All,
I am having time series data of around 100 stations, I need to calculate mean, detrending and have to save the output to a file for each station. How to proceed actually I am new to matlab. I want in such a way that by giving the station name, it will create the result.I am attaching one time series for example:.....where first column is the time, second is the position and third is the error. Also please tell me how to calculate mean and detrending with error...
2003.04246 1.36996 0.00357
2003.04520 1.37082 0.00309
2003.04794 1.36922 0.00332
[sizable chunk elided for brevity--dpb]
...
2006.10000 1.45960 0.00315
2006.10274 1.46003 0.00326
2006.10548 1.46138 0.00504
  1 Comment
dpb
dpb on 20 Aug 2014
Edited: dpb on 20 Aug 2014
Don't paste such large sample datasets -- 5 or 10 lines is plenty to indicate the format...the rest is just noise.
If there's reason for something peculiar in the dataset that requires it, use the paperclip to attach a file instead of pasting so much text.

Sign in to comment.

Answers (1)

dpb
dpb on 20 Aug 2014
...how to calculate mean and detrending with error...
doc mean % for a)
Don't know what ...detrending with error means? For detrending
doc polyfit % and friends for linear trends
For processing multiple files, see the FAQ
I most strongly recommend to your attention the dir solution if you can make a suitable naming convention to return the files desired with a judicious choice of wildcard in the argument.

Categories

Find more on Scope Variables and Generate Names 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!