Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
Contest
MathWorks.com

MATLAB CentralFile Exchange > Whitepapers and Articles > Comparison of C++, Java, Python, Ruby and MATLAB Using Object Oriented Example
 Comparison of C++, Java, Python, Ruby and MATLAB Using Object Oriented Example   
 
Download Now:
  Rating:
  Code Metrics:

 What is this?
  Author: Stuart McGarrity
  Summary: RedBlack Tree Binary Search Example Used to Compare of C++, Java, Python, Ruby and MATLAB Code
  MATLAB Release: R2008a
  Description: This example adds MATLAB to the list of languages in this C++ vs Java vs Python vs Ruby: a first impression (http://www.dmh2000.com/cjpr/) article at www.dmh2000.com, which compares implementations of a Red Black Tree binary search algorithm (http://www.cs.auckland.ac.nz/software/AlgAnim/red_black.html).

The side by side code comparison shows the same simple object oriented example written in C++, Java, Python, Ruby and MATLAB. The MATLAB implementation uses the new object oriented features available in R2008a. This example is designed to help programmers familiar with these other languages learn object oriented programming practices in MATLAB.

How to Compare the Languages

Open the comparelanguages.html file. The code for two languages is displayed side-by-side in two frames. You select which two languages to compare by clicking on the links at the top of each frame. Note that, unlike most of the other languages, you cannot currently put more than one class in a single MATLAB class definition file, so a fake combined file with the two classes and the test function (that does not run) is used for the side-by-side HTML comparison. The MATLAB code is contained in the sub folder called MATLAB_Code. The equivalent C++, Java, Python and Ruby code is available from the dmh2000 web site.

Although this example does let you compare the object oriented syntax of these languages, it does not compare the languages' ability to develop technical computing applications such as for signal processing, image processing, financial modeling, etc, for which MATLAB is designed.

Other resources for learning object orient programming in MATLAB include:

* Defining Classes Video Tutorial - 11 min (http://tinyurl.com/29cdle)

* Comparison of C++ and MATLAB Using Object Oriented Application Example (http://tinyurl.com/2zkhgu)

* MATLAB Classes and Object Oriented Programming Documentation (http://tinyurl.com/2z8mba)
   
  Published
M-files:

How do I What are
Published M-files?
Comparison of C++, Java, Python, Ruby and MATLAB Using Object Oriented Example
MATLABCombined
   
  Other HTML Files: comparelanguages.html
lnav.html
rnav.html
   

File Details  
 
  File Id: 18972 Average rating: 4.0
  Size: 10 KB # of reviews: 9
  Submitted: 2008-02-28 Downloads: 1621
  Subscribers: 4  
  Keywords: C++ Java Python Ruby MATLAB Object Oriented RedBlack Tree Binary Searc
   
  Zip file contents: Description.html, RBMATLAB.html, comparelanguages.html, lnav.html, rnav.html, NodeVisitor.m, RedBlackTree.m, test_RedBlackTree.m


User Reviews
Number of Reviews: 9
Date: 2008-06-02
From: ogbonna christian. c (xtian_c01@yahoo.com)
Rating:
Comments:
Date: 2008-05-16
From: naing lwin (naingmyintlwin@gmail.com)
Rating: N/A
Comments: i want to know matlab ODE program
Date: 2008-05-16
From: naing lwin (naingmyintlwin@gmail.com)
Rating: N/A
Comments: i want to know ODE program.

See more reviews

Review this Submission
Bold Indicates Required Information
Overall Rating:
 General Comments  
 1  Poor
 2  Needs Improvement
 3  Fair
 4  Good
 5  Excellent
 
Comments:    
First Name:  
Last Name:  
E-mail:  
Organization:  
 
Spam Prevention:  
Please type the characters you see in the picture above.  
   
 
Changes  
 
2008-03-11 Corrected mistake in comments, found by reviewer, referring to 'anonymous' class
2008-03-03 Fix summary and Video URL
2008-03-01 Resize image
2008-03-01 Resize image
2008-03-01 Reformat
 

 
  Download Now:



Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Related Topics