How do I do a logic check to see if one or more entries in an array is below a certain value?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Kyle Reagan
el 16 de Jun. de 2017
Respondida: Adam
el 16 de Jun. de 2017
I have a 2 column matrix, with the first column being dates and the second column being Fan Speed. I want to have a script search through the column and anytime it finds a fan speed below 8,000 it displays the date corresponding to from the first column. The fan speed is stored as Fan.data(:,2) and the dates are Fan.data(:,1). Can anyone help?
0 comentarios
Respuesta aceptada
Adam
el 16 de Jun. de 2017
logicalIdx = Fan.data(:,2) < 8000;
dates = Fan.data(logicalIdx,1);
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Dates and Time en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!