Login required to started new threads

Login required to post replies

MATLAB Question (warning: nerdy!)
Quote | Reply
So I've got this text file which is a series of lines of text (it's an input file for a FORTRAN simulation). How do I update a certain line of this file using MATLAB?

For example line 5 was: 60 70 80. I want to update to: 60 70 90. How do I do that?

Hope I've been clear enough. Thanks peeps.


-----------------------------------------------------
Quote Reply
Re: MATLAB Question (warning: nerdy!) [BottomFeeder] [ In reply to ]
Quote | Reply
Can't help with MATLAB but I program FORTRAN all day, when I need to change an input file I just use an regular text editor. Why can't you simply do that?

Pete
Quote Reply
Re: MATLAB Question (warning: nerdy!) [BottomFeeder] [ In reply to ]
Quote | Reply
Are all lines pure data lines? Do they have the same column lenghts? Pretty much it depends on the exact file layout how easy this is going to be. A few helpful commands are load, fgetl fscanf, and so forth
Here's some websites that deal with the problem:

http://www.me.pdx.edu/...loadingPlotData.html

http://spiff.rit.edu/...tures/readwrite.html
Quote Reply
Re: MATLAB Question (warning: nerdy!) [Peter Tye] [ In reply to ]
Quote | Reply
I have to run hundreds of cases, so I want to avoid cutting and pasting info from MATLAB to the input file each time I run a case.


-----------------------------------------------------
Quote Reply
Re: MATLAB Question (warning: nerdy!) [jave-mtr] [ In reply to ]
Quote | Reply
Hey those links are nifty. Thanks.

I'm close to having a workable solution here... Thanks again.


-----------------------------------------------------
Quote Reply
Re: MATLAB Question (warning: nerdy!) [BottomFeeder] [ In reply to ]
Quote | Reply
One last tip: free yourself from the oppression of commercial software and abandon Matlab! See the light, brother: Octave!! LOL
Quote Reply
Re: MATLAB Question (warning: nerdy!) [jave-mtr] [ In reply to ]
Quote | Reply
Ha! Mathworks has got many companies by the balls, that's for sure.


-----------------------------------------------------
Quote Reply
Re: MATLAB Question (warning: nerdy!) [jave-mtr] [ In reply to ]
Quote | Reply
hmm...they don't have a bioinformatics toolbox
bummer
Quote Reply
Re: MATLAB Question (warning: nerdy!) [Francois] [ In reply to ]
Quote | Reply
Yes, that's the one downside of it! I've cried myself to sleep countless times during the last 5 months of my thesis work because of Octave's lack of certain functions. You come from Matlab and are so used to a very broad spectrum of functionality. Definitely tough as it takes up a lot of time to program all your own code, but there's the Octave Sourceforge addition that has a lot of functions implemented that the base Octave has not. More importantly, since it's open source you can actually see what the algorithm is doing instead of trusting in the (in)ability of the Mathworks' programmers. Also, Octave seems to have Matlab beat in certain instances, I had a case of numerical instability in a Kalman filter once that occured in Matlab but not in Octave, hmm. Oh, geeky stuff, I love it!
Quote Reply
Re: MATLAB Question (warning: nerdy!) [jave-mtr] [ In reply to ]
Quote | Reply
Definitely. For these types of systems, I'd like to have access to the code. I've seen a bunch of stuff behaving oddly (at best)
Quote Reply
Re: MATLAB Question (warning: nerdy!) [BottomFeeder] [ In reply to ]
Quote | Reply
I had no idea you had a "real" job.

I just thought you were a body model.



----------------------------------------------------
Striving to have sex more than 66 times per year
Quote Reply
Re: MATLAB Question (warning: nerdy!) [BottomFeeder] [ In reply to ]
Quote | Reply
Get rid of MATLAB and get IDL!
Quote Reply
Re: MATLAB Question (warning: nerdy!) [Erik Clark] [ In reply to ]
Quote | Reply
I take it you haven't seen my porn films.


-----------------------------------------------------
Quote Reply
Re: MATLAB Question (warning: nerdy!) [BottomFeeder] [ In reply to ]
Quote | Reply
while doing those porn films, do you grow a porn mustache like klehner?





----------------------------------------------------
Striving to have sex more than 66 times per year
Quote Reply
Re: MATLAB Question (warning: nerdy!) [Erik Clark] [ In reply to ]
Quote | Reply
Klehner's agent has approached my agent in the past, but I told him I don't play that game. Not that there's anything wrong with that.


-----------------------------------------------------
Quote Reply
Post deleted by astrotri [ In reply to ]
Re: MATLAB Question (warning: nerdy!) [astrotri] [ In reply to ]
Quote | Reply
puts C++ in its place...hmmm...really have to be a physicist to say such a silly thing ;-)
Quote Reply
Re: MATLAB Question (warning: nerdy!) [astrotri] [ In reply to ]
Quote | Reply
NO, NO, NO! Yearly maintenance is ~$500. See if you can get a student version ($89). It is only one version back.
Quote Reply