I can not create a matrix.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhendisleksi
am 27 Mär. 2017
Kommentiert: Muhendisleksi
am 27 Mär. 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 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 27 Mär. 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;
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!