Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab: Suppressing the output

  1. May 31, 2012 #1
    I get this example from >>help eval
    and add a semicolon.

    for n = 1:12
    eval(['M' num2str(n) ' = magic(n)']);

    The above commands display all 12 magic square. How do I suppress the output? I only want matlab to assign the variables not display them.
    Last edited: May 31, 2012
  2. jcsd
  3. May 31, 2012 #2
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook