A=2:2:8;
B=A.^3;
S=sum(B);
disp(S);
总是报错Index in position 1 exceeds array bounds. Index must not exceed 1.是为什么?
具体需要怎么改?
A=2:2:8;
B=A.^3;
S=sum(B);
disp(S);
总是报错Index in position 1 exceeds array bounds. Index must not exceed 1.是为什么?
具体需要怎么改?