MATLAB: To get 100 vectors using the previous vector MATLABvector I have following matrices, F(9×9) Q1(9×1) I want to get Q2,Q3,Q4… such that Q2 = FxQ1 Q3 = FxQ2 Q4 = FxQ3 . . . Q100 = FxQ99 Best Answer Better to not name the arrays Q1, Q2, Q3...Q = cell(100,1);Q{1} = Q1;for i = 2:numel(Q) Q{i} = F*Q{i-1};end Related SolutionsMATLAB: This code is for calculating the probability of attack success represent for the equation A, i need to change it to calculate the probability of attack success for the equation B:where q =[0.1 ,0.2 , 0.3, 0.4 , 0.5] and p= 1-q and Z= 6 function main q1a = [0.1 0.2 0.3 0.4 0.5]; q2a = [0.1 0.2 0.3 0.4 0.5]; z = 6; vec = zeros(1,z); for i = 1:numel(q1a) q1 = q1a(i) p1 = 1 - q1; for j = 1:numel(q2a) q2 = q2a(j); p2 = 1 - q2; vec(1:2:end) = q1/p1; vec(2:2:end) = q2/p2; lambda = sum(vec); terms_left = cumprod([1,lambda*ones(1,z)]./[1,(1:z)]); terms_right = [1-fliplr(cumprod(vec)), 0]; P_z(i,j) = 1 - exp(-lambda)*sum(terms_left.*terms_right); end end P_zendNow you should be able to make a table from the matrix P_z. MATLAB: Quaternions, Transformation Matrix Such thing is straight forward in MATLABq1 = reshape(q1,1,1,[]);q2 = reshape(q2,1,1,[]);q3 = reshape(q3,1,1,[]);q4 = reshape(q4,1,1,[]);% The matrix is i C(:,:,i) for i=1,..., 54000 C = [q1.^2-q2.^2-q3.^2+q4.^2, 2*(q1.*q2+q3.*q4), 2*(q1.*q3-q2.*q4); 2*(q1.*q2-q3.*q4), -q1.^2+q2.^2-q3.^2+q4.^2, 2*(q2.*q3-q1.*q4); 2*(q1.*q3+q2.*q4), 2*(q2.*q3-q1.*q4), -q1.^2-q2.^2+q3.^2+q4.^2] Related QuestionHow to combine two cell arrays into one cell arrayRestructure arrayLegendre polynomial Symbolic derivative
Best Answer