MATLAB: Hello,How to extract values from a c,e and h matrices which can be incorporated into another matrix

help

How can I extract values from a c,e and h matrices which can be incorporated into another matrix?

Best Answer

You might be looking for this:
clear all;
%Parameters
%k= curvature parameter
%omega= w; natural frequency
k= 0.0289;
w= [0.00:0.001:0.1];
%Function Dispersion
c=(-2-(k.^2).*w.^2);
e=(1-(1+(k.^2)).*w.^2);
h=(k.^2.*w.^2-1).*w.^2;
E = zeros(6,length(w)) ;
for i = 1:length(w)
B= [0 1 0 0 0 0; 0 0 1 0 0 0; 0 0 0 1 0 0; 0 0 0 0 1 0; 0 0 0 0 0 1; -h(i) 0 -e(i) 0 -c(i) 0];
S=poly (B);
E(:,i)=roots(S);
end