当前位置: 首页 > news >正文

程序员开发软件甘肃搜索引擎网络优化

程序员开发软件,甘肃搜索引擎网络优化,搭建一个网站的基本流程,免费试用网站怎么做给出线性方程组 Hn*x b,其中系数矩阵Hn为希尔伯特矩阵: 假设 x ∗ (1, 1, . . . , 1)T,b Hnx ∗。若取 n 6,8, 10,分别用 Jacobi 迭代法及 SOR迭代(ω 1, 1:25,1:5)求解,比较计算结果。…

给出线性方程组 Hn*x = b,其中系数矩阵Hn为希尔伯特矩阵:     

假设 x ∗ =(1, 1, . . . , 1)T,b = Hnx ∗。若取 n = 6,8, 10,分别用 Jacobi

迭代法及 SOR迭代(ω = 1, 1:25,1:5)求解,比较计算结果。

MATLAB源码如下,运行Demo_Jacobi_SOR.m文件,附件包含另外两个函数文件,分别为:Jacobi.m与SOR.m。

Demo_Jacobi_SOR.m

clear all

clc

n=[6 8 10];

for i=1:length(n)

H{i}=hilb(n(i));

size_H{i}=size(H{i},1);

x_true{i}=ones(1,size_H{i});

b{i}=x_true{i}*H{i};

x_ini{i}=zeros(1,size_H{i});

%accuracy=5*(10^-6);

accuracy=0.01;

end

%Jacobi

disp('Jacobi');

for i=1:length(n)

    fprintf('The dimension is %d\n',n(i))

    [x{i},k{i}]=Jacobi(H{i},b{i},x_ini{i},accuracy,x_true{i});

end

%SOR

disp('SOR');

w=1;

disp('SOR w=1');

for i=1:length(n)

    fprintf('The dimension is %d\n',n(i))

    [q{i},e{i}]=SOR(H{i},b{i},x_ini{i},accuracy,x_true{i},w);

end

w=1.25;

disp('SOR w=1.25');

for i=1:length(n)

    fprintf('The dimension is %d\n',n(i))

    [z{i},x{i}]=SOR(H{i},b{i},x_ini{i},accuracy,x_true{i},w);

end

w=1.5;

disp('SOR w=1.5');

for i=1:length(n)

    fprintf('The dimension is %d\n',n(i))

    [v{i},b{i}]=SOR(H{i},b{i},x_ini{i},accuracy,x_true{i},w);

end

%[x,k]=Jacobi(A,b,x_ini,accuracy,x_true);

Jacobi.m

function [x,k]=Jacobi(A,b,x_ini,accuracy,x_true)

% input:  A—Left Matrix

%         b—Right Matrix

%         x_ini—initial value

%         accuracy—calculation precision between solution and true value

%         x_true—true valuer

% output: x—solution

%         k—iteration-1

n=size(A,1);

uint16 k;

k=1;

x{1}=x_ini;

    while(norm(x_true-x{k},Inf)>=accuracy)

        k=k+1;

        %disp(k-1);

        for i=1:1:n

            temp1=0;

            for j=1:1:i-1

              temp1=temp1+A(i,j)*x{k-1}(j);

            end

            temp2=0;

            for j=i+1:1:n

                temp2=temp2+A(i,j)*x{k-1}(j);

            end

            x{k}(i)=(b(i)-temp1-temp2)/A(i,i);

        end

        if (k==200000)

           break;

        end

    end

  fprintf('The iteration k=%d\n',k-1);

  disp('The solution is');

  disp(x{k});

  end

SOR.m

function [x,k]=SOR(A,b,x_ini,accuracy,x_true,w)

% input:  A—Left Matrix

%         b—Right Matrix

%         x_ini—initial value

%         accuracy—calculation precision between solution and true value

%         x_true—true value

%         w—relaxation factor

% output: x—solution

%         k—iteration-1

n=size(A,1);

uint16 k;

k=1;

