Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

What wrong with that counter ?

1 visualización (últimos 30 días)
Henry Buck
Henry Buck el 9 de Dic. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
function [wr,count] = wr_blk(rst,clk,sig)
%#codegen
count = 0;
if (rst==0)
wr=0;
else
if((sig==1) && (clk==1))
count = count + 1;
else
count=0;
end
end
end
Thanks, Henry
  9 comentarios
Torsten
Torsten el 9 de Dic. de 2015
I guess that's what my suggested solution does.
My line of code outputs the number of ones in the array clk at the positions where sig = 1.
Best wishes
Torsten.
Henry Buck
Henry Buck el 9 de Dic. de 2015
Thanks

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by