Friday, November 12, 2021

Cara menghasilkan urutan biner di MATLAB

Cukup dengan script ini ...

N = 4; % Jumlah bit biner

output = dec2bin(2^N-1:-1:0)-'0'

https://www.mathworks.com/matlabcentral/answers/123729-create-a-matrix-of-binary-numbers-generated-by-sequence

No comments:

Post a Comment