フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

What wrong with that counter ?

1 回表示 (過去 30 日間)
Henry Buck
Henry Buck 2015 年 12 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Torsten
Torsten 2015 年 12 月 9 日
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 2015 年 12 月 9 日
Thanks

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by