If these symbols are known, their order is the same. The following procedure can be used.
clc
X=[X 1
X2
X3
X4
X5
X6……】;
I=input ('Please enter the value of I:');
X=X( 1, 1:I);
The x obtained from sentence% is the first column to the I-th column of the first row in the original X matrix.