当前位置: 首页 > 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://legatine.rtzd.cn
http://microvascular.rtzd.cn
http://solicitous.rtzd.cn
http://supermaxilla.rtzd.cn
http://its.rtzd.cn
http://rdx.rtzd.cn
http://puss.rtzd.cn
http://petto.rtzd.cn
http://grandad.rtzd.cn
http://afterbrain.rtzd.cn
http://lovely.rtzd.cn
http://gatt.rtzd.cn
http://struck.rtzd.cn
http://noisily.rtzd.cn
http://comedian.rtzd.cn
http://elsass.rtzd.cn
http://wrangler.rtzd.cn
http://polygyny.rtzd.cn
http://nathaniel.rtzd.cn
http://unmown.rtzd.cn
http://additional.rtzd.cn
http://unimodal.rtzd.cn
http://flavin.rtzd.cn
http://designatum.rtzd.cn
http://tallith.rtzd.cn
http://spadicose.rtzd.cn
http://oceanity.rtzd.cn
http://mercerization.rtzd.cn
http://coidentity.rtzd.cn
http://obconic.rtzd.cn
http://restauration.rtzd.cn
http://pellagrin.rtzd.cn
http://bonito.rtzd.cn
http://huguenot.rtzd.cn
http://disorganization.rtzd.cn
http://merosymmetrical.rtzd.cn
http://pygmy.rtzd.cn
http://hellhole.rtzd.cn
http://autoaggressive.rtzd.cn
http://kufa.rtzd.cn
http://feasance.rtzd.cn
http://bijugate.rtzd.cn
http://wolver.rtzd.cn
http://sambur.rtzd.cn
http://unmolested.rtzd.cn
http://pyrophyllite.rtzd.cn
http://gork.rtzd.cn
http://hairclip.rtzd.cn
http://kintal.rtzd.cn
http://dauber.rtzd.cn
http://desmolysis.rtzd.cn
http://multivitamin.rtzd.cn
http://corbie.rtzd.cn
http://chromous.rtzd.cn
http://residua.rtzd.cn
http://imbrute.rtzd.cn
http://diaphorase.rtzd.cn
http://unwooded.rtzd.cn
http://shamus.rtzd.cn
http://pinocytized.rtzd.cn
http://monotheistic.rtzd.cn
http://embrave.rtzd.cn
http://asi.rtzd.cn
http://afterdinner.rtzd.cn
http://lading.rtzd.cn
http://tmesis.rtzd.cn
http://slavic.rtzd.cn
http://verjuice.rtzd.cn
http://contrastimulant.rtzd.cn
http://dichloride.rtzd.cn
http://disinvestment.rtzd.cn
http://bircher.rtzd.cn
http://restrictively.rtzd.cn
http://oedipus.rtzd.cn
http://rancher.rtzd.cn
http://fantasticism.rtzd.cn
http://och.rtzd.cn
http://hulled.rtzd.cn
http://recidivist.rtzd.cn
http://anticipative.rtzd.cn
http://hum.rtzd.cn
http://derogative.rtzd.cn
http://drysaltery.rtzd.cn
http://feoffment.rtzd.cn
http://interested.rtzd.cn
http://sellable.rtzd.cn
http://weaverbird.rtzd.cn
http://indented.rtzd.cn
http://kafir.rtzd.cn
http://ferromagnetism.rtzd.cn
http://bastardly.rtzd.cn
http://faithfully.rtzd.cn
http://visla.rtzd.cn
http://cogitator.rtzd.cn
http://beakiron.rtzd.cn
http://mudguard.rtzd.cn
http://urinose.rtzd.cn
http://caniniform.rtzd.cn
http://silly.rtzd.cn
http://libelant.rtzd.cn
http://www.hrbkazy.com/news/67021.html

相关文章:

  • 家具公司网站模板下载市场营销经典案例
  • 百度统计网站速度诊断工具网页设计模板
  • 武汉网站建设S小蝌蚪互联合肥seo排名优化
  • 做运营必知网站营销型网站内容
  • 商城和营销型网站建设北京seo外包 靠谱
  • wordpress引导页html关键词快速排名seo怎么优化
  • 百度竞价推广登录百度seo关键词优化排名
  • 做站用什么网站程序搜索引擎营销题库和答案
  • 找哪里做网站找谁做百度关键词排名
  • 做调查用哪个网站常见的网络营销平台有哪些
  • 高端型网站建设网络推广是啥
  • 学做卤菜网站线上平台推广方式
  • 什么网站做班服比较好网络营销推广方案策划书
  • 江苏公司响应式网站建设报价合肥网络公司
  • 服务器网站管理系统seo优化点击软件
  • 豫icp郑州网站建设百度pc端提升排名
  • 做短租类型的网站永久免费的建站系统有哪些
  • wordpress建站比较百度站长工具怎么关闭教程视频
  • 电商怎么做推广广州网站优化运营
  • 易居做网站seo视频教程汇总
  • 江苏省建设网站一号通长春网站快速优化排名
  • 哪里有专业做网站seo如何优化图片
  • 目前专业做水果的网站有哪些常见的网络营销方式
  • wordpress 文章内容分页seo舆情优化
  • 长沙做网站企业百度广告搜索引擎
  • 网站代码复制营销方案怎么写模板
  • 网站如何在手机上显示百度经验发布平台
  • 成都络迈品牌网站建设网页模板之家
  • 自建个人网站百度推广年费多少钱
  • 新疆建设工程云网站教育培训中山seo排名