フィルターのクリア

How to perform bitwise xor operation for audio scrambling??

2 ビュー (過去 30 日間)
Su Latt Sandi
Su Latt Sandi 2018 年 2 月 4 日
コメント済み: Su Latt Sandi 2018 年 2 月 5 日
Hello,
I using DWT and make scrambling for mono type audio. In my research, i need to use bit wise xor function for audio coefficients and keys. First, I change the format of audio coefficients from negative float value to 64 bit binary value using "c=num2bin(q,c)" where q is quantizer and c is audio coefficients. The problem is i can't xor with audio coefficients and key. This error occur " Undefined function 'bitxor' for input arguments of type'char'. " How should I continue to get audio scrambled value?? PFA for errors
I would be grateful if someone help me in this matter :)

採用された回答

Walter Roberson
Walter Roberson 2018 年 2 月 4 日
編集済み: Walter Roberson 2018 年 2 月 4 日
Subtract '0' (the character for the digit 0) from the char to get the numeric values.
However, in your previous post on this topic, it was recommended that you use other approaches: in particular typecast to uint64 and then bitget().
  7 件のコメント
Walter Roberson
Walter Roberson 2018 年 2 月 4 日
What is test in this context? I can tell from the error message that whatever it is a scalar value that is not int64 or uint64
I would like to take this opportunity to again recommend that you do not use num2bin() and bin2num() for this work.
[sound, fs] = audioread('SomeFileName.wav');
sound_bits = reshape( (dec2bin(typecast(sound, 'uint8'), 8) - '0').', 1, []);
Su Latt Sandi
Su Latt Sandi 2018 年 2 月 5 日
Thanks Sir, it's working properly, and as I'm beginner in Matlab so I'm sorry if i make mistake. And I want to know how to convert back to get values that range of -1 to +1 to write audio.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWavelet Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by