fixed point iteration and plotting iteration
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
David Goodmanson
il 18 Set 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?
Risposta accettata
Voss
il 19 Set 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 Commenti
Manahel
il 8 Mag 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
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