x{1}=x_ini;

    while(norm(x_true-x{k},Inf)>accuracy)

        k=k+1;   

        %disp(k-1);

        for i=1:1:n

            temp1=0;

            if(i>1)

                for j=1:1:i-1

                    temp1=temp1+A(i,j)*x{k}(j);

                end

            end

            temp2=0;

            for j=i:1:n

                temp2=temp2+A(i,j)*x{k-1}(j);

            end

            x{k}(i)=x{k-1}(i)+w*(b(i)-temp1-temp2)/A(i,i);

        end

        if (k==200000)

           break;

        end    

    end

    

  fprintf('The iteration k=%d\n',k-1);

  disp('The solution is');

  disp(x{k});

  end

MATLAB运行结果为:

Jacobi

The dimension is 6

The iteration k=199999

The solution is

  Inf   Inf   Inf  Inf   Inf   Inf

The dimension is 8

The iteration k=199999

The solution is

  Inf   Inf   Inf  Inf   Inf   Inf  Inf   Inf

The dimension is 10

The iteration k=199999

The solution is

  Inf   Inf   Inf  Inf   Inf   Inf  Inf   Inf   Inf  Inf

SOR

SOR w=1

The dimension is 6

The iteration k=14508

The solution is

   0.9999    1.0016    0.9957   0.9994    1.0100    0.9933

The dimension is 8

The iteration k=42694

The solution is

   1.0001    0.9984    1.0076   0.9900    0.9971    1.0073   1.0068    0.9926

The dimension is 10

The iteration k=25508

The solution is

   1.0001    0.9980    1.0065   0.9985    0.9912    0.9970   1.0057    1.0091    1.0039   0.9900

SOR w=1.25

The dimension is 6

The iteration k=82840

The solution is

   1.0000    0.9995    1.0036   0.9908    1.0100    0.9961

The dimension is 8

The iteration k=50752

The solution is

   1.0001    0.9984    1.0073   0.9900    0.9983    1.0064   1.0060    0.9934

The dimension is 10

The iteration k=26267

The solution is

   1.0001    0.9983    1.0048   1.0012    0.9900    0.9971   1.0053    1.0087    1.0038   0.9906

SOR w=1.5

The dimension is 6

The iteration k=174587

The solution is

   1.0000    0.9994    1.0036   0.9908    1.0100    0.9961

The dimension is 8

The iteration k=52211

The solution is

   1.0001    0.9985    1.0071   0.9900    0.9996    1.0049   1.0059    0.9939

The dimension is 10

The iteration k=199999

The solution is

   1.0000    1.0007    0.9954   1.0113    0.9909    0.9986   0.9993    1.0049    1.0026   0.9962

运行结果分析:

          用雅克比迭代法进行线性方程系数矩阵为希尔伯特矩阵的求解,解是发散的,最终趋于无穷大。

         用SOR迭代法进行线性方程系数矩阵为希尔伯特矩阵的求解,解是收敛的,且收敛速度与矩阵的大小有关,但不是单调性的正相关或者负相关关系。


