File Exchange

image thumbnail

Comparison of C++ and MATLAB Using OOP Example

version (3.54 MB) by Stuart McGarrity
Wireless Communications Application Example Used to Compare C++ and MATLAB® Code


Updated 06 Jan 2020

View Version History

View License

Editor's Note: Popular File 2009

This example calculates the bit error rate (BER) of a Bluetooth® or 802.11b communication link interfered with by another 802.11b or Bluetooth transmitter. It uses the new MATLAB® object oriented programming features released in R2008a.
The main function btint and accompanying classes have been translated from the C++ NIST Bluetooth and IEEE 802.11b Coexistence Simulator. The original C++ code has been retained as comments in the MATLAB code to help with its understanding for those familiar with C++.

See Description.html for information on how to run it and ComparingCAndMATLAB.html to compare the two implementations.

Other useful resources for learning object orient programming in MATLAB include:

* Defining Classes Video Tutorial - 11 min ( )

* Comparison of C++ and MATLAB Using Object Oriented Application Example ( )

* MATLAB Classes and Object Oriented Programming Documentation ( )

For more information on MATLAB OOP, see product page:

Cite As

Stuart McGarrity (2021). Comparison of C++ and MATLAB Using OOP Example (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (11)

karthik sandiri

zhang george

very useful



I think it is very good for me to learn this issure. Thanks a lot.

Richard Minala

Esubalew Adam Endalew

hoang thang


hailu sergota


hailu sergota


Richard Littlewood

Good introduction to this major new feature set

tarik yg

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!