Generating chaotic sequence with possitive numbers

1 view (last 30 days)
Vijay v
Vijay v on 19 Feb 2019
Answered: Dev on 26 Mar 2025
i want to generate chaotic sequence
without negative numbers

Answers (1)

Dev
Dev on 26 Mar 2025
To generate a chaotic sequence, we can use a logistic map which is a simple mathematical model that exhibits chaotic behaviour. This logistic map can be defined by the equation:
x_n = r * x_n-1 * (1 - x_n-1), where,
‘r’ is a parameter that should be in the range (3.57 to 4) for chaotic behaviour, and
‘x_n’ is the sequence value at step ‘n’.
To ensure the sequence remains non-negative, we can declare x_0’ and define its initial value between 0 and 1. We can then start the sequence (x_1) with this initial value.
Next, we can use the logistic map equation in a ‘for’ loop to generate the entire sequence. For more information regarding the usage of ‘for’ loop, please refer to the documentation below-
I have also attached a reference code snippet below to generate the same-
% Generate the chaotic sequence
n = 100; % configure accordingly
for i = 2:n % starting with 2 since x_1 is already initialized previously
x(i) = r * x(i-1) * (1 - x(i-1));
end
I hope this resolves the issue.

Categories

Find more on Nonlinear Dynamics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!