필터 지우기
필터 지우기

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