f



is matlab right way to change text format?

Hello,

I'm trying to take data input and rearrange it in a particular way to
have headings, new columns, etc. They have also asked that I layout
the output with a specific number of spaces between columns,
headings, etc. Is matlab a good option for this? All of my
experience with matlab is numeric up to this point, so the way I
picture output is in matrix form, and I'll have many sections with
varying # of columns. Should I just isolate sections into particular
matrices and then print out the matrices one after another in the
output file (to make it look like one file)?

Thanks!
0
geomegs
3/22/2005 6:07:38 PM
comp.soft-sys.matlab 211089 articles. 13 followers. lunamoonmoon (258) is leader. Post Follow

8 Replies
275 Views

Similar Articles

[PageSpeed] 29

geomegs wrote:
> 
> Hello,
> 
> I'm trying to take data input and rearrange it in a particular way to
> have headings, new columns, etc. They have also asked that I layout
> the output with a specific number of spaces between columns,
> headings, etc. Is matlab a good option for this? All of my
> experience with matlab is numeric up to this point, so the way I
> picture output is in matrix form, and I'll have many sections with
> varying # of columns. Should I just isolate sections into particular
> matrices and then print out the matrices one after another in the
> output file (to make it look like one file)?

Matlab wouldn't be my first choice for such a task if that's all you're
doing...

What other tools do you have/know?  I'm thinking of Perl or the like...
0
dpbozarth (544)
3/22/2005 6:15:10 PM
Hello,

They asked me if I could do it in matlab so anyone could do it on his
or her own computer. Right now it's in fortran. There are 2
programs - one is to convert the raw data into a specific format with
headers and separate sections. The second program processes the data
mathematically, using the output from the first program.

I was wondering if I should use something else as well, but it needs
to be easily compiled on different machines. I was thinking maybe if
I break the sections into separate matrices and just view them that
way...I don't know.

Thanks!
0
geomegs (5)
3/22/2005 7:10:29 PM
Sorry, I forgot to add I know php also.
0
geomegs (5)
3/22/2005 7:12:41 PM
geomegs wrote:
> 
> Hello,
> 
> They asked me if I could do it in matlab so anyone could do it on his
> or her own computer. Right now it's in fortran. There are 2
> programs - one is to convert the raw data into a specific format with
> headers and separate sections. The second program processes the data
> mathematically, using the output from the first program.

Don't ken precisely...if I had a working Fortran routine(s) it would
seem simple enough to make any mods there required and distribute an
executable to whoever needs it...so must be some other requirement
behind the request...

> I was wondering if I should use something else as well, but it needs
> to be easily compiled on different machines. I was thinking maybe if
> I break the sections into separate matrices and just view them that
> way...I don't know.

What different platforms are you targetting?  Standardized Fortran would
be compilable on almost any platform popular today...
0
dpbozarth (544)
3/22/2005 8:35:39 PM
Duane Bozarth wrote:
> geomegs wrote:
> >
> > Hello,
> >
> > They asked me if I could do it in matlab so anyone could do it on
his
> > or her own computer. Right now it's in fortran. There are 2
> > programs - one is to convert the raw data into a specific format
with
> > headers and separate sections. The second program processes the
data
> > mathematically, using the output from the first program.
>
> Don't ken precisely...if I had a working Fortran routine(s) it would
> seem simple enough to make any mods there required and distribute an
> executable to whoever needs it...so must be some other requirement
> behind the request...
>
> > I was wondering if I should use something else as well, but it
needs
> > to be easily compiled on different machines. I was thinking maybe
if
> > I break the sections into separate matrices and just view them that
> > way...I don't know.
>
> What different platforms are you targetting?  Standardized Fortran
would
> be compilable on almost any platform popular today...

Yes, especially because free Fortran compilers such as g95 and g77 are
available on many platforms. For text processing, though, I would
recommend Python, Perl, or even good old awk (gawk) for simple tasks.

0
beliavsky (2212)
3/23/2005 2:30:44 PM
beliavsky@aol.com wrote:
> 
...
> ...For text processing, though, I would
> recommend Python, Perl, or even good old awk (gawk) for simple tasks.

But there (apparently) is some processing as well...and to simply read a
text file and format it, Fortran wouldn't be much trouble at all.  Would
be nice to have a better description of what is really needed/wanted/why
Matlab was suggested to begin with...
0
dpbozarth (544)
3/23/2005 2:57:29 PM
Duane Bozarth wrote:
>
>
> beliavsky@aol.com wrote:
>>
> ..
>> ...For text processing, though, I would
>> recommend Python, Perl, or even good old awk (gawk) for simple
> tasks.
>
> But there (apparently) is some processing as well...and to simply
> read a
> text file and format it, Fortran wouldn't be much trouble at all.
> Would
> be nice to have a better description of what is really
> needed/wanted/why
> Matlab was suggested to begin with...
>

Originally, it had something to do with being able to use it on any
platform. I don't know anything about how fortran compiles, so I
didn't question this. I'll ask again and get back to you.

Thanks!
0
geomegs (5)
3/23/2005 4:32:54 PM
geomegs wrote:
> 
> Duane Bozarth wrote:
> >
> >
> > beliavsky@aol.com wrote:
> >>
> > ..
> >> ...For text processing, though, I would
> >> recommend Python, Perl, or even good old awk (gawk) for simple
> > tasks.
> >
> > But there (apparently) is some processing as well...and to simply
> > read a
> > text file and format it, Fortran wouldn't be much trouble at all.
> > Would
> > be nice to have a better description of what is really
> > needed/wanted/why
> > Matlab was suggested to begin with...
> >
> 
> Originally, it had something to do with being able to use it on any
> platform. I don't know anything about how fortran compiles, so I
> didn't question this. I'll ask again and get back to you.

Knowing what system(s) you're looking at running on, etc., would help.
0
dpbozarth (544)
3/23/2005 4:35:35 PM
Reply: