For loop over writes output with strcmp
Show older comments
Hello,
I have the following code. The probles is that for every for loop, there are mulitple occurences of firsy in second. So, after every run, L is over written. I would like the indexesfor of anything that matches to be added below the previous output of L, not overwritten. I tried a lot of things but couldn't figure this out. Please help.
for a=1:r
first=test1(a,1);
second=reactionType(:,3);
L=find(strcmp(second,first));
end
2 Comments
Michael Madelaire
on 31 Dec 2018
Would be real nice if you told what
test1
reationType
is...
Ishita Trivedi
on 31 Dec 2018
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!