• Channels
Part Inventory
Go
 
powered by:

 
  • Quick Poll
What Social Networking site do you use the most?



VOTE VIEW RESULTS
Previous Polls

Premium Content

New Signal Chain Technical Papers from Texas Instruments:

 

 

 

Making Math Magic


William Wong

August 16, 2007

Print
Reprints Comment Subscribe

Matlab is one of the main products from The Mathworks. The other is Simulink, a complementary package to Matlab. Simulink tackles multidomain simulation via graphical model-based designs while Matlab concentrates on numerical computation and analysis. Matlab algorithms are often incorporated into Simulink models but both Matlab and Simulink are quite useful by themselves. This time around we concentrate on Matlab 7.4. Matlab and Simulink are large, complex systems and there are a number of books available for both so this article is designed to give a taste of Matlab. Matlab comes with a range of tutorials, documentation plus extensive web-based support including a very active user community. Check out the latter and its extensive library of shared applications and algorithms like the Image Acquisition Toolbox 2 (Imaging Tools Now Work With Wider Range Of Cameras, ED Online ID #15754). What Matlab Is and Isn’t Basically Matlab is an IDE (integrated development environment) with it own programming language called m-code. The latter has the same root as an open source programming language project called Octave but Matlab’s power also comes from its encompassing environment and extensive third party support. One of the Matlab programming language’s claim to fame is its support for the vector and matrix operations. These are especially useful in DSP (digital signal processing) algorithms and it is not surprising that a significant amount of DSP development starts in Matlab. Matlab is also utilized extensively in science and engineering. Matlab supports object oriented programming (OOP). Key to Matlab’s success is the optimization of its vector and matrix support. The Matlab interface interprets Matlab programs but this is of little consequence because most of the computational work is done in the multithreaded, cache-aware libraries and runtime support. Still, Matlab’s just-in-time (JIT) compiler optimizes program scripts and the environment can take advantage of the latest 64-bit multicore PC platforms (Numerical Analysis Tool Goes Multicore, ED Online ID #14939) allowing Matlab to handle very large projects. Getting Started With Matlab Many will be familiar with Matlab from college. It is often used in classes because it eliminates a great deal of the grunt work when dealing with data while learning about algorithms. Often a Matlab class is a precursor to many other courses. One key advantage of the Matlab interface is its interactive nature. Its command line window mirrors many other interactive platforms like APL, Lisp and Smalltalk where typing a programming expression evaluates that expression and prints out the result. It makes experimentation easy and encouraged. The environment revolves around the current workspace and it is possible to create new variables within the workspace. One of the most common data types in Matlab applications are arrays, often multidimensional. This is where the array editor comes in handy. Drag and drop a variable from the workspace into the editor and change values as necessary or watch them change in response to applications or expressions evaluated in the command window. This makes the environment very useful for testing What If Scenarios as well as incremental testing of functions since any function can be called from the command line. This includes built-in functions as well as user defined functions. The command window can present hyperlinked text that can invoke Matlab expressions. It is also possible to copy the contents and put it into a Matlab script file if your latest experimental expressions have proven interesting. Matlab’s graphical presentation of data is many other programming environments tend to fall short. They can often provide basic plotting support as does Matlab where scaling is handled automatically based upon the data provided. Matlab can also provide more sophisticated user interface like one in the teapot demo. Matlab’s graphics are also capable of videos as well. This allows animation of results that can be exported and incorporated in multimedia presentations.

Average (0 Ratings):

Subscribe
Subscribe to Electronic Design and start receiving more articles like this one
Filed Under:

Check for price and availability on Source ESB:

Go
powered by  
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
Acceptable Use Policy

Sponsored Links