Comparing C++ and MATLAB Code

The following is a set of notes on the difference between the C++ and MATLAB code.

Contents

Data Members and Properties

22        properties
23            m_bitDelay % Instead of public access method
24        end

138           function out=get.m_bitDelay(hObj)
139               switch hObj.m_bitrate
140                   case 1
141                       out=1;
142                   case 11
143                       out= constants.codeLength;
144                   otherwise
145                       error('');   % Should not occur
146                       out=0;
147               end
148           end

19        properties (GetAccess='private', SetAccess='private')
20            m_dB_noise;
21            m_x1;
22            m_x2;
23            m_x3;
24            m_x4;
25            m_x5;
26            m_x6;
27        end

Methods and Functions

98            function out=subsref(hObj,s)


106               switch s.type
107                   case '()' % Subs ref
108                       if length(s.subs)==1
109                           index = s.subs{1};
110                           out=hObj.m_fc(index);

Other Topics

11    classdef AWGN < handle