how to compand the complex valued signal
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hello ..
my input to the comapader is a complex valued signal .it is showing an error
ofdm_signal=[-0.999999999999998 - 1.00000000000001i 4.44089209850063e-16 + 1.00000000000001i 2.00395255944841e-14 - 0.999999999999994i -1.19904086659517e-14 - 1.00000000000004i 0.999999999999980 - 3.52495810318487e-15i -4.44089209850063e-15 + 1.88737914186277e-14i 1.00000000000000 + 0.999999999999999i -7.21644966006352e-15 - 2.44249065417534e-15i -9.44209987974176e-15 + 0.999999999999996i 1.00000000000001 - 0.999999999999996i -2.08270900525775e-14 + 0.999999999999982i -1.09356967925578e-14 + 1.05471187339390e-15i 0.999999999999996 + 3.05311331771918e-14i -3.99680288865056e-15 + 0.999999999999992i 1.04360964314765e-14 - 0.999999999999980i 6.88338275267597e-15 + 6.99440505513849e-15i 1.39332989590457e-14 - 7.77156117237610e-15i 7.77156117237610e-16 - 1.00000000000001i 1.00000000000000 - 1.00000000000002i 0.999999999999977 + 1.00000000000000i 0.999999999999984 + 1.00000000000001i 0.999999999999996 + 3.04756220259606e-14i -0.999999999999983 + 1.00000000000001i 1.31006316905768e-14 + 9.93649607039515e-15i 1.00000000000003 - 1.00000000000000i -1.00000000000001 + 0.999999999999984i 1.00000000000002 + 1.78549204755525e-14i -0.999999999999995 - 1.00000000000002i 1.00000000000000 - 1.00475183728577e-14i 1.00000000000000 - 1.00000000000000i -1.00000000000000 - 1.94844140821715e-14i 0.999999999999992 + 2.46469511466785e-14i -0.999999999999991 - 1.73194791841524e-14i 0.999999999999976 - 2.92127433354494e-15i 1.00000000000002 + 5.16253706450698e-15i -8.02136135291676e-15 - 1.18793863634892e-14i -1.00000000000001 + 1.87072579649339e-14i 5.55111512312578e-15 + 8.21565038222616e-15i -0.999999999999998 + 2.55351295663786e-15i 1.05471187339390e-14 + 3.52495810318487e-15i 1.29844052176864e-14 + 3.60822483003176e-16i 1.00000000000001 - 1.00000000000001i 1.25940924355916e-15 - 2.00950367457153e-14i 0.999999999999989 - 1.47104550762833e-15i 4.77395900588817e-15 - 4.44089209850063e-15i -6.10622663543836e-15 - 1.84297022087776e-14i -9.74220704108575e-15 + 3.88578058618805e-15i -1.43218770176645e-14 + 1.00000000000001i -0.999999999999987 + 1.00000000000001i -1.00000000000000 - 1.00000000000000i -1.09912079437891e-14 - 0.999999999999997i 2.39808173319034e-14 + 0.999999999999991i -1.00000000000000 + 6.21724893790088e-15i 1.00000000000001 - 0.999999999999995i 3.01980662698043e-14 + 0.999999999999980i -2.29816166097407e-14 - 2.53685961126848e-14i -1.60982338570648e-14 - 1.00000000000000i 0.999999999999998 - 1.00000000000001i -1.57651669496772e-14 - 6.41962332191343e-15i -1.00000000000002 - 1.00000000000000i 0.999999999999990 - 2.27595720048157e-15i -4.99600361081320e-15 + 1.00000000000002i 3.33066907387547e-16 - 0.999999999999976i 4.99600361081320e-16 - 1.00000000000002i -2.55351295663786e-15 + 1.18793863634892e-14i 1.00000000000000 - 0.999999999999993i -1.00000000000001 - 0.999999999999989i 1.00000000000001 - 4.99600361081320e-15i 0.999999999999993 + 1.94289029309402e-16i 6.66133814775094e-16 + 0.999999999999998i 3.21964677141295e-15 - 1.10467190950203e-14i -1.00000000000001 - 0.999999999999984i 2.93688684482873e-15 + 1.00000000000002i 1.01030295240889e-14 - 1.00000000000001i -6.28316842998800e-15 - 0.999999999999995i -0.999999999999988 - 0.999999999999997i -0.999999999999983 + 0.999999999999999i -1.00000000000001 - 1.00000000000001i -0.999999999999996 + 1.00000000000000i -0.999999999999997 + 0.999999999999991i 1.00000000000000 - 1.00000000000001i -1.00000000000001 - 3.50087924294176e-15i 1.65700786425305e-14 + 1.00000000000002i 3.85802501057242e-15 - 1.00000000000002i -2.30628116840344e-14 - 1.06581410364015e-14i -1.00000000000000 + 1.00000000000001i -6.52256026967280e-15 + 0.999999999999999i 1.00000000000002 + 5.21804821573824e-15i -0.999999999999993 - 0.999999999999995i 1.00000000000001 - 2.28814722443234e-14i -6.43929354282591e-15 + 0.999999999999992i -8.49961934509640e-15 - 1.01030295240889e-14i -1.27675647831893e-14 + 1.00000000000000i -3.05311331771918e-15 + 1.00000000000001i 0.999999999999991 + 0.999999999999998i 1.00000000000001 + 3.44169137633799e-15i -1.83741910575463e-14 + 0.999999999999985i 0.999999999999997 + 2.96290769696839e-15i -3.33066907387547e-15 - 1.03805852802452e-14i -1.81243908770057e-14 + 0.999999999999992i -2.93098878501041e-14 + 0.999999999999999i -1.00000000000002 + 1.00000000000003i 1.12687636999453e-14 - 0.999999999999986i 0.999999999999985 + 8.07687250414801e-15i 1.92571653068185e-14 + 5.27355936696949e-16i -1.00000000000002 + 1.36557432028894e-14i -9.84282100269240e-15 + 1.00000000000001i 1.11022302462516e-16 + 1.23512311489549e-14i 0.999999999999994 + 1.00000000000002i 9.54791801177635e-15 - 0.999999999999978i -5.85642645489770e-15 - 0.999999999999994i 1.00000000000002 + 2.33146835171283e-14i 1.34336985979644e-14 + 2.41473507855972e-14i 2.08166817117217e-14 - 8.48952942300993e-15i 6.24500451351651e-15 + 9.21485110438880e-15i 3.13360448700450e-14 + 1.25455201782643e-14i 1.46847711532209e-14 - 5.88418203051333e-15i 8.77076189453874e-15 - 4.10782519111308e-15i 2.67286193178506e-14 + 1.00000000000000i 7.77156117237610e-15 - 1.00000000000003i 2.12607709215717e-14 - 1.00000000000002i -4.55191440096314e-15 - 1.94397808679854e-14i -1.00000000000002 + 0.999999999999994i 1.20523330238969e-14 - 0.999999999999995i -0.999999999999988 - 2.49245069028348e-14i 0.999999999999969 - 1.69864122767649e-14i -4.38538094726937e-15 + 7.32747196252603e-15i -3.33066907387547e-15 - 2.22044604925031e-15i -0.999999999999998 - 1.00000000000001i 4.44089209850063e-16 + 1.00000000000001i 2.00395255944841e-14 - 0.999999999999994i -1.19904086659517e-14 - 1.00000000000004i 0.999999999999980 - 3.52495810318487e-15i -4.44089209850063e-15 + 1.88737914186277e-14i 1.00000000000000 + 0.999999999999999i -7.21644966006352e-15 - 2.44249065417534e-15i -9.44209987974176e-15 + 0.999999999999996i 1.00000000000001 - 0.999999999999996i -2.08270900525775e-14 + 0.999999999999982i -1.09356967925578e-14 + 1.05471187339390e-15i 0.999999999999996 + 3.05311331771918e-14i -3.99680288865056e-15 + 0.999999999999992i 1.04360964314765e-14 - 0.999999999999980i 6.88338275267597e-15 + 6.99440505513849e-15i 1.39332989590457e-14 - 7.77156117237610e-15i 7.77156117237610e-16 - 1.00000000000001i 1.00000000000000 - 1.00000000000002i 0.999999999999977 + 1.00000000000000i 0.999999999999984 + 1.00000000000001i 0.999999999999996 + 3.04756220259606e-14i -0.999999999999983 + 1.00000000000001i 1.31006316905768e-14 + 9.93649607039515e-15i 1.00000000000003 - 1.00000000000000i -1.00000000000001 + 0.999999999999984i 1.00000000000002 + 1.78549204755525e-14i -0.999999999999995 - 1.00000000000002i 1.00000000000000 - 1.00475183728577e-14i 1.00000000000000 - 1.00000000000000i -1.00000000000000 - 1.94844140821715e-14i 0.999999999999992 + 2.46469511466785e-14i];
A = 10; % Parameter for A-law compander
V = max(abs(ofdm_signal));
compsig = compand(ofdm_signal,A,V,'A/compressor');
Error using compand (line 35)
Inputs IN, PARAM and V must be real numbers.
how do i over come this error in matlab R2020a
0 commentaires
Réponses (1)
Walter Roberson
le 21 Nov 2020
https://www.mathworks.com/help/comm/ref/compand.html#fp1068641
Look in the Algorithms section, which gives the formulas. Those formulas can be used on complex valued signals.
Voir également
Catégories
En savoir plus sur Wireless Communications dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!