Question: New Computer ClassChapter 2 Write a Program using c to solve this Problem. (See manual solved answer below.) A CDMA receiver gets the following chips:

New Computer ClassChapter 2

Write a Program using c to solve this Problem. (See manual solved answer below.)

A CDMA receiver gets the following chips: (-1 +1 -3 +1 -1 -3 +1 +1). Assuming the chip sequences defined in Fig. 2-28(a), which stations transmitted, and which bits did each one send? New Computer ClassChapter 2 Write a Program using c to solve this

Answer:

S A = (+1 -1 +3 +1 -1 +3 +1 +1)/8 = 1

S B = (+1 -1 -3 -1 -1 -3 +1 -1)/8 = -1

S C = (+1 +1 +3 +1 -1 -3 -1 -1)/8 = 0

S D = (+1 +1 +3 -1 +1 +3 +1 -1)/8 = 1

So station A transmits 1, station B transmits -1, station C transmits nothing and station D transmits 1.

Write a Program using c to solve this Problem;

This is what I have so far..

#include #include #define USERS 4 #define MAX_CODE_LEN 64 int codes[USERS][MAX_CODE_LEN] = 0,0,0,0, 0,1,0,1, 0,0,1,1, 1,0,0,0 ; int encHigh[USERS][MAX_CODE_LEN]; int encLow[USERS][MAX_CODE_LEN]; int sent[USERS][MAX_CODE_LEN]; int received[MAX_CODE_LEN]; int dotProd[USERS]; int encoded[USERS]; int decoded[USERS]; int codeLen = 8; /* Writes a vector/code to stdout. */

void write(int* ptr) int codePtr; for(codePtr=0; codePtr

int calcDot(int* vector1, int* vector2) int codePtr, sum; sum = 0; for(codePtr=0; codePtr

/* assume orthogonality */ /* Calculate every user's codes for both logic high and logic low. */

for(user=0; user

/* Each user has three possibilities: -1 -> send a logic low 0 -> don't send anything +1 -> send a logic high */ combs = pow(3,USERS); for(data=0; data D (11-1-1-1-1 +1-1) - (-2 0 0 0 +2 +2 0-2) 0 0-2+2 0-2 0+2) S4A+B+C(1 +1-3 +3 +1-1-1 +1) S5 A+B+C+D (4 0-2 0+2 0 +2-2) S6- A+B+C+D (2-2 0-2 0-2+4 0) S1 C [1+1-1++1+1-1-1]/8 1 S2 C [2+0+0+0+2+2+0+2|/8 1 SC [0+0+2+2+0-2+0-21/8 0 SC 1+1+3+3+1-1+1-1j/8 1 S3 -A+B Figure 2-28. (a) Chip sequences for four stations. (b) Signals the sequences represent (c) Six examples of transmissions. (d) Recovery of station C's signal D (11-1-1-1-1 +1-1) - (-2 0 0 0 +2 +2 0-2) 0 0-2+2 0-2 0+2) S4A+B+C(1 +1-3 +3 +1-1-1 +1) S5 A+B+C+D (4 0-2 0+2 0 +2-2) S6- A+B+C+D (2-2 0-2 0-2+4 0) S1 C [1+1-1++1+1-1-1]/8 1 S2 C [2+0+0+0+2+2+0+2|/8 1 SC [0+0+2+2+0-2+0-21/8 0 SC 1+1+3+3+1-1+1-1j/8 1 S3 -A+B Figure 2-28. (a) Chip sequences for four stations. (b) Signals the sequences represent (c) Six examples of transmissions. (d) Recovery of station C's signal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!