a(2,:)=[0,b] %a的第2行放 0,b
a =
0.4200 0.4100 0.6700 0.7800 0.6900 0.3200
0 0.5700 0.2700 0.5500 0.2900 0.3700
>> a(3,:)=0 %第3行置0
a =
0.4200 0.4100 0.6700 0.7800 0.6900 0.3200
0 0.5700 0.2700 0.5500 0.2900 0.3700
0 0 0 0 0 0
>> a(3,3:6)=c %把c放到a的第3行3到6列
a =
0.4200 0.4100 0.6700 0.7800 0.6900 0.3200
0 0.5700 0.2700 0.5500 0.2900 0.3700
0 0 0.3600 0.4800 0.4800 0.3500
希望对你有帮助!