hod1
This commit is contained in:
17
hod1/1.m
Normal file
17
hod1/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
hod1/2.m
Normal file
18
hod1/2.m
Normal file
@@ -0,0 +1,18 @@
|
||||
clear all;
|
||||
close all;
|
||||
|
||||
A = zeros(5,10)
|
||||
sum_col = zeros(1,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
|
||||
12
hod1/3.m
Normal file
12
hod1/3.m
Normal file
@@ -0,0 +1,12 @@
|
||||
x = zeros(1,100)
|
||||
a = 0
|
||||
j = 1
|
||||
for i=0:2*pi/100:pi*2-(2*pi/100);
|
||||
a = sin(i)
|
||||
j
|
||||
x(j) = a
|
||||
j = j + 1
|
||||
end
|
||||
|
||||
figure;
|
||||
plot(x, 'green')
|
||||
Reference in New Issue
Block a user