can any one help me for the code
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
回答 (1 件)
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 件のコメント
palakaluri devi
2016 年 1 月 20 日
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?
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


