afrispot.blogg.se

Pi in scilab
Pi in scilab












pi in scilab

(The answer can vary depending upon the input values applied) (i) Output Signal to Noise Ratio of Delta Modulation using ScilabĪ=input('Enter the amplitude of input signal: ') įm=input('Enter the modulating frequency in Hz: ') įs=input('Enter the sampling frequency in samples/second: ') ĭelta=2*%pi*a*fm*ts //step size to avoid slope overload W = input('Enter the message signal bandwidth: ')ĭisp(SNRo ,' Output Signal to Noise Ratio in dB : ') N = input('Enter the number of bits to encode: ') (h) PCM Modulation Output Signal to Noise Ratio with Bandwidth using Scilab Plot(1:a,p) //plot the probability at ith trail(discrete sequence)įc=input('Enter the frequency of carrier signal (square wave):') įm=input('Enter the frequency of message signal (sine wave):') Ī=input('Enter the amplitude of message signal:') Įnter the frequency of carrier signal (square wave):50Įnter the frequency of message signal (sine wave):10 P(i)=count/i //probability of head occurring at ith interval Value drawn from an uniform distribution of unit intervalĬount=count+1 //increment the count value when head occurs X=round(rand(1)) //"round" the elements to nearest integerĪnd "rand" returns a pseudo random scalar (f) Headcount (Probability of Getting Head) using Scilab Xtitle ('Compression Law: A?Law companding','Normalized Input |x|','Normalized Output |c(x)|') Xtitle ('Compression Law: u-Law Companding','Normalized Input |x|','Normalized Output |c(x)|') Ĭx(i) = (1+log(A*abs(x(i)/Xmax)))./(1+log(A)) Ī = // Different Values of A (c) Phase Shift Keying (PSK) using ScilabĬx = (log(1+ mu*abs(x/Xmax ))./ log(1+ mu)) Ĭx = Cx/Xmax // Normalization of output vector function is the percent of the period in Vm=squarewave(t,40) // The second parameter in the squarewave (b) Amplitude Shift Keying (ASK) using Scilab (a) Frequency Shift Keying (FSK) using Scilab














Pi in scilab