Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I want a matlab code for coding

Status
Not open for further replies.

Izeddin

Newbie level 4
Joined
Dec 20, 2010
Messages
5
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,311
Hi
PLZ I want matlab code that solve this question
"I want to transmit this data "This is my coding project"
, by using linear coding
When (n=7,k=4)
And generation matrix is
g(x)=1+x+x3
then convert this data to ASCII code system
suppose occurring error every 8 bit during transmission
by founding the error we need to decoding and error correction "
I wait your replays
Thank you
 

hey i can give u brief idea that how to write code for cyclic code...try following code with matlab...


clc;
clear all;
close all;

n=7;
k=4;
gx=[1 1 0 1]
d=de2bi(0:2^k-1,'left-msb')
[i,px]= cyclgen(7,gx,'system')
g= circshift(px, [0, 4])
c=rem(d*g,2)
 
  • Like
Reactions: osam/

    osam/

    Points: 2
    Helpful Answer Positive Rating
Thank u very much Eng.jigisha
BEST REGARDS
 
  • Like
Reactions: osam/

    osam/

    Points: 2
    Helpful Answer Positive Rating
How are u Mr jigisha?
plZ
in the first I want to send this message "This is my coding project" using ascii code system
and the follow code I store the message then convet this message to ascii
******************
clc;
clear ;
msg='This is my coding project'
d1=dec2bin(unicode2native('This is my coding project'))

******************
then I want code that make d1 arry in one a row as this
10101001101000,............1110100

then I want code that make error every 8 bits
"change value of bits number 8,16,24,32,40,Etc "

This is the first stage
so I waiting your replies
BEST REGARDS
 

I wating your replies
BEST REGARDS
 

First stage matab code:

clc
clear all
msg='This is my coding project';
d1 = dec2bin(unicode2native(msg));

rows=size(d1,1);
cols =size(d1,2);

L = rows*cols;
e=1;
for i=1:rows
for j=1:cols
d(e)=d1(i,j);
e=e+1;
end
end



for p=1:L
if (mod(p,8)==0)
if (d(p)== '0')
dmod(p)='1';
else
dmod(p)='0';
end
end
if (mod(p,8)~=0)
dmod(p)=d(p);
end
end


-sv
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top