Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Fortran FORMAT-compatible i/o functions in Matlab?
Replies: 5   Last Post: Sep 3, 2013 9:11 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,208
Registered: 6/7/07
Fortran FORMAT-compatible i/o functions in Matlab?
Posted: Aug 27, 2013 10:18 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

It comes up over and over and over...problems in i/o (mostly input, but
output would have benefits as well) where the C format string rules just
don't fit real-world applications well.

Two of the most typical cases have again been here the last week of
so--one a case of a fixed-width field and the second a case where the
input file to be scanned used exponential notation w/o the explicit 'e'
--that is a value like -2.39-8.

Both forms are valid in Fortran and handled cleanly therein but both
require machinations to deal with in Matlab owing to the limitations in
the way C format strings are defined and the scanning rules imposed by C.

I have proposed in the (fairly distant now) past that there should be a
set of i/o routines that allow Fortran FORMAT syntax for i/o in Matlab
that would resolve these problems as well as another convenience of
being able to write repeat specifiers instead of the butt-ugly repmat()
workaround in current Matlab code. Unfortunately, at that time my
support expired and from then on TMW seemed to not even accept bug
reports or enhancement requests so after a while I gave it up. I did
build a personal mex library that did take a FORMAT string and call a
Fortran routine that did the work and returned variables but it

a) was somewhat limited being designed for a certain subclass of
specific problems, and

b) in the move back to the farm from last consulting gig it appears that
I failed to get the source code for it off the machine where it existed
and I've not had the time nor inclination to rebuild it.

The question here is, is there any other traction out there that would
engender support for such a feature request if a cadre were to develop
such a case statement and outline for same?

I'm on the downhill side; I'll never write any more Matlab code "in
anger"; poking around here at cs-sm and on some farm production data and
other things of passing interest (like wind farm capacity factor data
compared to wind data) is the most I'll do going forward but it would
certainly be a very useful addendum in the arsenal for those still doing
serious work and those to come.

--


I'm asking here i



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.