n= input('enter the value of n:-->');A= zeroes(n,n); %n must be greater than 3
i want to add [1 4 1] in second row after skipping first 0 if n=4
and if n=5 add [1 4 1] in second row after skipping first 0 and add [ 1 4 1] to third row after skip two 0`s.
for example:
A = [0 0 0; 0 0 0; 0 0 0]
if n=3
add [ 1 4 1] to 2nd row
then
A = [ 0 0 0; 1 4 1; 0 0 0]
if n=4
A = [0 0 0 0; 0 1 4 1; 0 0 0 0]
if n=5
A = [ 0 0 0 0 0; 1 4 1 0 0; 0 1 4 1 0; 0 0 1 4 1; 0 0 0 0 0];
similarly ahead
help me
Best Answer