Academia.eduAcademia.edu

R‐Interface: An alternative GUI for MATLAB

2006, Computer …

R-Interface: An Alternative GUI for MATLAB MARÍA J. LADO,1 ARTURO J. MÉNDEZ,1 EMILIO GARCÍA ROSELLÓ,2 JACINTO GARCÍA DACOSTA,2 JOSÉ BALTASAR GARCÍA PÉREZ-SCHOFIELD,1 MANUEL PÉREZ COTA2 1 Department of Computer Science, Escuela Superior de Ingenierı´a Informática, University of Vigo, Campus As Lagoas-s/n, 32004 Ourense, Spain 2 Department of Computer Science, Edif. Fundicio´n, University of Vigo, Campus Lagoas-Marcosende, 36200 Vigo, Spain Received 25 July 2005; accepted 29 December 2005 ABSTRACT: We present R-Interface, a software application that offers an alternative graphical user interface (GUI) to MATLAB engine and functionality. The purpose of this work is to present a solution based on encapsulating and reusing proprietary environments. This will allow developing custom user interfaces where we can enhance particular features, as educational ones, in order to have more comprehensive and really user friendly GUIs. Since functionality is reused, and therefore it does not have to be implemented, we will have the possibility to build powerful and ad hoc tools for teaching and investigating, in a short term and at low costs.ß2006 Wiley Periodicals, Inc. Comput Appl Eng Educ 14: 313 320, 2006; Published online in Wiley InterScience (www.interscience.wiley.com); DOI 10.1002/cae.20081 Keywords: software engineering; computer-assisted education; MATLAB applications INTRODUCTION Nowadays, there is an extraordinary interest in the development and usage of educational software in different areas of engineering education to empower procedural and practical learning [1 5]. Typical advantages of computer-based learning, including increased learning speed and retention, lower dropout, and a better acceptance by the students, are described elsewhere [6,7]. Simultaneously, there are some proprietary software environments in the engineering domain that are practically de facto standards, thanks to offering, among other things, a broad functionality, Correspondence to M. J. Lado (mrpepa@uvigo.es). ß 2006 Wiley Periodicals Inc. robustness, and constant updating. Since the development of ad hoc tools with a graphical user interface (GUI), suitable to educational purposes, is an arduous and costly work, if a similar functionality is required, several of those software environments are widely used in pre- and postgraduated engineering courses and related studies. One relevant example of this situation is MATLAB [8] (see e.g., its regular presence in congresses or journals such as Computer Applications in Engineering Education [13] or Frontiers in Education [14]). But due to the fact that they are not specifically software-designed for educational purposes, they are hard to employ for students, thus hindering learning. The most common solution to this problem is to develop a specific GUI for the learning of particular 313 314 LADO ET AL. contents. For example, Báez-López et al. [2] employed MATLAB for implementing a software package for filter design, to serve as a teaching aid in analog and digital filter design courses; they also remarked that a user could take advantage of the power of the MATLAB signals toolbox without any previous knowledge of MATLAB. Cathey [3] presented a MATLAB-based program for generating plots for an amortization study of the cost of adjustable speed drives of three-phase induction motors. Joshi [4] implemented a MATLAB computer simulation software to teach autonomous robotics as a part of an introductory graduate course. Kim et al. [5] developed a webbased engineering numerical software supporting MATLAB for providing basic solutions in linear algebra. Recently, a software to web-enable MATLAB has been developed [9], in which the authors intended to achieve the sharing of MATLAB through web browsers. This will be suitable for Internet-based distance co-working and collaboration, and therefore, distance learning and tutoring. In other situations, when the goal is to teach how to use MATLAB, or to introduce the student to some broad part of its functionality, the options are clearly more restricted. Some possibilities are to use coursewares, tutorials, help files, or similar computer-based materials [10], but they can be too restrictive, timeconsuming, and expensive to develop. In this work, we illustrate another solution, based on integrating and reusing MATLAB to develop an alternative GUI, in order to have at our disposal a user-friendly and educational featured software to be exploited in the classroom. This possibility of integrating and reusing MATLAB to provide the internal functionality to our educational software allows for the development at reduced costs, in a short time, and without losing functionality regarding proprietary environment. This reuse of the functionality of the proprietary environment was accomplished by means of a reusable component, previously developed and described elsewhere, that encapsulates it, thus allowing its easy integration in other softwares [11]. Consequently, R-Interface, the alternative educational GUI for MATLAB that we present in this work, is an example of a powerful custom tool developed in a short term and at low cost. R-INTERFACE DESCRIPTION R-Interface Development R-Interface has been developed as an alternative user interface for MATLAB, integrating the MATLAB engine as a component, and completely hiding its user interface. In this way, the user only has to deal with R-Interface, without losing MATLAB functionality. To perform this task, an API that allows the use of the MATLAB engine from another process is needed. Even though MATLAB incorporates several APIs to integrate routines or components into the MATLAB environment, it offers less powerful possibilities to make use of the MATLAB engine from other applications. To overcome this limitation, we developed a reusable component library that implements a real object-oriented, comprehensive, and easy-to-use API to integrate the MATLAB functionality in other local/distributed software environments. This library has already been described in Reference 11. R-Interface basically implements a multiple document interface (MDI) as a user interface with MATLAB engine, employing the services offered by the quoted library to interface with its engine in order to offer the same internal functionality. Visual Appearance and User Interface of R-Interface The GUI of R-Interface is specially designed to be simple and intuitive for inexperienced users and thus, for learning purposes. At the same time, it must respect and obey the learning of MATLAB concepts and operation. Therefore, its design is a compromise between both goals. Once the application is running, the appearance of R-Interface is quite similar to those that can be present in other widely used softwares (such as Microsoft Excel, for example), thus facilitating the use of the graphical interface, since the users are already familiar with the menu bars, the icons, and the popup helps included. The user can open a MATLAB session from R-Interface, which then runs a hidden MATLAB engine, but which is transparent to the user, which only interacts with R-Interface. Figure 1 shows a typical session of the R-Interface environment. A toolbar is presented, incorporating options for open and save files, zooming, as well as help options. A command box appears at the top of the window, where the user can directly type one or more MATLAB commands, and execute it with a unique mouse click or key press. A result log box shows the commands executed and the answers obtained from the MATLAB engine. This box can be displayed in both a tabular or textual form. Specific colors are used to identify text corresponding to commands, normal, error, and warning answers from MATLAB engine. In the bottom part of the window, there are three elements that deserve comments. Similar elements R-INTERFACE 315 Figure 1 R-Interface main user interface. already exist in MATLAB user interface, even though here we have added and enhanced learning-oriented features:  A History list, which presents all the commands executed in the R-interface session. A command can be easily re-executed or copied to the command box by using the mouse. Moreover, when a command from this list is selected, the Result log box automatically highlights the corresponding answer obtained (and vice versa). A command, a selection or all of them can also be easily copied to the clipboard.  A Variables list, which shows all the variables created in the current MATLAB session. The list shows their name, size, and dimensions (given all MATLAB variables are matrix). Different icons are used for each type of variable, thus facilitating its identification by the user. A variable name, a selection or all of them can also be easily copied to the clipboard.  A Figure tabbed notebook, which shows the figures created by the user, each one in a tab. The user can open a window to see a figure enlarged by simply clicking it, as well as copying it to the clipboard. It must be remarked that all these panels can be resized and moved along the screen, with a click of the mouse. Moreover, both the Variables and the History List allow for performing drag and drop from the Command Box, and the corresponding icons identifying the different types of variables are used along all the R-Interface session, including icons for windows, features objects, register fields, and cell contents. In addition to traditional help, R-Interface incorporates detailed info tips and popup menus in almost all the elements of the user interface. This is a friendly feature for users, who only have to position the mouse over an element to see a popup help about it, and to click to do tasks associated with the element. Moreover, most of the users are probably habituated to these features, as they are incorporated in most currently used softwares. Other important characteristics of R-Interface are the visual editors for all the data types provided by MATLAB, such as multidimensional matrices (either numerical or character matrices), data structures, or objects, such as the window showing the neural network object shown in Figure 1. To edit a variable in the corresponding visual editor, the user has just to double click on this variable in the Variables list. The visual editors show the variable name, dimensions, and type. If the variable has more than two dimensions, the editors allow the user for showing it as either a flat two-dimensional matrix or as a multidimensional matrix. The user can select the dimensions that will be in both rows and columns, and can 316 LADO ET AL. also fix the remainder dimensions to a specific value. The contents of a variable can be modified, and in the case of variables containing subelements, such as fields (structs), properties (objects), or cells (cellarrays), a simple click allows the user for editing this subelement in the corresponding visual editor. Moreover, in the editors of variables including subelements, the type of each of them is identified employing the same icons as in the Variables list. Finally, an interesting aspect that should be remarked when describing the R-Interface environment is the on-line help, that incorporates a specific help for the R-Interface managing, and the classical MATLAB help about the command language topics, but placed in a separate window (Fig. 2), thus allowing the user for checking the help when needed. This help window has a popup menu that allows the user to easily copy the help text, as well as to find another word that appears in this text simply by selecting it and using an option of this menu. It also shows in another color the ‘‘See also’’ section of the command help text. R-Interface also allows user to consult the web-based help provided with MATLAB. Advanced Features of R-Interface R-Interface is a MDI environment, thus it provides the possibility of opening and working with multiple simultaneous MATLAB sessions at the same time, from the same window frame, and easily exchange data between them: a simple click of the mouse allows for copying/pasting variables between sessions. In this way, the user can effortlessly work with different sessions, as well as share data between them. This is useful for easily testing several solutions for the same problem, for example, dividing a task into several pieces (especially in combination with the distributed capabilities of R-Interface). Since R-Interface is developed using a reusable component library that allows for opening and working with both local and remote MATLAB engines, a user can work with local or remote sessions, or with a mix of them, without any difference in the interface, which is totally transparent. Variables can be shared among local and remote sessions, and the sessions can be saved to or loaded from local files. Moreover, the users can save their work in their own computer. Figure 2 Command language help window in R-Interface. R-INTERFACE 317 Figure 3 Several steps of a sample graph creation wizard. Another feature of R-Interface for educational purposes is the possibility to use wizards. Through a COM interface, R-Interface can integrate third-party developed wizards or assistants, which can achieve any task. Typically, they guide the user step-by-step to fulfill a task (i.e., creating a graph or using a function), in a very similar way that wizards from softwares like Microsoft Excel, for example. The wizards can generate a MATLAB command, and the user, apart from performing the task, can see and learn how it is really executed (Fig. 3). Since developers can build their own wizards using their preferred development tool and integrate them in R-Interface, any task can be made relatively easy for users, thus allowing for simplification, and also direct and focus the learning in the desired outcomes. This can also be used to facilitate interfacing with other software environments to the user; a simple wizard to create graphs in Microsoft Excel from MATLAB data could be easily built, for example. R-Interface currently offers the user interface in three languages (Spanish, English, and French) and can easily incorporate other ones. This is an important feature for educational use of a software environment, as it facilitates usage and subsequent learning. SOFTWARE EVALUATION To compare the usability of the R-Interface versus the MATLAB user interface, both of them were presented to different users, who were asked to cover a questionnaire for obtaining statistically useful information from both software packages. To construct the feedback form, several aspects to compute the effectiveness and efficiency of the software were taken into consideration, including measures for completion rates and errors, time on task, and satisfaction questions. More specifically, several tasks were defined, and the users were asked to indicate, for each of them: (1) the satisfaction degree, computed as an average of different measures, categorizing all of them on a five-point scale, including the ease of task (1: very difficult, 5: very easy), and the overall task satisfaction (1: unsatisfied, 5: very satisfied); (2) the completion of the proposed task, codified in terms of a binary response (1: completed task, 0: failed task); (3) the raw error account; and (4) the time employed to perform the required task, measured in seconds. Each user repeated the questionnaire for both the R-Interface and the MATLAB platform, and for each of the following tasks: 1. Creation of a numerical matrix. 2. Matrix contents visualization. 3. Setting the value of a particular position of the matrix. 4. Creation of a struct array. 5. Struct contents visualization. 6. Setting the value of a particular field of the struct array. 7. Creation of a cell array. 8. Cell array contents visualization. 9. Setting the value of a particular cell of the cell array. 10. Modification of the name of a variable. 11. Look for the list of defined variables and their types. 12. Deleting a variable. 13. Creation of a graph from a data collection. 14. Deleting a graph. 15. Copying information to other applications. 16. Use of the help to look for a command. 17. Use of two simultaneous sessions. (This task can only be performed in MATLAB by executing twice this program.) 318 LADO ET AL. To compare in a quantitative way the usability of both the R-Interface and the MATLAB software package, the numerical values obtained for each user and for all the tasks were analyzed employing the Standardize Usability Metrics (SUM) proposed by Sauro and Kindlund [12], which provides one continuous variable for summative usability evaluations that can be used in regression analysis, hypothesis testing and usability reporting, and provides a highlevel summary information about a system [13]. RESULTS AND DISCUSSION In this work, we have developed a graphical interface, alternative to MATLAB, which can be used for educational purposes, and we have validated the model by comparing the usability of R-Interface with the MATLAB usability in a quantitative way, employing the SUM technique. The corresponding point estimate yielded by SUM, which measures the usability of each task, was obtained for every user participating in the evaluation, and for each graphical interface evaluated. Furthermore, an overall SUM value was obtained for each software environment and for each task (Table I). Results show an increase in the SUM value for all the users when employing the R-Interface (70.0% vs. 54.2%). It must be remarked that all the users were not familiar with neither R-Interface nor MATLAB environment. Even though a great number of tasks can be evaluated, our results indicate that R-Interface can Table I Overall SUM Values for R-Interface and for MATLAB Task1 Task2 Task3 Task4 Task5 Task6 Task7 Task8 Task9 Task10 Task11 Task12 Task13 Task14 Task15 Task16 Task17 Average R-Interface (SUM value %) MATLAB (SUM value %) 65.4 63.1 61.5 60.8 58.7 62.1 61.9 63.5 60.8 81.5 86.1 87.5 73.1 76.8 65.4 74.4 87.1 70.0 48.3 46.8 45.0 35.1 33.6 38.3 36.4 39.1 35.9 79.2 82.5 83.4 46.2 59.1 64.9 60.2 86.9 54.2 be of potential value for educational tasks, mainly when the users are not habituated to work with MATLAB, since it has been showed the superior usability of the user interface of our software versus the MATLAB. Furthermore, R-Interface is very similar to MATLAB in execution time, this indicating that R-Interface is not perceptibly more time-consuming. Since many of the components used to build RInterface had been previously developed to be reused, the cost and development time employed to create R-Interface has been really adjusted. In this way, we have developed a novel and inexpensive graphical interface that can be used to perform several tasks, such as educational functions and applications, without loss of functionality. Moreover, results also show an important increase of satisfaction level of the user when employing R-Interface as compared to MATLAB. The relevant gain in usability, as well as the reduced time and cost employed to develop this software, indicates the benefits of the proposed solution, based on re-interfacing an existing software, that is, developing alternative GUIs but integrating and reusing proprietary environments functionality, in order to have software specifically fitted for educational purposes. CONCLUSIONS Several engineering-related software environments, primarily destined to professional usage, are very widespread due to their wide functionality, continuous update, and robustness. Because of this, they are frequently used for educational purposes. An example is MATLAB, which is quite a de facto standard in engineering, widely used in education. However, these environments are not specifically designed for this task, and their user interface could be too complex for some students, thus hindering the learning process. This could make it difficult to use these software packages in education. When the goal is to teach certain concepts, solutions such as the designed specific toolboxes, and the development of routines or similar software pieces with a specific user interface could be effective. When the goal requires that the student learns how to use the environment, or some significant part of the environment functionality, the solutions are more limited. Some of the already proposed were using tutorials, coursewares, etc. In this work we present R-interface, based on reinterfacing the proprietary environment (MATLAB, in this work), thus developing an alternative user interface that enhances desirable features. This R-INTERFACE interface can support the same functionality and command language as MATLAB, while providing a user-friendly interface specifically designed for educational purposes, this allows for a much more intuitive and fast learning. The added capabilities of this environment, such as local/remote sessions, MDI multisession environment or integrable wizards, demonstrate the potential of R-Interface for learning task, as well as ilustrates the versatility of this approach. It must also be remarked that R-interface is being successfully incorporated as a part of a postgraduate course dedicated to the learning of digital signal and image processing. The possibility of using R-Interface, with specifically designed wizards integrated in it, allows the teaching of special filters and techniques, such as the wavelet transform or the Fourier transform, in a more simple way than when using directly the common MATLAB user interface. Future work will address the issue of improving other MATLABbased courses employing the R-interface. REFERENCES [1] A. J. Fernández and J. Millán, CGRAPHIC: Educational software for learning the foundations of programming, Comput Appl Eng Educ 11 (2003), 167 178. [2] D. Báez-López, D. Báez-Villegas, R. Alcántara, J. J. Romero, and T. Escalante, Package for filter design based on MATLAB, Comput Appl Eng Educ 9 (2001), 259 264. [3] J. J. Cathey, A MATLAB-based graphical technique for amortization study of adjustable speed drives, IEEE Trans Educ 45 (2002), 177 181. 319 [4] S. S. Joshi, Development and implementation of a MATLAB simulation project for a multidisciplinary graduate course in autonomous robotics, Comput Appl Eng Educ 12 (2004), 54 64. [5] A. S. Kim, C. Park, and S. H. Park, Development of web-based engineering numerical software (WENS) using MATLAB: Applications to linear algebra, Comput Appl Eng Educ 11 (2003), 67 74. [6] B Oakey, A virtual classroom approach to teaching circuit analysis, IEEE Trans Educ 39 (1996), 287 296. [7] S. L. Wood, A new approach to interactive tutorial software for engineering education, IEEE Trans Educ 39 (1996), 399 488. [8] MATLAB, The Mathworks, Inc., http://www.mathworks. com, 2005. [9] L. Petropoulakis and B. Stephen, WebClass: Software to web-enable MATLAB for collaborative use, Adv Eng Softw 36 (2005), 497 503. [10] B. L. F. Daku and K. D. Jeffrey, Development of an interactive CDROM-based tutorial for teaching MATLAB, IEEE Trans Educ 44 (2001), 1 10. [11] E. Garcı́a, J. González, J. B. Garcı́a, D. Martı́nez, and M. Pérez, Integrating proprietary environments as reusable components in educational software. An experience with MATLAB, COM and web services. Proceedings of the VII Iberoamerican Congress of Educational Informatics, RIBIE 2004, Monterrey, México, 13 15 October, 2004. [12] J. Sauro and E. Kindlund, A method to standardize usability metrics into a single score, Proceedings of the Conference in Human Factors in Computing Systems, 2005. [13] Wiley Periodicals, Comput Appl Eng Educ, ISSN 1061-3773, 2006. [14] Frontiers in Education Clearing House, http:// fie.engrng.pitt.edu, 2005. BIOGRAPHIES Marı́a J. Lado received her PhD in physics in 1999 from the University of Santiago de Compostela. Dr. Lado is presently a professor of computer science at the University of Vigo. Her research interests include computer-aided diagnosis in breast and chest/CT imaging, as well as computer-aided systems for teaching purposes. She can be reached at mrpepa@uvigo.es. Emilio Garca Roselló is an associate lecturer in the Department of Computer Sciences at the University of Vigo. His research work, together with the other authors, is mainly centered on reusability and component-oriented software engineering and its applications to educational software. He can be reached at erosello@ uvigo.es. Arturo J. Méndez is presently a professor in the Department of Computer Science at the University of Vigo, Spain. He received his PhD in physics in 1996 from the University of Santiago de Compostela. His research interests include computer-aided diagnosis and educational software. He can be reached at mrarthur@uvigo.es. Jacinto G. Dacosta is a lecturer in the Department of Computer Sciences at the University of Vigo. He earned his PhD with a thesis on educational software engineering. He can be reached at jdacosta@uvigo.es. 320 LADO ET AL. José Baltasar Garca Perez-Schofield is a lecturer in computer science at the University of Vigo. His research interests include persistence and object orientation, especially as related to virtual machines and dynamic languages. He received his PhD in computer science from the University of Vigo. He can be reached at jbgarcia@uvigo.es or www.ei.uvigo.es/jgarcia. Manuel Pérez Cota is chair professor in the Department of Computer Sciences at the University of Vigo. He heads a research group on object-oriented software engineering and has many publications about this issue. He can be reached at mpcota@ uvigo.es.