4.0

4.0 | 5 ratings Rate this file 312 downloads (last 30 days) File Size: 3.69 MB File ID: #18971

Comparison of C++ and MATLAB Using Object Oriented Application Example

by Stuart McGarrity

 

28 Feb 2008 (Updated 04 Aug 2009)

Code covered by the BSD License  

Wireless Communications Application Example Used to Compare C++ and MATLAB® Code

Download Now | Watch this File

File Information
Description

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 (http://tinyurl.com/2fq9qp). 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 (http://tinyurl.com/29cdle)

* Comparison of C++, Java, Python, Ruby and MATLAB Using Object Oriented Example (http://tinyurl.com/2yyk96)

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

MATLAB release MATLAB 7.6 (R2008a)
Zip File Content  
Published M Files Comparing C++ and MATLAB Code, Comparison of C++ and MATLAB Using Object Oriented Application Example
HTML Files C++ Code/win32/Debug/BuildLog.htm,
C++ Code/win32/Release/BuildLog.htm
Other Files
AWGN.m,
AWGNChannel.m,
BluetoothReceiver.m,
BluetoothTransmitter.m,
btint.m,
C++ Code/include/awgnchan.h,
C++ Code/include/basetype.h,
C++ Code/include/bluetooth.h,
C++ Code/include/configure.h,
C++ Code/include/datatype.h,
C++ Code/include/ieee802.11b.h,
C++ Code/include/programargs.h,
C++ Code/include/random.h,
C++ Code/include/stdcpp.h,
C++ Code/include/templates.h,
C++ Code/include/util.h,
C++ Code/results/full-results.out,
C++ Code/results/README,
C++ Code/results/test-results-unix.out,
C++ Code/results/test-results-win32.out,
C++ Code/source/awgnchan.cpp,
C++ Code/source/basetype.cpp,
C++ Code/source/bluetooth.cpp,
C++ Code/source/configure.cpp,
C++ Code/source/ieee802.11b.cpp,
C++ Code/source/main.cpp,
C++ Code/source/programargs.cpp,
C++ Code/source/random.cpp,
C++ Code/win32/_UpgradeReport_Files/UpgradeReport.css,
C++ Code/win32/_UpgradeReport_Files/UpgradeReport.xslt,
C++ Code/win32/_UpgradeReport_Files/UpgradeReport_Minus.gif,
C++ Code/win32/_UpgradeReport_Files/UpgradeReport_Plus.gif,
C++ Code/win32/btint.ncb,
C++ Code/win32/btint.sln,
C++ Code/win32/btint.suo,
C++ Code/win32/btint.vcproj,
C++ Code/win32/btint.vcproj.MATHWORKS.stuartm.user,
C++ Code/win32/Debug/awgnchan.obj,
C++ Code/win32/Debug/basetype.obj,
C++ Code/win32/Debug/bluetooth.obj,
C++ Code/win32/Debug/btint.exe,
C++ Code/win32/Debug/btint.exe.embed.manifest,
C++ Code/win32/Debug/btint.exe.embed.manifest.res,
C++ Code/win32/Debug/btint.exe.intermediate.manifest,
C++ Code/win32/Debug/btint.ilk,
C++ Code/win32/Debug/btint.pch,
C++ Code/win32/Debug/btint.pdb,
C++ Code/win32/Debug/configure.obj,
C++ Code/win32/Debug/ieee802.11b.obj,
C++ Code/win32/Debug/main.obj,
C++ Code/win32/Debug/mt.dep,
C++ Code/win32/Debug/programargs.obj,
C++ Code/win32/Debug/random.obj,
C++ Code/win32/Debug/vc70.idb,
C++ Code/win32/Debug/vc70.pdb,
C++ Code/win32/Debug/vc80.idb,
C++ Code/win32/Debug/vc80.pdb,
C++ Code/win32/Release/awgnchan.obj,
C++ Code/win32/Release/basetype.obj,
C++ Code/win32/Release/bluetooth.obj,
C++ Code/win32/Release/btint.exe,
C++ Code/win32/Release/btint.exe.intermediate.manifest,
C++ Code/win32/Release/btint.pch,
C++ Code/win32/Release/configure.obj,
C++ Code/win32/Release/ieee802.11b.obj,
C++ Code/win32/Release/main.obj,
C++ Code/win32/Release/mt.dep,
C++ Code/win32/Release/programargs.obj,
C++ Code/win32/Release/random.obj,
C++ Code/win32/Release/vc70.idb,
C++ Code/win32/Release/vc80.idb,
C++ Code/win32/UpgradeLog.XML,
Channel.m,
constants.m,
FIRFilter.m,
getArg.m,
IEEE802_11b_Receiver.m,
IEEE802_11b_Transmitter.m,
license.txt,
programArgs.m,
random.m,
RandomBit.m,
Receiver.m,
setRSRCpulseShapingFilter.m,
stripCComments.m,
test_ber.m,
Transmitter.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
15 Mar 2008 tarik yg  
02 Apr 2008 Richard Littlewood

Good introduction to this major new feature set

10 Apr 2008 hailu sergota

good

10 Apr 2008 hailu sergota

good

10 May 2008 hoang thang

lljljlk

12 Jun 2008 Esubalew Adam Endalew  
25 Jun 2008 Richard Minala  
29 Jan 2009 Samurai

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

01 Nov 2009 Omar  
Please login to add a comment or rating.
Updates

Resize image

01 Mar 2008

Reformat

01 Mar 2008

Resized Image

03 Mar 2008

Fix summary and Video URL

20 Jul 2009

Added trademarks.

29 Jul 2009

Trademark work.

30 Jul 2009

Trademark work.

04 Aug 2009

Copyright work.

Tag Activity for this File
Tag Applied By Date/Time
whitepaper Stuart McGarrity 22 Oct 2008 09:50:53
article Stuart McGarrity 22 Oct 2008 09:50:53
paper Stuart McGarrity 22 Oct 2008 09:50:53
c Stuart McGarrity 22 Oct 2008 09:50:53
matlab Stuart McGarrity 22 Oct 2008 09:50:53
object oriented Stuart McGarrity 22 Oct 2008 09:50:53
comparison Stuart McGarrity 22 Oct 2008 09:50:53
wireless Stuart McGarrity 22 Oct 2008 09:50:53
class Stuart McGarrity 22 Oct 2008 09:50:53
compare Stuart McGarrity 22 Oct 2008 09:50:53
class Martin 04 Mar 2009 07:03:42
article Senthil Sivanath 20 Mar 2009 12:14:50
wireless Senthil Sivanath 20 Mar 2009 12:14:53
matlab uaz zac 25 Aug 2009 21:45:26
object oriented uaz zac 25 Aug 2009 21:45:34
 

MATLAB Central Terms of Use

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 Terms prior to use.

Contact us at files@mathworks.com