Matlab中A(1,R(1:2))及A(1,R(2:-1:A =4 2 3 1 54 2 5 3 14 3 5 2 1R =2 1 5 3 4A(1,R(1:2))= A(1,R(2:-1:1))结果是:A =4 2 3 1 54 2 5 3 14 3 5 2 1具体的A(1,R(1:2)),A(1,R(2:-1:求指教?

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 20:15:33
Matlab中A(1,R(1:2))及A(1,R(2:-1:A =4 2 3 1 54 2 5 3 14 3 5 2 1R =2 1 5 3 4A(1,R(1:2))= A(1,R(2:-1:1))结果是:A =4 2 3 1 54 2 5 3 14 3 5 2 1具体的A(1,R(1:2)),A(1,R(2:-1:求指教?
xRN@~ФBv-KïD@_DE oWpv[bA^fgoIRL֞ aagYz( ;4&I0K( &B ?1T'I&Nk$qdX ~{ۣբ3!^eljONy[D(YKH{B"

Matlab中A(1,R(1:2))及A(1,R(2:-1:A =4 2 3 1 54 2 5 3 14 3 5 2 1R =2 1 5 3 4A(1,R(1:2))= A(1,R(2:-1:1))结果是:A =4 2 3 1 54 2 5 3 14 3 5 2 1具体的A(1,R(1:2)),A(1,R(2:-1:求指教?
Matlab中A(1,R(1:2))及A(1,R(2:-1:
A =
4 2 3 1 5
4 2 5 3 1
4 3 5 2 1
R =
2 1 5 3 4
A(1,R(1:2))= A(1,R(2:-1:1))
结果是:
A =
4 2 3 1 5
4 2 5 3 1
4 3 5 2 1
具体的A(1,R(1:2)),A(1,R(2:-1:求指教?

Matlab中A(1,R(1:2))及A(1,R(2:-1:A =4 2 3 1 54 2 5 3 14 3 5 2 1R =2 1 5 3 4A(1,R(1:2))= A(1,R(2:-1:1))结果是:A =4 2 3 1 54 2 5 3 14 3 5 2 1具体的A(1,R(1:2)),A(1,R(2:-1:求指教?
A(1,R(2:-1:1)) %2:-1:1意思是从2递减1,一直减到1结束,故列为R(2)和
%R(1),其所对应的是1和2,即整句为A(1,2)和A(1,1),赋给A(1,R(1:2))
A(1,R(1:2)) %将A(1,2)和A(1,1)的值赋给A(1,1)和A(1,2).
故总的意思是A(1,2)和A(1,1)的位置发生了变换.正确的结果应为
A =
2 4 3 1 5
4 2 5 3 1
4 3 5 2 1