Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-3779

MATLAB Interface reports script errors, but not warnings

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: R2014a, R2015a, R2016a, R2017a, R2018A
    • Fix Version/s: Someday
    • Component/s: MATLAB Interface
    • Labels:
      None
    • Environment:

      Windows 7 Enterprise 64-bit
      2013-03-29 build

      Description

      The attached script (test.script) calls the attached MATLAB function (myfunc.m with an input of 1e10 to run a for loop 1e10 times.

      When run through the MATLAB interface, this appears to run quickly, but looking at the output, it's clear that the loop isn't running the proper number of times.

      Running the function manually in the MATLAB Engine window shows why:

      Warning: FOR loop index is too large. Truncating to 2147483647.
      

      The bug is that GMAT appears to be operating successfully, because this warning is not reported to the message window.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            jjkparker Joel Parker added a comment -

            From Mathworks Support:

            You can use the ENGOUTPUTBUFFER command to return any output that ordinarily appears on the screen.The following documentation explains more about this command:

            http://www.mathworks.com/help/matlab/apiref/engoutputbuffer.html

            Show
            jjkparker Joel Parker added a comment - From Mathworks Support: You can use the ENGOUTPUTBUFFER command to return any output that ordinarily appears on the screen.The following documentation explains more about this command: http://www.mathworks.com/help/matlab/apiref/engoutputbuffer.html

              People

              • Assignee:
                jjkparker Joel Parker
                Reporter:
                jjkparker Joel Parker
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: