• Remix
  • Share
  • New Entry

on 18 Oct 2021
  • 6
  • 13
  • 0
  • 0
  • 280
l=@linspace;
m=20 ;
A=l(0,1,m);
B=zeros(1,m);
C=l(.4,.6,m);
D=ones(1,m);
X=zeros(m);
Y=X;
for i=1:m
X(:,i)=l(A(i),C(i),m);
Y(:,i)=l(B(i),D(i),m);
end
figure('color','k')
for i=1:2:m
x=[X(i,1) X(i+1,1) X(i+1,end) X(i,end)];
y=[Y(i,1) Y(i+1,1) Y(i+1,end) Y(i,end)];
patch(x,y,'r')
patch(x,-y,'w')
end
axis off
axis
ans = 1×4
0 1 -1 1
Remix Tree