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
Cita come
亮 (2025). 数学实验作业 (https://it.mathworks.com/matlabcentral/fileexchange/117750), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2021a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxTag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0 |
