Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

What wrong with that counter ?

1 visualizzazione (ultimi 30 giorni)
Henry Buck
Henry Buck il 9 Dic 2015
Chiuso: MATLAB Answer Bot il 20 Ago 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 Commenti
Torsten
Torsten il 9 Dic 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 il 9 Dic 2015
Thanks

Risposte (0)

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by