I can not create a matrix.
1 回表示 (過去 30 日間)
古いコメントを表示
K=[107 719.689 7969.933; 108 342.246 8404.180;23 638.765 8351.331]
KSNKOORD=[8351.311 638.790]
blnmynokta=[23]
YON_BLNM =[23;107;108]
for i = 1:length(YON_BLNM)
for j = 1:(length(blnmynokta))
if YON_BLNM(i) ~= blnmynokta(j)
K1(i,2*j:3*j)= [K(i,2*j) K(i,3*j)]
elseif YON_BLNM(i) == blnmynokta(j)
K1(i,2*j:3*j) = [KSNKOORD(i,1) KSNKOORD(i,1)]
end
end
end
K1=[107 719.689 7969.933; 108 342.246 8404.180;23 638.790 8351.331]
The value in column 2 of line 3 of K1 must be changed. But it does not change. why?
0 件のコメント
採用された回答
Andrei Bobrov
2017 年 3 月 27 日
K = [107 719.689 7969.933; 108 342.246 8404.180;23 638.765 8351.331];
KSNKOORD = [8351.311 638.790];
blnmynokta = 23;
K1 = K;
K1(K(:,1) == blnmynokta,2:end) = KSNKOORD;
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!