Effacer les filtres
Effacer les filtres

how to represent binary values as polynomial expression?

2 vues (au cours des 30 derniers jours)
faa nad
faa nad le 3 Nov 2011
hello ,
i m working with cyclic codes,where i have to generate polynomial expression for the binary sequences for example
a=[1 0 1 1]
i tried with poly2sym(a)..it worked..
my problem is when a=1011 i m getting output as 1..
similary i have to generate polynomial xepression for 16 possible bits.
plz,suggest me...

Réponse acceptée

Grzegorz Knor
Grzegorz Knor le 3 Nov 2011
My suggestion:
a=1011
tmp = sprintf('%i',a);
a = str2num(sprintf('%c ',tmp(:)));
poly2sym(a)
  3 commentaires
Grzegorz Knor
Grzegorz Knor le 3 Nov 2011
smartly :)
faa nad
faa nad le 5 Nov 2011
thanks for the reply

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Polynomials 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