I get this example from >>help eval(adsbygoogle = window.adsbygoogle || []).push({});

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.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab: Suppressing the output

**Physics Forums | Science Articles, Homework Help, Discussion**