The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Substitution of Operators
Replies: 2   Last Post: Jan 18, 2013 10:17 AM

Advanced Search

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

Posts: 18,038
Registered: 12/7/04
Re: Substitution of Operators
Posted: Jan 18, 2013 10:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Omid " <> wrote in message
> Hello everyone,
> I need to substitute one operator in my program with another operator (*.
> with *)
> but i do not know how it is possible.
> I would appreciate if anyone knows a function which do that.

Two possible approaches:

Open the file in the MATLAB Editor.
Use Find/Replace to perform the replacement.


Read the function file in as a text file.
Perform the replacement.
Write the modified text into a new function file.

The file I/O and string processing functions listed in the output of these
two commands will be useful to you for the second approach:

help iofun
help strfun

Steve Lord
To contact Technical Support use the Contact Us link on

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.