clc,clear
SZ = [1,2,3,4,5;
6,7,8,9,10;
11,12,13,14,15;
16,17,18,19,20;
21,22,23,24,25];
max=-10^99;min = 10^99;sum = 0;
for i =1:1:5
for j = 1:1:5
bb = SZ(i,j);
if i+j<5&&j>=i
sum =bb+sum;
end
if bb >max
max = bb;
H = i;
L = j;
end
if bb < min
min = bb;
h = i;
l = j;
end
end
end
max
H
L
min
h
l
sum
clc,clear
x = input('x = ');
y = input('y = ');
X = x;
Y = y;
for i = 1:99999999999
g = floor(x/y);
g = x-y*g;
x = y;
y = g;
if y == 0
break
end
G = g;
end
G
B = X*Y/G
Cite As
亮 (2026). 数学实验作业 (https://www.mathworks.com/matlabcentral/fileexchange/117750), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
