|
Joe Frank wrote:
> I have a function as below.. I need to read the files in this listed function and round
> one of the two files.
Your posting title requests that they be read "simultaneously", but you do not
mention that in the body of the message. If simultaneous is in fact required then
you will need to define what you mean by simultaneous. For example, do you have six
independent disk I/O controllers available to you so that the disk controllers could
each be servicing one file while the others are occupied, leading to simultaneous
in that sense? And are those I/O controllers attached to a system that can do six
simultaneous DMA (direct memory accesses) so that the data can be transferred from
the disk simultaneously? And do you have a real-time operating system available to
you so that the operating system really does issue all of the I/O and DMA commands
at the same time, rather than sequentially, one system call per read request?
> Its as below,
>
> function fileList = GetFilenameList()
>
> fileList(1).play = 'B:\abc101.csv';
> fileList(1).stop= 'B:\bcd121.csv';
>
> fileList(2).play = 'B:\ebs132.csv';
> fileList(2).stop= 'B:\dcm481.csv';
>
> fileList(3).play = 'B:\xya160.csv';
> fileList(3).stop= 'B:\dms151.csv';
>
> Now I need to read all the three files one by one..
I could 6 different files listed there, not three files??
> while doing so I will have to round off the values of only "PLAY" files.. How do I do this?
What do you mean by rounding off a file? And why not just loop
nfid = length(fileList);
outdata = cell(nfid, 2);
for K = 1:nfid
pfid = fopen(fileList(K).play, 'rt');
outdata{K,1} = textscan(pfid, SomeAppropriateFormatHere);
fclose(pfid);
sfid = fopen(fileList(K),stop, 'rt');
outdata{K,2} = textscan(sfid, SomeOtherAppropriateFormatHere);
fclose(sfid);
end
for K = 1:nfid
outdata{K,1} = AppropriateRoundingFunction(outdata{K,1});
end
|