matlab学习笔记(2)

2019-04-16 20:27

标准差的点估计值, muci是均值的区间估计,sigmaci是标准差的区间估计.

(1)[muhat, muci] = expfit(X,alpha)----- 在显著性水平alpha下,求指数分布的数据X的均值的点估计及其区间估计.

(2)[lambdahat, lambdaci] = poissfit(X,alpha)----- 在显著性水平alpha下,求泊松分布的数据X 的参数的点估计及其区间估计.

(3)[phat, pci] = weibfit(X,alpha)----- 在显著性水平alpha下,求Weibull分布的数据X 的参数的点估计及其区间估计. 6、假设检验:

在总体服从正态分布的情况下,可用以下命令进行假设检验、 总体方差sigma2已知时,总体均值的检验使用 z-检验 [h,sig,ci] = ztest(x,m,sigma,alpha,tail)

检验数据 x 的关于均值的某一假设是否成立,其中sigma 为已知方差, alpha 为显著性水平,究竟检验什么假设取决于 tail 的取值: tail = 0,检验假设“x 的均值等于 m ” tail = 1,检验假设“x 的均值大于 m ” tail =-1,检验假设“x 的均值小于 m ” tail的缺省值为 0, alpha的缺省值为 0.05.

返回值 h 为一个布尔值,h=1 表示可以拒绝假设,h=0 表示不可以拒绝假设,sig 为假设成立的概率,ci 为均值的 1-alpha 置信区间. 总体方差sigma2未知时,总体均值的检验使用t-检验 两总体均值的假设检验使用 t-检验

非参数检验:总体分布的检验

7、Matlab工具箱提供了两个对总体分布进行检验的命令: 1)h = normplot(x)

此命令显示数据矩阵x的正态概率图.如果数据来自于正态分布,则图形显示出直线性形态.而其它概率分布函数显示出曲线形态.

h = weibplot(x) 14、

两自变量作图: ezsurf(f) ezsurf(f,domain) ezsurf(x,y,z)

ezsurf(x,y,z,[smin,smax,tmin,tmax]) ezsurf(。。。,n); ezsurf(。。。,‘circ’)

domain两自变量的定义域。x,y,z:参数方程 [smin,smax,tmin,tmax]自定义绘图区域, n 网格点的数,circ’作图定义于为圆

15、优化问题:(具体解释可以参考1、优化问题)

线形规划:linprog

非线性规划问题:有约束的一元函数的最小值:fminbnd

无约束多元函数最小值:fminsearch fminunc(阶数达时) 有约束的多元函数最小值:fmincon function y=objfun(x); M文件:

y=exp(x(1))*(4*x(1)^2+2*x(2)^2+4*x(1)*x(2)+2*x(2)+1); %编写返回约束之的函数 function [c ceq]=confun(x) %非线性不等式约束

c=[1.5+x(1)*x(2)-x(1)-x(2):-x(1)*x(2)-10]; %线形等式约束、 ceq=[]; x0=[-1,1];

options=optimset('largescale','off');

>> [x.fval]=fmincon('objfun',x0,[],[],[],[],[],[],'confun',options) 二次规划问题quadprog “半无限”有约束的多元函数最优解fseminf 极小化极大(Minmax)问题 多目标规划问题

最小二乘最优问题: 约束线性最小二乘lsqlin()

非线性数据(曲线)拟合: 在MATLAB5.x中,使用函数curvefit解决这类问题。现在用函数 lsqcurvefit

非线性最小二乘lsqnonlin 非负线性最小二乘lsqnonneg

非线性方程(组)求解fzero

非线性方程组的解 fsolve

16

、图论工具箱的使用说明:下面是从网上搜索到的图论工具箱,但有些英文确

实不能理解,请教各位牛人

GrTheory - Graph Theory Toolbox. Functions:

一些例子 grTheoryTest - test program for all functions. grBase - find all bases of digraph;

grCoBase - find all contrabases of digraph;

寻找独立的割集grCoCycleBasis - find all independent cut-sets for a connected graph; 边着色问题 grColEdge - solve the color problem for graph edges; 点着色问题grColVer - solve the color problem for graph vertexes; 寻找所有的连通分枝grComp - find all components of graph;

连通图的独立圈grCycleBasis - find all independent cycles for a connected graph;

有向图分解为强连通分枝grDecOrd - solve the problem about decomposition(分解) of the digraph to the sections with mutually accessed vertexes (strongly connected components强连通的分枝); 最短路问题grDistances - find the distances between any vertexes of graph;

grEccentricity - find the (weighted) eccentricity(离心率) of all vertexes, radius, diameter, center vertexes and the periphery(外围) vertexes; 寻找欧拉图grIsEulerian - find the Eulerian cycle of graph;

寻找最大完全子图grMaxComSu - solve the maximal complete sugraph problem for the graph; 网络中的最大流grMaxFlows - solve the maximal flow problem for the digraph; 寻找最大匹配grMaxMatch - solve the maximal matching problem for the graph; grMaxStabSet - solve the maximal stable set(稳定集) problem for the graph; grMinAbsEdgeSet - solve the minimal absorbant set problem for the graph edges; grMinAbsVerSet - solve the minimal absorbant set problem for the graph vertexes; 寻找最小割集grMinCutSet - solve the minimal cut-set problem for the digraph; 寻找最小边覆盖grMinEdgeCover - solve the minimal edge cover problem for the graph; 寻找最小生成树grMinSpanTree - solve the minimal spanning tree problem for the graph; 寻找最小点覆盖grMinVerCover - solve the minimal vertex cover problem for the graph; grPERT - solve the project evaluation research task;

画图(有向或无向)grPlot - draw the plot of the graph (digraph);

寻找有向图的最短路问题grShortPath - solve the shortest path problem for the digraph;

寻找不对称的旅行者问题(TSP问题)grTravSale - solve the nonsymmetrical traveling salesman problem; grValidation - auxiliary function (the data validation);

还可以参考2、图论算法

17、回归分析:(详细可见回归工具)

经典例之:x=[143 145 146 147 149 150 153 154 155 156 157 158 159 160 162 164]'; >> X=[ones(16,1) x];

>> Y=[88 85 88 91 92 93 93 95 96 98 97 96 98 99 100 102]'; >> [b,bint,r,rint,stats]=regress(X,Y) ??? Error using ==> regress Y must be a vector.

>> [b,bint,r,rint,stats]=regress(Y,X)

>> rcoplot(r,rint)%%%可以看出第2个 可以删取

>> X(2,:)=[];Y(2)=[];

>> [b,bint,r,rint,stats]=regress(Y,X) 多元二项回归:有两种方法:

1)>> x1=[1000 600 1200 500 300 400 1300 1100 1300 300]; x2=[5 7 6 6 8 7 5 4 3 9];

y=[100 75 80 70 50 65 90 100 110 60]'; x=[x1' x2'];

>> rstool(x,y,'purequadratic') 2)略

非线性拟合包括函数拟合


matlab学习笔记(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:公路工程内业资料整理填写及归档范例

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: