Réponse acceptée

KSSV
KSSV le 16 Mar 2022
Modifié(e) : KSSV le 16 Mar 2022
A = rand(4)
A = 4×4
0.2474 0.1371 0.8875 0.6324 0.2656 0.0413 0.9122 0.4274 0.4822 0.9391 0.8935 0.8856 0.9399 0.0016 0.7617 0.4273
iwant = zeros(6) ;
iwant(1:4,1:4) = A
iwant = 6×6
0.2474 0.1371 0.8875 0.6324 0 0 0.2656 0.0413 0.9122 0.4274 0 0 0.4822 0.9391 0.8935 0.8856 0 0 0.9399 0.0016 0.7617 0.4273 0 0 0 0 0 0 0 0 0 0 0 0 0 0
B = iwant ;
iwant = B(1:4,1:4)
iwant = 4×4
0.2474 0.1371 0.8875 0.6324 0.2656 0.0413 0.9122 0.4274 0.4822 0.9391 0.8935 0.8856 0.9399 0.0016 0.7617 0.4273

Plus de réponses (0)

Catégories

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by