MAGIC() cmd

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

MAGIC() cmd

Message par compsystems » ven. févr. 08, 2019 5:08 pm

The matlab documentation uses the MAGIC() command a lot. It seems that the thrown matrix has special properties, please, you can replicate this cmd.

Thank you

Code : Tout sélectionner

for n = 1:16
    subplot(4,4,n)
    ord = n+8;
    m = magic(ord);
    imagesc(m)
    title(num2str(ord))
    axis equal
    axis off
end
https://la.mathworks.com/help/matlab/ref/magic.html


Image

Répondre