fixed point iteration and plotting iteration
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Akansha
el 16 de Sept. de 2023
Comentada: Manahel
el 8 de Mayo de 2025
I have a map
such that
,
where
is closed unit disc in
and define
where ,
taking
,
, 
, i want a matlab code whch calculates
iteration for
in a table format and plots these iteration in
. i will be thankful if someone could help me with it.
2 comentarios
David Goodmanson
el 18 de Sept. de 2023
Hi Akansha, the statement x_n+1 = (1-lambda)x_n + lambda x_n appears to be incorrect since the outcome is the uninteresting x_n+1 = x_n. Also, how does T enter into it?
Respuesta aceptada
Voss
el 19 de Sept. de 2023
T = @(xy)xy([2 1]).*[-1 1];
n_iterations = 20;
lambda = [0.1 0.2 0.3 0.4];
n_lambda = numel(lambda);
result = cell(1,n_lambda);
for jj = 1:n_lambda
xy = zeros(n_iterations,2);
xy(1,:) = [0.5 1];
for n = 1:n_iterations
xy(n+1,:) = (1-lambda(jj))*xy(n,:) + lambda(jj)*T(xy(n,:));
end
result{jj} = array2table(xy,'VariableNames',{'x','y'},'RowNames',compose('%d',(0:n_iterations).'));
end
figure
hold on
for jj = 1:n_lambda
plot(result{jj}.x,result{jj}.y)
end
legend("lambda = "+lambda,'Location','NorthWest')
result{:}
3 comentarios
Manahel
el 8 de Mayo de 2025
How can I save both the graph and the iteration result tables into a PDF file in MATLAB? Also, where can we find an explanation for each step in the code so we can understand it better
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
