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'm glad for who answers

Status
Not open for further replies.

Alaa_

Newbie level 2
Joined
Nov 30, 2010
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,297
salam 3laikom guys
i really need your help
i want a matlab code for ASk i'm using version 6.0.1 please help
i have to give it to my instructor after 5 hours
i have been searching for 5 hours and i didn't find anything
i tried this code but error has occured




len = 10000; % Number of symbols
M = 16; % Size of alphabet
msg = randint(len,1,M); % Original signal
% Modulate using PAM,
txpam = pammod(msg,M);
% Perturb the phase of the modulated signal.
phasenoise = randn(len,1)*.015;
rxpam = txpam.*exp(j*2*pi*phasenoise);
% Create a scatter plot of the received signal.
scatterplot(rxpam); title('Noisy PAM Scatter Plot');
% Demodulate the received signal.
recovpam = pamdemod(rxpam,M);
% Compute number of symbol errors.
numerrs_pam = symerr(msg,recovpam);
??? Undefined function or variable 'pammod'.



please help
>>

i'm checking after 3hours

thx.
 

Wa Alaikum Salaam, dear brother :)

It could be that the function is not available in your version of Matlab, but to make it simple you can go for 2-ASK and define the amplitude as anti-podal. For example, A0 = -5 and A1 = 5

It is relative simple to do it, for example,

a = randint(1,10) % create binary 0s and 1s
pam = 2*a - 1 % map 0s and 1s to -1 and 1 respectively
pam2 = 5*pam % give the amplitude of 5 to the 2-pam symbols

Note, I've made it simple, but if you are good, you can make it yourself for higher order PAM


------------------------------------------------------------
Celebrating the civilization of my beloved "Sindh" this month
 
Wa Alaikum Salaam, dear brother :)

It could be that the function is not available in your version of Matlab, but to make it simple you can go for 2-ASK and define the amplitude as anti-podal. For example, A0 = -5 and A1 = 5

It is relative simple to do it, for example,

a = randint(1,10) % create binary 0s and 1s
pam = 2*a - 1 % map 0s and 1s to -1 and 1 respectively
pam2 = 5*pam % give the amplitude of 5 to the 2-pam symbols

Note, I've made it simple, but if you are good, you can make it yourself for higher order PAM


------------------------------------------------------------
Celebrating the civilization of my beloved "Sindh" this month

thank you sooooooooooooooooo much brother to your help i don't say i really understood it 8-O8-O,but its good i found another ask code on a web site & i reported it to my instructor . thak you again &i hope you always donate knowledge to who need . jazak rabbi khair engineer :razz:
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top