Форум для обсуждения курса

11.02.2023 МТ-401

11.02.2023 МТ-401

by Артем Маковецкий -
Number of replies: 0

clear();
points = [2,3;
4,1;
4,4;
5,3;
6,4];

%disp(points);

[ht,wd] = size(points);

for i=1 : ht
for j=1 : wd
if(j==1)
X(i,j)=1;
else
X(i,j)=points(i,1);
endif
endfor
endfor

disp(X);

for i=1 : ht
Y(i) = points(i,2);
endfor
Y = Y';

disp(Y);

w0=0;
w1=0;
W = [w0;w1];

disp(W);