storing values in for loop
이전 댓글 표시
i want to make a vector consists of following fi elements from for loop how can i do that ??
where F=[CA;CA^2;CA^3;...etc]
how can i store values of fi in above matrix ???
Code:
Am=[0 1 0;0 0 1;0 -1.8 2.7];
Bm=[0;0;1];
Cm=[6 5 1];
Dm=0;
N2=10;
Nu=2;
[n,n1]=size(Am);
Om=zeros(n,1);
A=[Am Om;Cm*Am 1];
B=[Bm;Cm*Bm];
C=[0 0 0 1];
% To get G,F
for i=1:N2
fi=C*A^i;
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!