RLaB(ID:5721/rla001)



Rlab is an interactive, interpreted scientific programming environment. Rlab is a very high level language intended to provide fast prototyping and program development, as well as easy data-visualization, and processing. It is computational tool for scientific and engineering applications.


References:
  • Searle, Ian "An Introduction to RLaB: A High Level Language for Scientific and Engineering Applications" view details Abstract: Rlab stands for "our'' lab. It is available to almost everyone who needs a computational tool for scientific and engineering applications, because it is freely available, and it runs on many platforms.

    I started working with high level languages when I realized I was spending far too much time writing Fortran and C language programs as a part of engineering analyses, test data reduction, and continuing education. I searched for a better engineering programming tool; except for Matlab, and some Matlab-like programs (all commercial), I came up empty-handed (this was in 1989). I did not feel Matlab's language design was powerful enough, but I would have used it had it been lower in cost and available on more platforms. I diverted my "off-hour'' studies to interpreter construction, and started prototyping Rlab. Within a year, I released version 0.10 to the Internet for comment. Now, almost five years later, Rlab has undergone significant changes and improvements primarily due to excellent assistance from users around the world.

    Rlab does not try to be a Matlab clone. Instead, it borrows what I believe are the best features of the Matlab language and provides improved language syntax and semantics. The syntax has been improved to allow users more expression and reduce ambiguities. The variable scoping rules have been improved to facilitate creation of larger programs and program libraries. A heterogeneous associative array has been added to allow users to create and operate on arbitrary data structures. External link: Online copy Extract:
    Overview
    The term "high level language'' has many different connotations. In the context of Rlab it means that variables are not explicitly typed or dimensioned. A variable's type and dimension are inferred from usage, and can be arbitrarily changed during a program's execution. This automatic typing and dynamic allocation free the scientific programmer from many of the more time consuming programming duties normally associated with languages like C or Fortran.

    In Rlab's case, high level also means interactive. Since one of the purposes is to provide convenient means for data manipulation and visualization, the program can be run in either batch or interactive mode. Typing rlab at the shell prompt starts the program. Rlab gives the user the command line prompt prompt >, from whence program statements are issued and executed.

    What do you get? What does it cost? Most people find that they can develop a working program far faster than with C or Fortran. Furthermore, the built-in graphics capabilities and interactive mode of operation promote experimentation and exploration of data and methods. The price you pay is slower program execution in some instances. Performance tests between compiled and interpreted languages usually show the compiled language to be faster in all respects. If your Rlab program uses scalar operations exclusively, and uses none of the built-in linear algebra functions, then it will be substantially slower than the Fortran or C version. However, if you take advantage of Rlab's optimized array operations, built-in linear algebra and utility functions, you may find that Rlab will perform quite well.

    Although I cannot provide a complete introduction in a single article, I can show you enough of the language to help you decide if it is something that you would want to try. A more complete introduction is provided in "The Rlab Primer'', which is included in the source and binary distributions.
  • Searle, Ian "Why Use RLaB?" view details Abstract: The title says it quite succinctly. The purpose of this article is to explain why you might want to use RLaB as opposed to Matlab. This purpose of this article is not to belittle Matlab instead, I will try and point out the differences between the two programs, and consequently why you may, or may not, want to use RLaB. I have organized this article into three sections. The first is an attempt to discuss the similarities present in the two programs. The second section is an attempt to present a strictly technical argument. While the third section is left for everything else.

    I would like this article to be as objective as possible, even considering who it is written by. If you feel that I have unfairly criticized Matlab or drawn invalid comparisons, please feel free to write me at ians@eskimo.com to express your opinions.
    External link: Online copy Extract:
    Similarities
    Both programs are Very High Level languages (VHLL) oriented towards applied mathematics. As languages, both offer numerical and string variables and arrays, conditional and flow-control constructs, and functions. Both programs offer an interface to the more popular linear algebra functions available through Netlib1. Both programs offer convenient visualization of data through two and three dimensional plotting functions.

    As VHLL with convenient data visualization, both programs offer an environment for numerical computation, experimentation, and algorithm development that is generally more productive that the traditional develop--compile--link--run--debug cycle we are all familiar with.


    Technical Differences
    Now I will attempt to point out the technical differences between the two programs.


    The Matlab language supports one data type, the matrix. The matrix is used to represent scalars, vectors (1-D arrays), and matrices (2-D arrays). The matrix is also used to represent vectors of characters, and matrices of characters. Matlab versions 4.x added a sparse matrix. Any numerical matrix can be either real or complex.
    RLaB offers more than the matrix as a data type. However, the matrix is probably the most often used data structure. Like Matlab, RLaB's matrices are used to represent scalars, vectors, and matrices, both real and complex. At this point in time RLaBdoes not offer a sparse matrix.

    In addition to the matrix, RLaB has a string class, and data type. A string is a variable length collection of characters. Both string vectors, and string matrices are supported. One advantage to the addition of this type is the ability to collect strings of different lengths in the same vector or matrix.

    However, the most significant improvement is RLaB's list class. A list is a heterogeneous associative array that can contain any data type, including other lists. The list gives RLaBusers the opportunity to structure their data as necessary. [...]



    Resources