Matlab_Gui在线性回归中的应用

第21卷 第3期文山师范高等专科学校学报

Vol 21 No 3Matlab-Gui在线性回归中的应用

程 高,施秀萍

(文山师范高等专科学校数理系,云南文山663000)

[摘要]文章分析了线性回归的主要统计量,在此理论基础上用Matlab创建Gui并通过实例演示分析线性回归

[关键词]线性回归;Matlab;Gui

[中图分类号] O211 [文献标识码] A [文章编号] 1671-3303(2008)03-0094-04 线性回归是概率统计中比较具有应用价值的一个内容,主要的统计量有回归系数、线性相关系数、点的置信区间、F检验统计量、残差 为了使问题回归的各个量比较准确的描述实际问题,一般样本容量都会取得比较大,而此时,烦琐的数据处理就会给问题的分析带来不便 Matlab在数据处理方面具有较强的功能,但是在软件的执行中对命令格式的要求非常严格,而且难于记忆,对于普通用户来说,使用Matlab进行复杂的科学计算并不是件容易的事,于是,为命令提供容易的界面就有了重要意义 文章以Matlab的Gui为工具开发了简单直观的用户对话窗口,通过实例演示,使用者可以方便求解和分析线性回归

W , max ,1, min ,1);

h2_e=uicontrol(gc,f style , e , Horizonta-lalignment , l , position ,[20,280,300,20], cal-lback , f2=get(h2_e, string ); , background , W , max ,1, min ,1);

h3_e=uicontrol(gc,f style , e , Horizonta-lalignment , l , position ,[200,200,120,20], background , W , callback , lm=get(h3_e, string ); , enable , inactive );

h4_e=uicontrol(gc,f style , e , Horizonta-lalignment , l , position ,[200,160,120,20], background , W , callback , x0=get(h4_e, string ); , enable , inactive );

h5_e=uicontrol(gc,f style , e , Horizonta-lalignment , l , position ,[200,120,120,20], background , W , enable , inactive );

h6_e=uicontrol(gc,f style , e , Horizonta-lalignment , l , position ,[200,80,120,20], background , W , enable , inactive );

h7_e=uicontrol(gc,f style , e , Horizonta-lalignment , l , position ,[200,40,120,20], background , W , enable , inactive );

h8_e=uicontrol(gc,f style , e , string , , Horizontalalignment , l , position ,[200,5,120,20], background , W , enable , inactive );

%定义文本编辑框

h1_t=uicontrol(gc,f style , text , position ,

1 线性回归的Matlab界面设计

1 1 Matlab程序设计

Matlab主程序:clear

h0=figure( menubar , none , position ,[198,56,360,400], numbertitle , off , name , 线性回归 );

%定义主窗口

msgbox( 输入置信度、预测点x0、临界值Lamb-da,将得到相应的预测区间 );

%定义提示框

h1_e=uicontrol(gc,f style , e , position ,[20,340,300,20], HorizontalAlignment , l , cal-lback , f1=get(h1_e, string ); , background ,

[收稿日期]2008-04-11

[作者简介]程 高(1978-),男,云南宣威人,助教,主要从事应用统计研究;施秀萍(1980-),女,彝族,云南富源人,讲师,主要从事信息与通信系统研究

Matlab_Gui在线性回归中的应用相关文档

最新文档

返回顶部