필터 지우기
필터 지우기

OOP derive comm.CRCGenerator

조회 수: 1 (최근 30일)
Mehly
Mehly 2013년 9월 8일
I try to derive the CRCGenerator of the comm toolbox.
See: sample code
classdef crc < comm.CRCGenerator
properties (Nontunable)
CRCName
end
end
The result is, that the new property CRCName remains hidden in disp() but is shown in properties().
I'm using MATLAB Version: 7.14.0.739 (R2012a) and Communications System Toolbox Version 5.2 (R2012a).
>> a = crc(); >> disp( a );
a =
System: lte.generic.crc
Properties:
Polynomial: [16 12 5 0]
InitialConditions: 0
CheckSumsPerFrame: 1
>> properties( a );
Properties for class lte.generic.crc:
CRCName
Polynomial
InitialConditions
CheckSumsPerFrame
>>

채택된 답변

Kaustubha Govind
Kaustubha Govind 2013년 9월 9일
I'm not a MATLAB class system expert, but I wonder if you need to overload DISP for your class. You could try that and see if it resolves the issue.
  댓글 수: 1
Mehly
Mehly 2013년 9월 10일
With the overloaded disp() function it works, thanks.
classdef crc < comm.CRCGenerator
properties (Nontunable)
CRCName
end
methods
function disp( obj )
builtin('disp', obj );
end
end
end

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Create System Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by