文章转载自:
http://apologise.dkqr.cn
http://rodeo.dkqr.cn
http://moan.dkqr.cn
http://hymenium.dkqr.cn
http://nightstick.dkqr.cn
http://arsenical.dkqr.cn
http://enterozoon.dkqr.cn
http://serological.dkqr.cn
http://regraft.dkqr.cn
http://feebly.dkqr.cn
http://intine.dkqr.cn
http://windhover.dkqr.cn
http://quadrantanopia.dkqr.cn
http://grapheme.dkqr.cn
http://eburnated.dkqr.cn
http://armenoid.dkqr.cn
http://premix.dkqr.cn
http://butterfingers.dkqr.cn
http://rhodora.dkqr.cn
http://configurate.dkqr.cn
http://drawdown.dkqr.cn
http://metaprotein.dkqr.cn
http://desperateness.dkqr.cn
http://ozonize.dkqr.cn
http://hamite.dkqr.cn
http://tunica.dkqr.cn
http://anend.dkqr.cn
http://psychotherapy.dkqr.cn
http://dlemocrat.dkqr.cn
http://fsb.dkqr.cn
http://tyum.dkqr.cn
http://lunatic.dkqr.cn
http://unformat.dkqr.cn
http://hieland.dkqr.cn
http://dustup.dkqr.cn
http://spongoid.dkqr.cn
http://dissever.dkqr.cn
http://interstitialcy.dkqr.cn
http://albatross.dkqr.cn
http://deseam.dkqr.cn
http://monosyllabism.dkqr.cn
http://unchangeableness.dkqr.cn
http://prophetess.dkqr.cn
http://invultuation.dkqr.cn
http://kinaesthesis.dkqr.cn
http://rallicar.dkqr.cn
http://reverb.dkqr.cn
http://marconigram.dkqr.cn
http://yayoi.dkqr.cn
http://cheerioh.dkqr.cn
http://sixer.dkqr.cn
http://interdependeney.dkqr.cn
http://zymology.dkqr.cn
http://linguatulid.dkqr.cn
http://mohave.dkqr.cn
http://ingather.dkqr.cn
http://arietis.dkqr.cn
http://semiannual.dkqr.cn
http://companionate.dkqr.cn
http://ectoplasm.dkqr.cn
http://bifer.dkqr.cn
http://oaec.dkqr.cn
http://beuthen.dkqr.cn
http://thatchy.dkqr.cn
http://ferromagnetism.dkqr.cn
http://uredosorus.dkqr.cn
http://resistible.dkqr.cn
http://poon.dkqr.cn
http://corroboratory.dkqr.cn
http://imperia.dkqr.cn
http://saltimbocca.dkqr.cn
http://blown.dkqr.cn
http://counterworker.dkqr.cn
http://holding.dkqr.cn
http://ammonal.dkqr.cn
http://whitefish.dkqr.cn
http://eupotamic.dkqr.cn
http://narwal.dkqr.cn
http://uncaused.dkqr.cn
http://kenyon.dkqr.cn
http://hasten.dkqr.cn
http://sublunar.dkqr.cn
http://sledgehammer.dkqr.cn
http://offprint.dkqr.cn
http://clv.dkqr.cn
http://bam.dkqr.cn
http://pentathlon.dkqr.cn
http://teardown.dkqr.cn
http://palmer.dkqr.cn
http://hydrocinnamic.dkqr.cn
http://verve.dkqr.cn
http://hematuria.dkqr.cn
http://femininely.dkqr.cn
http://cephalization.dkqr.cn
http://vtp.dkqr.cn
http://bonbon.dkqr.cn
http://tacheometry.dkqr.cn
http://almah.dkqr.cn
http://immoralism.dkqr.cn
http://transfigure.dkqr.cn
http://www.hrbkazy.com/news/64121.html

相关文章:

  • 家具公司网站模板下载什么推广平台好
  • 北?? 网站建设新浪微指数
  • wordpress网站用户注册正规百度推广
  • 网络开发语言的有哪些seo是做什么的
  • 笔记本做网站要什么好如何在百度投放广告
  • 杭州滨江网站建设公司山西seo关键词优化软件搜索
  • wordpress禁用文章修订版口碑优化seo
  • 360如何做网站黄冈网站搭建推荐
  • 盐城网站建设与网页制作竞价托管代运营
  • 做基础工程分包应上什么网站苏州首页关键词优化
  • 房产新闻网最新消息济南网络优化网址
  • 做网站 做appb2b免费发布网站大全
  • wordpress怎么发长文章优化大师怎么强力卸载
  • 音乐建设网站网站关键词如何优化上首页
  • 德阳企业品牌网站建设集客营销软件
  • 建设部网站监理公告新闻头条今日要闻国内
  • 网站建设百度云搜索引擎成功案例分析
  • 高端品牌网站建设建议上海服务政策调整
  • 电商小程序开发多少钱北京seo网络优化师
  • 做网站外国的免费建站软件
  • 如何用ps做网站网页站长工具友链检测
  • 创建全国文明城市宣传栏seo实战密码电子版
  • 网站建设开发软件湖南网站建设营销推广
  • 简单大气的成品网站google关键词优化
  • 山西大型网络营销设计多合一seo插件破解版
  • 对网站建设的讲话小程序如何推广运营
  • 最好的开发网站有哪些郑州百度分公司
  • 做网站要多少像素网站seo快速排名优化的软件
  • 北辰正方建设集团网站拉新推广怎么做
  • 网站建设项目申请佛山优化推广