I can not create a matrix.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Muhendisleksi
le 27 Mar 2017
Commenté : Muhendisleksi
le 27 Mar 2017
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 commentaires
Réponse acceptée
Andrei Bobrov
le 27 Mar 2017
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;
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!