To talk on Icrontic, just register!

It only takes 30 seconds.

Have an account? Sign in:

Forgot?
matlab4t
Getting settled in
matlab4t
7 Posts

how to change a particular line of code in a m file

hi ,

i need to change a single line of code in my file with another line. can anyone suggest a way to do it
JB
Radeon_Man in another life
JB
417 Posts
Using Linux?

sed -e 's/old line/new line/'
shwaip
elaborate bot
shwaip
5,729 Posts
iirc, you're doing this to a python script. Make the thing you need to change a command line argument to the script.
__________________ my photostream for ic photography challenge

Anyone who wants dropbox, please use my referral link
matlab4t
Getting settled in
matlab4t
7 Posts
Using Linux?

sed -e 's/old line/new line/'
hi

i am trying to change a line in the .m file which is read by matlab
JB
Radeon_Man in another life
JB
417 Posts
I'm confused. Is this the same problem that you describe here: http://icrontic.com/forum/showthread.php?t=69489?

If not, why don't you just go into the file and change the line you want to modify?
shwaip
elaborate bot
shwaip
5,729 Posts
he wants to be able to change it automagically based on some calculated value.

he shouldn't be doing it this way, though. It should be a parameter/argument to the .py script, or he should rewrite the .m file so it's a function rather than a script.
JB
Radeon_Man in another life
JB
417 Posts
he shouldn't be doing it this way, though. It should be a parameter/argument to the .py script, or he should rewrite the .m file so it's a function rather than a script.
Agreed.
Similar Threads
Thread Thread Starter Forum Replies Last Post
Registry Issue? HJT Log sect Resolved / Inactive 9 28 May 2006 10:13am
HELP with backdoor.prorat ragefast2500 Resolved / Inactive 6 3 Aug 2005 7:51pm
Infected with several viruses, HijackThis Log Included - Please Help! (CA_Dude) CA_DUDE Resolved / Inactive 11 7 May 2005 2:33pm
doom 3 problems davex General Hardware 23 17 Dec 2004 1:00pm
HijackThis log enclosed SkyWriter Resolved / Inactive 4 6 Nov 2004 10:33pm

Go Back   Icrontic Forums > Tech: Software > General Software > Matlab Help
Jump to
This Thread Search this Thread
Search this Thread:

Advanced Search


Current time: 5:28am (GMT)
Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Get Vanilla instead. Trust me.