Change value of states "active" to 1 and "rest" to -1
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
CalebJones
el 25 de Sept. de 2019
Comentada: CalebJones
el 25 de Sept. de 2019
![1.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239673/1.jpeg)
I have attached a mat file for your reference.
0 comentarios
Respuesta aceptada
madhan ravi
el 25 de Sept. de 2019
stats.state(ismember(stats.state,'rest'),:) = '-1';
stats.state(ismember(stats.state,'active'),:)= '1'
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays 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!