How can we plot a 256-bit array at a particular value on x-axis?

14 views (last 30 days)
Hii,
i am trying to plot a 256-bit array (1 row and 256 cloumns)at a particular instance on x-axis. row represents the x-axix and column represents the y-axis.It has to show all the 256-bits as a stack along with y-axix and also represents the 256-bits with the samples on y-axis. Please help me out of this.
thank you in advance.

Accepted Answer

Guillaume
Guillaume on 12 Oct 2016
I'm not completely sure I understand. Maybe this is what you want:
bitarray = randi([0 1], 10, 256); %random array of 10 256-bit values
figure;
[row, column] = find(bitarray);
scatter(row, 256 - column, '.', 'DisplayName', 'On bits');
ylim([0 255]);
legend('show', 'Location', 'southoutside');

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!