matlab这个递推公式哪里超了啊n(1)=1;n(2)=2;n(3)=3;n(4)=4;n(5)=1; for i=1:3; sita(1)=0; sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);end Index exceeds matrix dimensions.Error in Untitled4 (line 11)sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 05:55:40
matlab这个递推公式哪里超了啊n(1)=1;n(2)=2;n(3)=3;n(4)=4;n(5)=1; for i=1:3; sita(1)=0; sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);end Index exceeds matrix dimensions.Error in Untitled4 (line 11)sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);
matlab这个递推公式哪里超了啊
n(1)=1;
n(2)=2;
n(3)=3;
n(4)=4;
n(5)=1;
for i=1:3;
sita(1)=0;
sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);
end
Index exceeds matrix dimensions.
Error in Untitled4 (line 11)
sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);
matlab这个递推公式哪里超了啊n(1)=1;n(2)=2;n(3)=3;n(4)=4;n(5)=1; for i=1:3; sita(1)=0; sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);end Index exceeds matrix dimensions.Error in Untitled4 (line 11)sin(sita(i+1))=sin(sita(i))*n(i)/n(i+1);
sita(i)及sita(i+1)超了,估计是你的循环体内的sita(1)=0写错了,1为i之误.改改试试.