Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
can any one help me for the code
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Si(t) € {0,1}

0 comentarios
Respuestas (1)
Thorsten
el 20 de En. de 2016
Editada: Thorsten
el 20 de En. de 2016
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 comentarios
Thorsten
el 20 de En. de 2016
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?
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

