Skip to main content

Posts

MATLAB code for QAM constellation

  Visit Main Website [Click Here ↗] MATLAB Script %%% Code starts here %%% clc;clear all;close all; M = 4;  % Number of levels after quantization / size of signal constellation k = log2(M);  % Number of bits per symbol rng(1)  %assaining the value of seed integer N =5000;  % Number of bits to process dataIn = randi([0 1],1,N);   % Generating randon bits dataInMatrix = reshape(dataIn,length(dataIn)/k,k); % Reshape data into binary k-tuples, k = log2(M) dataSymbolsIn = bi2de(dataInMatrix);  % Convert binary to decimal for n= 1:N/k     if dataSymbolsIn(n)==0         QAM(n)= complex(1,1);     elseif dataSymbolsIn(n)==1         QAM(n)= complex(-1,1);     elseif dataSymbolsIn(n)==2         QAM(n)= complex(1,-1);     else         QAM(n)= complex(-1,-1);     end    end display(dataIn,'First fifty bits'); display(QAM,'first twenty-five4-QAM symbols'); %Transmission of 4QAM data over AWGN channel snrdB =8; Y=awgn(QAM,snrdB); %received signal %Threshold Detection     for n= 1:N/k
Recent posts

SSC Previous Year Question Papers with Solutions - (4)

  Q. The computer program that converts assembly language to machine language is called ............. 1) Complier 2) Interpreter 3) Assembler 4) Comparator Answer: Option 3 Q. In which communication mode, data can be transmitted in both directions at same time? 1) Simplex 2) Full duplex 3) Half duplex 4) Multiplex Answer: Option 2 Next>> <<Previous Go back

MATLAB code for ask fsk and psk

Visit Main Website [Click Here ↗]   MATLAB Script %%% Code starts here %%% clc; clear all; close all; carrier_frequency=5; %Hz carrier_frequency2=7; %Hz This will be utilized for FSK's second carrier x=[1 0 0 1 1 0 0 1] % input signal ; length=size(x,2);   i=1; while i<length+1      t = i:0.001:i+1;     if x(i)==1        ask=sin(2*pi*carrier_frequency*t);        fsk=sin(2*pi*carrier_frequency*t);        psk=sin(2*pi*carrier_frequency*t);     else         ask=0;         fsk=sin(2*pi*carrier_frequency2*t);         psk=sin(2*pi*carrier_frequency*t+pi);     end              subplot(3,1,1);     plot(t,ask);     hold on;     grid on;     axis([1 10 -1 1]);  title('Amplitude Shift Key')     subplot(3,1,2);     plot(t,fsk);     hold on;     grid on;     axis([1 10 -1 1]); title('Frequency Shift Key')       subplot(3,1,3);     plot(t,psk);     hold on;     grid on;     axis([1 10 -1 1]);  title('Phase Shift Key')       i=i+1;  end %%% Code ends here %%% Visi

SSC JE Previous Year Question Papers with Solutions

  Question:  Determine the separation between the plates (in mm) of a parallel plate capacitor placed in air, when the area of the plates is 0.002 sq. meter, the voltage of the battery connected to this parallel plate capacitor is 4 V and the charge stored on the plates is 16 pC. Answer: We know that C = Q/V or, C=(16*10^(-12)) / 4 or, C = 4*10^(-12) Capacitance between two parallel plates is calculated as, C = €A/d Where, € = 8.854*10^(-12) A = Area of plate d = Distance between plates Now, d = €A/C or, d = (8.854*10^(-12)*0.002) / (4*10^(-12)) or, d = 4.4 mm Next>> <<Previous Go back

SSC Previous Year Question Papers with Solutions

  Question A word is represented by only one set of numbers as given in any one of the alternatives. ...P is represented by 79, 59 and 'I' can be represented by 31, 20 etc. Similarly, you have to identify the set for the word 'TURF'. Options:  1) 67,99,75,23  2) 89,56,41,34  3) 87,97,42,12  4) 97,56,75,24 Answer: 4  Firstly, look at the matrix-ll, 'P' is located at row no 7 and column to 9. Similarly, another P is  located at row no 5 and column to 9. Same, rule is applicable for   'I' also.  Given word is 'TURF' From the abovementioned matrix-ll, T is located at row 9 and column 7. So, value for 'T' is 97. Similarly, the values for U, R, and F is 56,75, and 24, respectively. Next Page>> Go back