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

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.

 Respuesta aceptada

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');

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 12 de Oct. de 2016

Comentada:

el 12 de Oct. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by