lundi 29 mars 2021

How do I plot neighboring data points against each other on MATLAB

I am currently doing an project to improved on the logistic map to create a PRNG. I am trying to prove that the data generated from my code have correlation among one another when plotted against neighboring data point and try to show it on a graph.

This is my code as shown below. It generates different data point for 500 iterations.

    x = rand(1);
    r = 3.99;

    for i = 1:500
    for j = 1:1
    
    X1(i,j) = r*x*(1-x);
    %for next iteration
    x = X1(i,j); 
    
    end
    end

    %output
    disp(X1);
    plot(X1);



Aucun commentaire:

Enregistrer un commentaire