Matlab—A Tool for Doing Numerics
Separate windows are used to display graphics. There is a vast variety of different kinds of plots ranging from simple bar charts to color-shaded 3-D plots with different light sources. Every aspect of a plot can be controlled by setting the appropriate variables. Since 5.3, it is possible to edit a graph directly with a simple point-and-click interface.
A very handy feature is the support of LaTeX-like syntax for text-in-graphics windows.
Exporting images to encapsulated PostScript is possible, although importing the file into, e.g., a (La)TeX document might not lead to the desired result, especially if there is extra text in the figure. Matlab uses fixed-size fonts, so scaling the picture can result in odd-looking tick labels. Therefore, an export mode where text and graphics are written into separate files as in XFig and Xmgr would definitely find friends in the (La)TeX community. For publications, I still export the processed data and import it into Xmgr.
Figure 2 shows the trace of a hall measurement in the two-dimensional electron gas of a GaAlAs heterostructure. The plot was obtained from the commands issued as shown in Figure 3.
Platforms in Matlab do not matter. The only problem that might arise when copying scripts from one platform to the other is CR/LF conversion.
A colleague of ours recently had a problem with a Macintosh at work. It did not have enough memory to display a large matrix, so she issued the command save which stores the current state in the file matlab.mat, copied the resulting file to our Linux server, loaded it under the Linux version of Matlab, and continued her work on Linux.
After the uproar in the Linux community concerning the Mindcraft report, I could not resist running a benchmark with Linux and MS Windows 98. The command bench(N) is a Matlab script that times five different tasks from different fields of numerical math and graphics. Data structures and general math are tested by solving ordinary differential equations (ODE). Floating-point values are the main issue of the Linpack part (LU), sparse matrices mix both integer and floating-point calculation (Sparse), 3-D graphs test z-buffering, and 2-D graphics test line drawing. The parameter N gives the number of times a test is performed. The higher the number, the more reliable the test.
The results of bench(100) are shown in the first two lines of Table 1. The system the test was run on is a 133MHz Pentium with 32MB of RAM. Linux is a bit slower in all cases except when it comes to 2-D graphics, where it is faster. The reason for this might be that the graphics driver for Linux is better than the generic Windows driver. I did not bother to install all possible drivers since VMWare (see “VMWare Virtual Platform” by Brian Walters, July 1999) is now available, and I won't need to reboot the machine any more in order to read an Excel spreadsheet. I installed this PC emulator on our server which has a 400MHz processor and 128MB of RAM. Just for fun, I ran the same benchmark in the emulator and directly on Linux. The results are listed in the remaining lines of the table.
Features in the user interface could be drastically improved—a user-friendly debugger would be great.
I was amazed by the quick response I got from the Matlab newsgroup (comp.soft-sys.matlab). Matlab engineers seem to frequent the forum quite often and provide immediate help and support.
To put it all together, Matlab for Linux is a very useful tool for doing numerical mathematics with a wealth of toolboxes, including signal processing, symbolic computation, financial mathematics and others.
Tobias Vançura (firstname.lastname@example.org) studied physics in Kaiserslautern and Zurich where he is now working on his Ph.D. in semiconductor physics. In his group, he is responsible for a heterogenous computer network consisting primarily of Macintoshes, one NeXT cube, some PCs running most available versions of Windows, and of course, Linux. In his spare time, he loves snowboarding and skiing in winter and tennis in summer.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Nice article, thanks for the
7 hours 10 min ago
- I once had a better way I
12 hours 56 min ago
- Not only you I too assumed
13 hours 13 min ago
- another very interesting
15 hours 6 min ago
- Reply to comment | Linux Journal
17 hours 13 sec ago
- Reply to comment | Linux Journal
23 hours 54 min ago
- Reply to comment | Linux Journal
1 day 10 min ago
- Favorite (and easily brute-forced) pw's
1 day 2 hours ago
- Have you tried Boxen? It's a
1 day 7 hours ago
- seo services in india
1 day 12 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?