Artifact 62d084883f673bee45731950369eac35d5683603c4afc80607c8dabd66ddc850:
- File mtt/lib/control/PPP/damped_matrix.m — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 581) [annotate] [blame] [check-ins using] [more...]
- File mttroot/mtt/lib/control/PPP/damped_matrix.m — part of check-in [182384e0d6] at 2001-04-02 15:02:35 on branch origin/master — Putting the PPP library under cvs (user: gawthrop@users.sourceforge.net, size: 581) [annotate] [blame] [check-ins using]
function A = damped_matrix (frequency,damping) ## usage: A = damped_matrix (frequency,damping) ## ## Gives an A matrix with eigenvalues with specified ## frequencies and damping ratio N = length(frequency); if nargin<2 damping = zeros(size(frequency)); endif if length(damping) != N error("Frequency and damping vectors have different lengths"); endif A = zeros(2*N,2*N); for i=1:N j = 2*(i-1)+1; A_i = [-2*damping(i)*frequency(i) -frequency(i)^2 1 0]; A(j:j+1,j:j+1) = A_i; endfor endfunction