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 Related SolutionsMATLAB: How to randomly generate 0.1 or -0.1 diag((2*randi(0:1,1,N)-1)/10) MATLAB: How to import .dat data fid=fopen('yourfile.dat','r');data=cell2mat(textscan(fid,'','CollectOutput',1,'CommentStyle','#'));fid=fclose(fid);looks like would do it. You'll end up w/ an array of double. Related QuestionGenerate matrices with non-zero submatricesHow can I create a matrix from calculated answersCannot get the same result in GA as I get in linprog
Best Answer