Simulink bit operations

5 visualizaciones (últimos 30 días)
Raldi
Raldi el 16 de Dic. de 2011
Hi all, I wanted to ask if from a number of bits that are represented with 1 and 0 is possible to invert the ones to -1 each lets say two bits? Thanks in advance.
  2 comentarios
Fangjun Jiang
Fangjun Jiang el 17 de Dic. de 2011
Not clear to me what do you mean by "from a number of bits" and "to invert the ones to -1 each lets say two bits". Are you saying that if you have an inputs of 10 bits, six 1s and four 0s, alternate randomly, you want to invert the first two 1s into -1?
Raldi
Raldi el 13 de En. de 2012
basicaly i was trying to create an ami nrz line code, i think flip flops is the only way to do that. I havent finish it yet though.

Iniciar sesión para comentar.

Respuestas (1)

Paulo Silva
Paulo Silva el 16 de Dic. de 2011
[1 0]------>Gain(-1)----->[-1 0]
Use the Gain block and define that gain as -1
  7 comentarios
Walter Roberson
Walter Roberson el 16 de Dic. de 2011
Ah, instead of a step function, you could perhaps use a Repeating Sequence block, as mentioned at http://www.mathworks.com/matlabcentral/answers/15874-hi-all-i-am-having-a-difficulty-in-switching-a-signal-i-need-a-switch-in-simulink-that-must-be-on
Raldi
Raldi el 13 de En. de 2012
I was thinking more of using a flip flop as it has memmory, The general idea was to create a simple ami-nrz line code.

Iniciar sesión para comentar.

Categorías

Más información sobre General Applications en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by