资源简介
通过本次实验,熟练的掌握方程求根的最基本、常用的运算方法和理论。主要有二分法、牛顿法、弦截法,并体会它们各自不同的特点及收敛速率。
求方程 f(x)=x-2sin(x)=0 的非零根。按适当的比例在屏幕上画出f(x)的函数曲线以及根在x轴上的逼近过程。
matlab7.0及以上版本 图像界面 实验报告
代码片段和文件信息
function varargout = fangchengqiugen(varargin)
% FANGCHENGQIUGEN M-file for fangchengqiugen.fig
% FANGCHENGQIUGEN by itself creates a new FANGCHENGQIUGEN or raises the existing
% singleton*.
%
% H = FANGCHENGQIUGEN returns the handle to a new FANGCHENGQIUGEN or the handle to
% the existing singleton*.
%
% FANGCHENGQIUGEN(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in FANGCHENGQIUGEN.M with the given input arguments.
%
% FANGCHENGQIUGEN(‘Property‘‘Value‘...) creates a new FANGCHENGQIUGEN or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before fangchengqiugen_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to fangchengqiugen_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE‘s Tools menu. Choose “GUI allows only one
% instance to run (singleton)“.
%
% See also: GUIDE GUIDATA GUIHANDLES
% Copyright 2002-2003 The MathWorks Inc.
% Edit the above text to modify the response to help fangchengqiugen
% Last Modified by GUIDE v2.5 19-Nov-2008 23:18:42
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @fangchengqiugen_OpeningFcn ...
‘gui_OutputFcn‘ @fangchengqiugen_OutputFcn ...
‘gui_LayoutFcn‘ [] ...
‘gui_Callback‘ []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State varargin{:});
else
gui_mainfcn(gui_State varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before fangchengqiugen is made visible.
function fangchengqiugen_OpeningFcn(hobject eventdata handles varargin)
% This function has no output args see OutputFcn.
% hobject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to fangchengqiugen (see VARARGIN)
% Choose default command line output for fangchengqiugen
handles.output = hobject;
% Update handles structure
guidata(hobject handles);
% UIWAIT makes fangchengqiugen wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = fangchengqiugen_OutputFcn(hobject eventdata handles)
% varargout cell array for returning output args (see VARARGOUT);
% hobject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default com
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 376976 2008-12-11 19:48 实验四 方程求根\实验四 方程求根.doc
文件 7001 2008-11-30 22:40 实验四 方程求根\fangchengqiugen.fig
文件 27803 2008-11-30 22:40 实验四 方程求根\fangchengqiugen.m
目录 0 2008-12-11 20:04 实验四 方程求根
----------- --------- ---------- ----- ----
411780 4
评论
共有 条评论