フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Matlab equivalent for Octave command bitunpack

1 回表示 (過去 30 日間)
KAE
KAE 2020 年 2 月 19 日
閉鎖済み: KAE 2020 年 2 月 19 日
I have an Octave program that I would like to turn into Matlab code. The sticking point is the Octave bitunpack command, which returns a logical array y corresponding to the raw bit patterns of x. Is there a Matlab equivalent? Here are the lines of code that it appears in.
Alternatively, can I just run the Octave program from Matlab if I install Octave?
n=10; % Example value
% Logical rep
m = uint32 (0:2^n-1); % This is just 0,1,2,...1023
% Return a logical array Y corresponding to the raw bit patterns of X
if (bitunpack (uint16 (1))(1) == 0)
m = swapbytes (m); % Swaps byte ordering from little endian to big endian or vice versa
end
b = reshape (bitunpack (m), 32, 2^n)(1:n,:); % Not sure what this is doing
  1 件のコメント
KAE
KAE 2020 年 2 月 19 日
Just found out that powerset doesn't work for the large number of elements I was planning to use, so I will close out this question.

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by