Fill a Matrix with derivatives
15 次查看(过去 30 天)
显示 更早的评论
Hello all,
I am trying to create the following Matrix and then repeat it for each epoch so I get a 14002 x 4 Matrix,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/619208/image.jpeg)
I am setting the following structure to create it:
iv1 = [Tandem(1,1) Tandem(1,4) Tandem(1,3) Tandem(1,6)]; % For xz Matrix
iv2 = [Tandem(1,2) Tandem(1,5)]'; % For y Matrix
T = (2*pi)*(sqrt(a^3/(G*M))); % [sec]
n = sqrt((G*M)/a^3); % [rad/sec] % Using Kepler's third law
tt1 = (0:10:70001)';
tt2 = (0:10:140010)';
Axz = zeros(2,length(iv1));
for i = 0:length(tt2)-1
for j = 0:length(iv1)-1
Axz(i+1,j+1) = iv1(j+1)^j;
end
end
The problem comes when I try to set each derivative "equation" into my matrix, do not know how to set each element into my for loop. I would appreciate if you can help me. Thanks!
Hugo
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statics and Dynamics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!