Change value of states "active" to 1 and "rest" to -1

1 Ansicht (letzte 30 Tage)
CalebJones
CalebJones am 25 Sep. 2019
Kommentiert: CalebJones am 25 Sep. 2019
1.JPG
I have attached a mat file for your reference.

Akzeptierte Antwort

madhan ravi
madhan ravi am 25 Sep. 2019
stats.state(ismember(stats.state,'rest'),:) = '-1';
stats.state(ismember(stats.state,'active'),:)= '1'

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by