error getting eigenvalues varying with time
显示 更早的评论
xcg = 0.15; rea = 0.5; xe = 0.35; cla=2*pi ; m= 5*pi; a0 = 0; wr = (1/2); mu = 1+(3*a0^2);
U = 0:0.01:1;
a1 = ((mu*((U.*cla)/2*m))*(/(1-(xcg^2/rea^2)); a2 = wr^2/(1); a3 = ((mu*((U.^2*cla)/2*m)*/(1-(xcg^2/rea^2)); b1 = (1-((mu*((U.^2*cla)/2*m))/(1-(xcg^2/rea^2)); b2 = ((-mu*((U.*cla)/2*m))*/(1-(xcg^2/rea^2)); b3 = (-wr^2*(xcg/rea^2))
A = [a2 1 0 a1;0 2 5 0;0 0 b3 1;0 -b2 -b1 0];
nt = length(U); v = zeros(4,4,nt); d =zeros(4,1,nt);
for i = 1:nt [V,E] = eig(A); v(:,:,i) = V; d(:,1,i) = diag(E); end I am trying to get eigen valuse and vectors from corresponding time, but running into an error Error using vertcat Dimensions of arrays being concatenated are not consistent. A = [a2 1 0 a1;0 2 5 0;0 0 b3 1;0 -b2 -b1 0];
any suggestions? Also since I am getting two lambda (each being +/-) how would i be able to plot these eigenvaluse respect to U? please help!
采纳的回答
更多回答(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!