2.m working
This commit is contained in:
17
1.m
Normal file
17
1.m
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
clear all;
|
||||||
|
close all;
|
||||||
|
|
||||||
|
a=1
|
||||||
|
|
||||||
|
v2 = ones(1,10)
|
||||||
|
v = [0, 1,2,3,4,5]
|
||||||
|
v = [v,8]
|
||||||
|
|
||||||
|
figure;
|
||||||
|
plot(v, 'green')
|
||||||
|
|
||||||
|
hold on;
|
||||||
|
plot(v2, 'red')
|
||||||
|
|
||||||
|
figure;
|
||||||
|
plot(v2)
|
||||||
18
2.m
Normal file
18
2.m
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
clear all;
|
||||||
|
close all;
|
||||||
|
|
||||||
|
A = zeros(5,10)
|
||||||
|
sum_col = zeros(10)
|
||||||
|
for i=1:5;
|
||||||
|
for j=1:10;
|
||||||
|
b = j + (i-1)*(10)
|
||||||
|
A(i, j) = b;
|
||||||
|
A
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = 1:10;
|
||||||
|
for j = 1:5;
|
||||||
|
sum_col(i) = sum_col(i) + A(j, i)
|
||||||
|
end
|
||||||
|
end
|
||||||
BIN
octave-workspace
Normal file
BIN
octave-workspace
Normal file
Binary file not shown.
Reference in New Issue
Block a user