Effacer les filtres
Effacer les filtres

OOP derive comm.CRCGenerator

1 vue (au cours des 30 derniers jours)
Mehly
Mehly le 8 Sep 2013
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
>>

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 9 Sep 2013
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 commentaire
Mehly
Mehly le 10 Sep 2013
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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Create System Objects dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by