How to use the MATSLISE GUI pagina 1 van 7 How to use the MATSLISE GUI MATSLISE can be used to solve differential equation eigenvalue problems that can be put in the general form of the classical Sturm-Liouville problem on a finite or infinite interval with boundary conditions at the ends as appropriate. A value of the eigenparameter E for which there is a nontrivial solution - that is, not identically zero- subject to the boundary conditions, is called an eigenvalue, and the solution is the corresponding eigenfunction. We will illustrate how the MATSLISE GUI works by using it to compute the eigenvalues and eigenfunctions of the following problem: which has known analytic forms for its eigenvalues: This problem is included as an example problem which can be loaded into the MATSLISE GUI. Use the option Open from the File menu to open Klotter.mat from the MATSLISE examples directory. The GUI is simply opened by typing the command matslise at the Matlab command line: >> matslise Problem Specification file://C:\helpMatslise\gui.html 20/05/2014 How to use the MATSLISE GUI pagina 2 van 7 The figure shows the problem-specification fields for our example problem: • • • • • • p(x): a stricly positive continuous function. q(x): a continuous function. w(x): a stricly positive continuous function. xmin,xmax: the integration interval (real values) The boundary conditions Parameters In all fields Matlab notation needs to be used. Note that the user is allowed to enter -inf or inf in the integration-interval-fields (xmin and xmax) in order to specify an infinite interval. The Plot-button can be used to generate a plot of the coefficient functions. The clear-button clears all the problem specification fields. It is possible to use a parameter in the input fields for the coefficient functions, the integration interval or the boundary conditions. When any of these input fields contains a parameter the user must enter the name of the parameter and the value in the Parameters input field. file://C:\helpMatslise\gui.html 20/05/2014 How to use the MATSLISE GUI pagina 3 van 7 The parameter-fields can also be used to replace rather lengthy subexpressions in one of the coefficient functions by a parameter Multiple parameters are separated by a comma: Eigenvalue Computations The Eigenvalues-part of the MATSLISE GUI allows the user to calculate the eigenvalues of the problem he/she specified. There are two options: (i) one can calculate a set of eigenvalues with indices between a user-specified lower-and upper limit (ii) one can use MATSLISE to calculate eigenvalues between a lower and upper limit. Pressing the Compute-button starts the computations. When the computations have finished the results appear in the results listbox. The computed indices and eigenvalues are shown. Also for each eigenvalue approximation an (absolute) error estimation is given, which is the difference between this eigenvalue approximation and a reference approximation computed by a reference method (usually a higher order method). A positive double precision constant representing the accuracy requested by the user can be entered in the Accuracy input field. Indices between...and... The user enters a lower and upper index. The eigenvalues with index between this lower and upper index will be calculated. One single eigenvalue is calculated when the upper index is equal to the lower index. The eigenvalues are indexed from 0, not 1. file://C:\helpMatslise\gui.html 20/05/2014 How to use the MATSLISE GUI pagina 4 van 7 Eigenvalues between...and... The user specifies the lower and upper limits of the interval to be scanned for eigenvalues, e.g. when the user wants to calculate the eigenvalues larger than 20 and smaller than 50, he enters 20 and 50 in the two inputfields. Plotting the results The Plot button creates a graphical representation of the computed eigenvalues. A MATLAB figure window is opened with a plot of the eigenvalues with respect to their indices. The figure can be saved and edited like any MATLAB figure. If the problem is in Liouville normal form (i.e. p(x)=w(x)=1) a second figure window is opened showing the eigenvalues together with the potential function q(x). Save results into MATLAB workspace The Workspace button allows the user to make the results accessible from the MATLAB workspace. In this way the eigenvalue approximations can be easily used in further computations. file://C:\helpMatslise\gui.html 20/05/2014 How to use the MATSLISE GUI pagina 5 van 7 The user enters variable names for the vectors of indices, eigenvalues and their estimated errors. Eigenfunction Computations After the computation of the eigenvalue approximations, one can use MATSLISE to compute the associated (normalized) eigenfunctions. Of course reliable evaluations of the eigenfunctions can only be obtained if the approximated eigenvalues are sufficiently accurate, i.e. the input accuracy tolerance should be sufficiently low and the eigenvalues are well-separated. There are two popupmenus. The user can select an eigenfunction from the first popupmenu: only eigenfunctions for which an eigenvalue was computed can be selected. In the second popupmenu, the user has to specify if the eigenfunction needs to be evaluated only in the mesh points or in a vector of user-specified x-values. The Compute-button starts the eigenfunction computations and shows the obtained results in the listbox. Also a regular MATLAB plot of the eigenfunction y and its (pseudo)derivative py' is generated. The red dots correspond to the eigenfunction results which are listed in the listbox. Also a more smooth graphical representation of the eigenfunction is displayed in blue, which is the eigenfunction computed over a larger number of evaluation points spread over the problem domain. The figure can be edited like any MATLAB figure e.g. by using the figure toolbar. There are many possible uses for eigenfunction data. In order to allow the user to use the MATSLISE eigenfunction results in other applications, the eigenfunction evaluations computed in the MATSLISE GUI can be saved into workspace variables (vectors) using the Workspace-button Evaluation of an eigenfunction in the mesh points In this case, a click on the Compute-button leads to the computation and the display of the eigenfunction y(x) and the derivative p(x)y'(x) in the mesh points as red dots in the figure windows. These mesh points are automatically generated by MATSLISE during the eigenvalue computations. file://C:\helpMatslise\gui.html 20/05/2014 How to use the MATSLISE GUI pagina 6 van 7 Evaluation of an eigenfunction in user-specified points The number of mesh points needed by the CP algorithm is usually quite small. Evaluations of the eigenfunction in only these mesh points may be unsufficient to have a clear idea about the shape of the eigenfunction. Moreover there are many possible uses for eigenfunctions. In many cases, it may then be convenient for the user to be able to provide an array of x points and having the corresponding eigenfunction values returned. The array of x points is a vector variable in the MATLAB workspace, the MATSLISE user is asked for the name of this variable. file://C:\helpMatslise\gui.html 20/05/2014 How to use the MATSLISE GUI pagina 7 van 7 Saving and loading problems in the MATSLISE GUI Using the Open and Save As options in the File menu, the user can save a problem specification into a MAT-file and reopen it later. The MATSLISE package contains a directory examples with predefined problems which can be loaded into the MATSLISE GUI. This MATSLISE test set collects problems which are commonly used to test Sturm-Liouville software, some examples from physical applications and some classical mathematical problems. Many examples have been taken from earlier test sets: • the list of test problems provided by John D. Pryce in the book Numerical Solution of SturmLiouville Problems, Oxford University Press, 1993 and the SLTSTPAK package: A test package for Sturm-Liouville solvers, ACM Trans. Math. Software 25 (1999). • the catalogue of Sturm-Liouville problems composed by W.N. Everitt: A Catalogue of SturmLiouville differential equations, in: Sturm-Liouville Theory. Past and Present, W.O. Amrein, A.M. Hinz, D.B. Pearson (eds), Birkhauser-Verlag 2005. What is MATSLISE? file://C:\helpMatslise\gui.html Using MATSLISE via the command line? 20/05/2014
© Copyright 2025 ExpyDoc