can any one help me for the code

답변 (1개)

Thorsten
Thorsten 2016년 1월 20일
편집: Thorsten 2016년 1월 20일

0 개 추천

Si = rand(1,100)>0.5; % fake some sample data
f = rand(1, 100);
fmin = 0.3;
fmax = 0.7;
Siplus = Si; % the otherwise case
ind = Si == 1 & f < fmin; Siplus(ind) = 0;
ind = Si == 0 & f > fmax; Siplus(ind) = 1;
You can also write it more consicely without ind:
Siplus = Si;
Siplus(Si == 1 & f < fmin) = 0;
Siplus(Si == 0 & f > fmax) = 1;

댓글 수: 2

Thank you sir for your kind reply.............but f is function
then for the next
and sir if i =1:M where M=5000 j=1:Ni(t),where N(t) is the poissions process how can write this sir
help me out sir
Thorsten
Thorsten 2016년 1월 20일
Does my answer solves your initial problem? If so, please accept the answer and open a new question for further questions. If not, what's exactly the problem?

이 질문은 마감되었습니다.

질문:

2016년 1월 20일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by