-
Notifications
You must be signed in to change notification settings - Fork 1
/
convergence_AMPCG.m
57 lines (45 loc) · 1.12 KB
/
convergence_AMPCG.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
clear
close all
clc
lfrac=logspace(0,4,1000)
temp1=( (sqrt(lfrac)-1)./(sqrt(lfrac)+1))
temp2=( (sqrt(lfrac)-1)./(sqrt(lfrac)+1)).^2
temp3=( (sqrt(lfrac)-1)./(sqrt(lfrac)+1)).^3
temp4=( (sqrt(lfrac)-1)./(sqrt(lfrac)+1)).^10
semilogx(lfrac,temp1,'-',...
lfrac,temp2,'-',...
lfrac,temp3,'-',...
lfrac,temp4,'-')
legend('iter1','iter2','iter3','iter10')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % lfrac=logspace(-1,3,100)
% % power=linspace(1,10,10)
% %
% %
% % temp=[]
% %
% %
% % for p=power
% %
% % temp=[temp;real(( (sqrt(lfrac)-1)./(sqrt(lfrac)+1)).^p)];
% %
% %
% %
% % end
% %
% % figure()
% % [POWER,LFRAC]=meshgrid(power,lfrac)
% %
% % surf(real(POWER),real(LFRAC),temp')
% % hold on
% % surf(real(POWER),real(LFRAC),temp'*0)
% % %set(gca, 'XScale', 'log', 'YScale', 'log', 'ZScale', 'log')
% % set(gca, 'YScale', 'log')
% % %
% % % semilogx(lfrac,temp1,'-',...
% % % lfrac,temp2,'-',...
% % % lfrac,temp3,'-',...
% % % lfrac,temp4,'-')
% % %
% % %
% % % legend('iter1','iter2','iter3','iter4')