Search code examples
matlabmatlab-deployment

How do I stop Matlab from displaying matrix content on importdata()


I'm running a series of scripts that all import data from different matrix files. It seems that displaying the content of the matrix is taking a lot of time. Normally I would do "more on" and just cancel the display after the first page, but I am doing things automatically here, from the command-line version.

Is there a way to stop Matlab from displaying the content of variables when it loads them? Say, a non-verbose/daemon mode? I couldn't find a way to do it when I searched, but I'm sure there must be one.

Thanks in advance!


Solution

  • Found it! The answer is to add a semicolon (;) at the end of the line, for example:

    m=importdata('matrix.txt');
    

    This will prevent it from printing the contents of m.