Code :
clc
clear all
close all
x=input('Enter the number:');
k=1;
l=x;
y=[];
a=[];
while(k~=l) for i=1:x if(i==k || i==l) a(i)=1; else a(i)=0; end end y=[y a']; k=k+1; l=l-1; a=[];
end
for i=1:x if(i==k) a(i)=1; else a(i)=0; end
end
y=[y a'];
clc
clear all
close all
x=input('Enter the number:');
k=1;
l=x;
y=[];
a=[];
while(k~=l) for i=1:x if(i==k || i==l) a(i)=1; else a(i)=0; end end y=[y a']; k=k+1; l=l-1; a=[];
end
for i=1:x if(i==k) a(i)=1; else a(i)=0; end
end
y=[y a'];
Arrow-head Matrix | MATLAB upload image | |
1 Likes | 1 Dislikes |
28 views views | 1.03K followers |
Science & Technology | Upload TimePublished on 17 Jul 2019 |
No comments:
Post a Comment