[未答复] 索引超出数组元素的数目(1)

[复制链接]
顺心平安 发表于 2022-5-12 15:06:12
for t=0:deltaT:20
    psi_r(k)=pi/4;
    if k==1
        xi_1(:,k)=0.3;xi_2(:,k)=0.5;
        eta_1(:,k)=pi/4; eta_2(:,k)=pi/3;
        phi_r(k)=pi/3;theta_r(k)=pi/3;
    end
    if k<=1
    phi(k)=eta_1(1,k);theta(k)=eta_1(2,k);psi(k)=eta_1(3,k);
    end

    R=[cos(theta(k))*cos(psi(k)),sin(phi(k))*sin(theta(k))*cos(psi(k))-cos(phi(k))*sin(psi(k)),cos(phi(k))*sin(theta(k))*cos(psi(k))+sin(phi(k))*sin(psi(k));cos(theta(k))*sin(psi(k)),sin(phi(k))*sin(theta(k))*sin(psi(k))+cos(phi(k))*cos(psi(k)),cos(phi(k))*sin(theta(k))*sin(psi(k))-sin(phi(k))*cos(psi(k));-sin(theta(k)),sin(phi(k))*cos(theta(k)),cos(phi(k))*cos(theta(k))];
    R_11=R(1,1);R_12=R(1,2);R_13=R(1,3);R_21=R(2,1);R_22=R(2,2);R_23=R(2,3);R_31=R(3,1);R_32=R(3,2);R_33=R(3,3);%旋转矩阵

标红的部分一直显示索引超出数组元素数目(1)
想问一下怎么回事?
谢谢

您需要登录后才可以回帖 登录 | 注册

本版积分规则

相关帖子
相关文章
热门教程
站长推荐
快速回复 返回顶部 返回列表