Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I pasted my code at the buttom. I am unable to save the files with the name choa

ID: 1980022 • Letter: I

Question

I pasted my code at the buttom. I am unable to save the files with the name choas1,chaot2 in asccii code. please help.

figure('Color', [1 1 1]);
x0 = 0.5;
lambda = 3.8;
vectorLength = 1500;

x = zeros(vectorLength,1);
x(1)= x0;

for k = 2:vectorLength,
       x(k) = lambda*x(k-1)*(1-x(k-1));
end

figure('Color', [1 1 1]);
h = plot(x); box off;
xlabel('Sample Number');
ylabel('Chaotic Number');

% 3D

T = 2;
x1 = x(1:end-2*T);
x2 = x(T+1:end-T);
x3 = x(2*T+1:end);

figure('Color', [1 1 1]);
h = plot3(x1,x2,x3);
xlabel('x(t)');
ylabel('x(t+T)');
zlabel('x(t+2T)');

%% 2-Write a script that uses a loop
figure('Color', [1 1 1]);
x0 = 0.5;
lambda = 3.8;
vectorLength = 1500;

x = zeros(vectorLength,1);
x(1)= x0;

for i = 0:30
for k = 2:vectorLength,
       x(k) = lambda*x(k-1)*(1-x(k-1));
end

figure('Color', [1 1 1]);
h = plot(x); box off;
xlabel('Sample Number');
ylabel('Chaotic Number');

% 3D

T = 2;
x1 = x(1:end-2*T);
x2 = x(T+1:end-T);
x3 = x(2*T+1:end);

figure('Color', [1 1 1]);
h = plot3(x1,x2,x3);
xlabel('x(t)');
ylabel('x(t+T)');
zlabel('x(t+2T)');

% Directory create a directory named “chaos"

files = dir('chaos.txt');
for k = 1:length(files)
    x = load(files(k).name)
    figure('Color', [1 1 1]);
    plot(x);
    pause(1);
end;

end

Explanation / Answer

A first-order filter, for example, reduces the signal amplitude by half (so power reduces by a factor of 4, or 6 dB), every time the frequency doubles (goes up one octave); more precisely, the power rolloff approaches 20 dB per decade in the limit of high frequency. The magnitude Bode plot for a first-order filter looks like a horizontal line below the cutoff frequency, and a diagonal line above the cutoff frequency. There is also a "knee curve" at the boundary between the two, which smoothly transitions between the two straight line regions. If the transfer function of a first-order low-pass filter has a zero as well as a pole, the Bode plot flattens out again, at some maximum attenuation of high frequencies; such an effect is caused for example by a little bit of the input leaking around the one-pole filter; this one-pole–one-zero filter is still a first-order low-pass. See Pole–zero plot and R