How to multiply a number of files by a single file ??
Ältere Kommentare anzeigen
Dear All,
I am having monthly data files(2002-2012) with three columns lat lon and value. I need to multiply these monthly data files by a scaling factor file which also a three column file (lat lon and value).Data files need to be multiplied by values of the scaling factor file, Please help me
Antworten (1)
Walter Roberson
am 11 Jan. 2016
0 Stimmen
5 Kommentare
Chris Martin
am 12 Jan. 2016
Walter Roberson
am 12 Jan. 2016
Read your scale factor file. Then use the techniques from the link above to read one monthly data file at a time, use .* to do the multiplications, and then do whatever with the result.
Chris Martin
am 13 Jan. 2016
Walter Roberson
am 13 Jan. 2016
Does your situation match the case "If the files that you want to process are sequentially numbered", or does your situation match the case "f you want to process all the files whose name matches a pattern in a directory" ? When you visited that link I posted about How can I process a sequence of files, do the three sample blocks of code there show up empty?
Guillaume
am 13 Jan. 2016
Maybe, it would be better to turn the question around and ask Chris, which step is causing him problem:
- read the scaling file
- get or create the list of files to process
- iterate over each file and
- read the file
- multiply by the scaling file
- write to a new file
Kategorien
Mehr zu Standard File Formats finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!