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)']);
    end

    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
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Matlab: Suppressing the output
  1. Matrix Output (Matlab) (Replies: 1)

Loading...