MATLAB: How to insert a specific number in a specific position of a sequence

insulting a number

Hello. There is a long sequence of number. for example, '100023000'. I want to insert a number '1' in a 5th position of above sequence. That is, between 2 and 3, resulting in a final sequence of '1000213000'.
How can i make it possible?
Please help me!

Best Answer

Seq = '100023000';
Pos = 6;
NewSeq = [Seq(1:Pos-1) '1' Seq(Pos:end)];