Call UltraEdit from MATLAB

Call UltraEdit from MATLAB

2

    Nov 19, 2008#1

    How do I open a file in UltraEdit from MATLAB?

    I've got the name of the file I have open in the MATLAB editor. I want to pass this file name, in the command line or from a MATLAB m-file, and open the file in UltraEdit. I want to use UltraEdit because MATLAB editor doesn't support regular expression search, column select, etc.

    6,675585
    Grand MasterGrand Master
    6,675585

      Nov 19, 2008#2

      I don't have MATLAB, but according to some pages I have found in WWW you just have to configure MATLAB to use an external editor instead of the internal editor and specify uedit32.exe with full path as this external editor. Read in the documentation of MATLAB how to use it with an external editor.

      UltraEdit itself doesn't need a special syntax for opening a file from command line. So something like:

      "C:\Program Files\IDM Computer Solutions\UltraEdit\uedit32.exe" "C:\Temp\example.m"

      is enough to open file C:\Temp\example.m with UltraEdit.
      Best regards from an UC/UE/UES for Windows user from Austria

      2

        Nov 19, 2008#3

        Yes, you can configure MATLAB preferences to use either the MATLAB editor or an external editor (one or the other). I use the MATLAB editor because of the debugging features. I would then, simulataneously, open the same file in uedit (using explorer and several mouse clicks) take advantages of the power (mainly regular expressions, macros, column mode, etc.; also have syntax highlighting working for m-code). Save the file, then close uedit and debug the m code (which automatically gets the changes made in uedit) in MATLAB.

        I replaced the several mouse clicks with one click on a MATLAB shortcut that calls the following m-file:

        function OpenEditorDocInUedit(Focus_doc)
        eval(['!uedit32 ' Focus_Doc) ;
        end

        Works great! Thanks :)