Matlab中不同维矩阵合并

2024-11-24 09:33:12
推荐回答(1个)
回答1:

X1=[1 2 3 4];
X2=[2 3];

X2_temp = nan*ones(1, length(X1));

X2_temp(1:length(X2)) = X2;

X = [X1
X2_temp];