Shift Row matrix-Convolutional Code

I'm implementing convolutional coder. for that i need to shift register bit so that serial data can come in register one bit at a time. I'm implementing (7,5) 1/2 rate encoder.

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 5 月 17 日

0 投票

bitshift() .
Caution: shift register calculations often want to know what the value is of the bit that will logically get shifted "out" of the register by the operation. MATLAB does not return that information from bitshift(). Instead you have to extract the value of the bit from the unshifted value, and then do the bitshift()

4 件のコメント

Ronak Sakaria
Ronak Sakaria 2012 年 5 月 17 日
I'm not supposed to use any predefined function in matlab. i need to shift it like:
x(i+1)=x(i) and loop it for some no of times. I know the procedure but i'm not able to put it in code. Please help me.
if ,say, x=[1 2 3] then after shifting it should be x=[data 1 2 ] and so on...
Walter Roberson
Walter Roberson 2012 年 5 月 17 日
There are hardly any programs that can be written in MATLAB without using any predefined MATLAB functions. For example,
x(i+1)=x(i)
is
subsasgn(x, struct('type', '()', 'subs', {plus(i,1))}, subsref(x, struct('type', '()', 'subs', {i}___
This uses the built-in functions "{}", plus, struct, subsasgn, and subsref.
Ronak Sakaria
Ronak Sakaria 2012 年 5 月 18 日
I'm now able to shift the row matrix without using any function. but the thing is i need to make it continuous i.e. say x=[1 2 3 4] then when i run the code it becomes x=[0 1 2 3]. when i run this second time then it remains the same. how can i make it x=[0 0 1 2] ? Please help me.
Walter Roberson
Walter Roberson 2012 年 5 月 18 日
If you were to post your code, someone could point out to you the built-in functions that it is using.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

2012 年 5 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by