MATLAB Answers

0

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

Asked by CalebJones on 25 Sep 2019
Latest activity Commented on by CalebJones on 25 Sep 2019
1.JPG
I have attached a mat file for your reference.

  0 Comments

Sign in to comment.

1 Answer

Answer by madhan ravi
on 25 Sep 2019
 Accepted Answer

stats.state(ismember(stats.state,'rest'),:) = '-1';
stats.state(ismember(stats.state,'active'),:)= '1'

  1 Comment

Sign in to comment.