Info

This question is closed. Reopen it to edit or answer.

how to do this in matlab by the multiply constant matrix and the inversion matrix

2 views (last 30 days)
Untit.png
x=0.3;
p=0.343;
for n=2:65536;
if x(n-1)>=0 & x(n-1)<=p
x(n)=x(n-1)/p;
else
x(n)=(1-x(n-1))/(1-p);
end
end
A=sort(x);
[A,T]=sort(x);
Q=R(T);
Q4 = reshape(Q, 4, 4, numel(Q)/16);
  4 Comments
Jan
Jan on 1 Jul 2019
After step 1 you have a set of 4x4 matrices. Now the text of step 2 is full of syntactical errors. I'm not sure, what it means. Maybe:
Q4 = reshape(Q, 4, 4, numel(Q)/16);
R = zeros(size(Q4));
C = [2,3,1,1; 1,2,3,1; 1,1,2,3; 3,1,1,2]; % You should be able to write this!
for k = 1:size(Q4, 3)
R(:, :, k) = Q4(:, :, k) * C;
end
The part with the inversion matrix is not clear. Ask the one who has written the question.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!