کد متلب (MATLAB) : مثال شماره 25
کدهای متلب :
clear all
close all
clc
% Investigate the rank of magic squares
r = zeros(1,32);
for n = 3:32
r(n) = rank(magic(n));
end
r
bar(r)
close all
clc
% Investigate the rank of magic squares
r = zeros(1,32);
for n = 3:32
r(n) = rank(magic(n));
end
r
bar(r)
نتیجه :

r =
Columns 1 through 15
0 0 3 3 5 5 7 3 9 7 11 3 13 9 15
Columns 16 through 30
3 17 11 19 3 21 13 23 3 25 15 27 3 29 17
Columns 31 through 32
31 3
Columns 1 through 15
0 0 3 3 5 5 7 3 9 7 11 3 13 9 15
Columns 16 through 30
3 17 11 19 3 21 13 23 3 25 15 27 3 29 17
Columns 31 through 32
31 3
منبع کدها :
کتاب MATLAB 7 Getting Started Guide - صفحه 163 از فایل pdf کتاب
دسته بندی انواع رسم شکل در متلب
نظرات 0 0 0