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/...
En esta página del sitio puede ver el video en línea Inserting an element in an array in a particular position | MATLAB & JAVA de Duración hora minuto segunda en buena calidad , que subió el usuario Knowledge Amplifier 29 mayo 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 785 veces y le gustó 5 a los espectadores. Disfruta viendo!