最小二乘参数辨识matlab程序

  • Y1_136523
    了解作者
  • matlab
    开发工具
  • 7.9KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-02-22 03:10
    上传日期
最小二乘参数辨识matlab程序,里面注释比较详细。
最小二乘参数辨识matlab程序
  • 最小二乘参数辨识程序.doc
    47.5KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/62798b24517cd20ea4d44206/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/62798b24517cd20ea4d44206/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">SI3.1_remindianzu.m</div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc0 ls0 ws0">clear all</div><div class="t m0 x1 h3 y4 ff1 fs0 fc0 sc0 ls0 ws0">close all</div><div class="t m0 x1 h3 y5 ff1 fs0 fc0 sc0 ls0 ws0">clc</div><div class="t m0 x1 h4 y6 ff1 fs0 fc0 sc0 ls0 ws0">T=[20.5 26 32.7 40 51 61 73 80 88 95.7];%<span class="ff2">&#28201;&#24230;</span></div><div class="t m0 x1 h4 y7 ff1 fs0 fc0 sc0 ls0 ws0">R=[765 790 826 850 873 910 942 980 1010 1032];%<span class="ff2">&#38459;&#20540;</span></div><div class="t m0 x1 h3 y8 ff1 fs0 fc0 sc0 ls0 ws0">[m,n]=size(T);</div><div class="t m0 x1 h3 y9 ff1 fs0 fc0 sc0 ls0 ws0">figure </div><div class="t m0 x1 h3 ya ff1 fs0 fc0 sc0 ls0 ws0">plot(T<span class="_ _0"></span>,R,'b+')</div><div class="t m0 x1 h3 yb ff1 fs0 fc0 sc0 ls0 ws0">t=0;</div><div class="t m0 x1 h3 yc ff1 fs0 fc0 sc0 ls0 ws0">z=0;</div><div class="t m0 x1 h3 yd ff1 fs0 fc0 sc0 ls0 ws0">tz=0;</div><div class="t m0 x1 h3 ye ff1 fs0 fc0 sc0 ls0 ws0">tt=0;</div><div class="t m0 x1 h3 yf ff1 fs0 fc0 sc0 ls0 ws0">for i=1:n</div><div class="t m0 x1 h3 y10 ff1 fs0 fc0 sc0 ls0 ws0"> t=t+T(i);</div><div class="t m0 x1 h3 y11 ff1 fs0 fc0 sc0 ls0 ws0"> tt=tt+T(i)*T(i);</div><div class="t m0 x1 h3 y12 ff1 fs0 fc0 sc0 ls0 ws0"> z=z+R(i);</div><div class="t m0 x1 h3 y13 ff1 fs0 fc0 sc0 ls0 ws0"> tz=tz+T(i)*R(i);</div><div class="t m0 x1 h3 y14 ff1 fs0 fc0 sc0 ls0 ws0">end</div><div class="t m0 x1 h3 y15 ff1 fs0 fc0 sc0 ls0 ws0">a=(tt*z-t*tz)/(n*tt-t*t);</div><div class="t m0 x1 h3 y16 ff1 fs0 fc0 sc0 ls0 ws0">b=(n*tz-t*z)/(n*tt-t*t);</div><div class="t m0 x1 h3 y17 ff1 fs0 fc0 sc0 ls0 ws0">R1=a+70*b;</div><div class="t m0 x1 h4 y18 ff1 fs0 fc0 sc0 ls0 ws0">%<span class="ff2">&#26368;&#23567;&#20108;&#20056;&#25311;&#21512;</span></div><div class="t m0 x1 h3 y19 ff1 fs0 fc0 sc0 ls0 ws0">A=polyfit(T<span class="_ _0"></span>,R,1);</div><div class="t m0 x1 h3 y1a ff1 fs0 fc0 sc0 ls0 ws0">z=polyval(A,T);</div><div class="t m0 x1 h4 y1b ff1 fs0 fc0 sc0 ls0 ws0">%<span class="ff2">&#30011;&#22270;</span></div><div class="t m0 x1 h3 y1c ff1 fs0 fc0 sc0 ls0 ws0">figure</div><div class="t m0 x1 h3 y1d ff1 fs0 fc0 sc0 ls0 ws0">plot(T<span class="_ _0"></span>,z);</div><div class="t m0 x1 h3 y1e ff1 fs0 fc0 sc0 ls0 ws0">figure</div><div class="t m0 x1 h3 y1f ff1 fs0 fc0 sc0 ls0 ws0">plot(T<span class="_ _0"></span>,R,'b+')</div><div class="t m0 x1 h3 y20 ff1 fs0 fc0 sc0 ls0 ws0">hold on</div><div class="t m0 x1 h3 y21 ff1 fs0 fc0 sc0 ls0 ws0">plot(T<span class="_ _0"></span>,z,'r');</div><div class="t m0 x1 h3 y22 ff1 fs0 fc0 sc0 ls0 ws0">hold off</div><div class="t m0 x1 h3 y23 ff1 fs0 fc0 sc0 ls0 ws0">SI3.2_LS.m</div><div class="t m0 x1 h3 y24 ff1 fs0 fc0 sc0 ls0 ws0">clear all</div><div class="t m0 x1 h3 y25 ff1 fs0 fc0 sc0 ls0 ws0">close all</div><div class="t m0 x1 h3 y26 ff1 fs0 fc0 sc0 ls0 ws0">clc</div><div class="t m0 x1 h3 y27 ff1 fs0 fc0 sc0 ls0 ws0">randn('seed',100)</div><div class="t m0 x1 h4 y28 ff1 fs0 fc0 sc0 ls0 ws0">v=randn(1,16); %<span class="ff2">&#20135;&#29983;&#19968;&#32452;<span class="_ _1"> </span></span>16<span class="_ _1"> </span><span class="ff2">&#20010;<span class="_ _1"> </span></span>N(<span class="_ _2"></span>0,1)<span class="ff2">&#30340;&#39640;&#26031;&#20998;&#24067;&#30340;&#38543;&#26426;&#22122;&#22768;</span></div><div class="t m0 x1 h4 y29 ff1 fs0 fc0 sc0 ls0 ws0">% M<span class="_ _1"> </span><span class="ff2">&#24207;&#21015;&#20135;&#29983;&#31243;&#24207;</span></div><div class="t m0 x1 h4 y2a ff1 fs0 fc0 sc0 ls0 ws0">L=15;% M<span class="_ _1"> </span><span class="ff2">&#24207;&#21015;&#30340;&#21608;&#26399;</span></div><div class="t m0 x1 h4 y2b ff1 fs0 fc0 sc0 ls0 ws0">y1=1;y2=1;y3=1;y4=0;%<span class="ff2">&#22235;&#20010;&#31227;&#20301;&#31215;&#23384;&#22120;&#30340;&#36755;&#20986;&#21021;&#22987;&#20540;</span></div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • matlab 课件
      matlab 功能很强大,本课件详细的介绍了matlab在科学计算中的应用。
    • Matlab教程
      MatlaB经典ppt,主要讲解了MatlaB的入门知识,图形编程以及仿真。
    • matlab入门
      matlab的入门教程,很值得仔细看看,对提高matlab能力有帮助
    • matlab编译器
      matlab编译为exe文件所需要的文件; 使用时解压,将解压后文件拖入至matlab命令行即可
    • matlab
      matlab的基础知识进行介绍
    • MatLab
      “#MatLab
    • MATLAB编译器
      基于MATLAB 2018b版本介绍MATLAB编译器。介绍如何利用编译器将MATLAB代码编译为独立应用程序或组件,并在没有安装MATLAB的计算机上进行部署。
    • MATLAB 论文
      基于MATLAB的论文撰写!可以为你指明一条写作MATLAB论文的道路!
    • matlab
      matlab经典课堂讲义
    • matlab
      matlab