How to get a column vector for all the considered time instants?
古いコメントを表示
Hi everyone. I have a problem with this code. At the end I would like to obtain the r_ORF column vector for all the time instants (41) but I don't understand why this does not happen in this code. Thanks in advance.
clc;clear all; close all;
% Components determination in ORF
% ECI (GEOC) to ORF matrix determination
A = load('DatiCosmoSkymed.txt');
times = A(:,1);
for i = 1: length(times)
r_inertial(1,i)= A(i,8);
r_inertial(2,i)= A(i,9);
r_inertial(3,i)= A(i,10);
v_inertial(1,i)= A(i,11);
v_inertial(2,i)= A(i,12);
v_inertial(3,i)= A(i,13);
kORF_ECI=-r_inertial/norm(r_inertial);
jORF_ECI=-cross(r_inertial,v_inertial)/norm(cross(r_inertial,v_inertial));
iORF_ECI=cross(jORF_ECI,kORF_ECI);
M_ECItoORF(1,1)=iORF_ECI(1,1);
M_ECItoORF(1,2)=iORF_ECI(2,1);
M_ECItoORF(1,3)=iORF_ECI(3,1);
M_ECItoORF(2,1)=jORF_ECI(1,1);
M_ECItoORF(2,2)=jORF_ECI(2,1);
M_ECItoORF(2,3)=jORF_ECI(3,1);
M_ECItoORF(3,1)=kORF_ECI(1,1);
M_ECItoORF(3,2)=kORF_ECI(2,1);
M_ECItoORF(3,3)=kORF_ECI(3,1);
r_ECI = r_inertial;
r_ORF = M_ECItoORF*r_ECI;
display(r_ORF)
end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!