MATLAB CODE:
x=input('Enter the array:');
y=input('Enter the position:');
z=input('Enter the number to be inserted:');
b=[];
for i=1:(y-1)
b(i)=x(i);
end
b(y)=z;
for i=(y+1):(length(x)+1)
b(i)=x(i-1);
end
disp(b);
Check the complete note in the following link:
https://www.matlabcoding.com/2019/05/...
Nesta página do site você pode assistir ao vídeo on-line Inserting an element in an array in a particular position | MATLAB & JAVA duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Knowledge Amplifier 29 Maio 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 785 vezes e gostou 5 espectadores. Boa visualização!