Converting output from 'find' into a logical
Show older comments
This is probably really trivial, but I can't seem to find the right command. I have the output from a find command (a 1700x1 double) with values like [9788;9790;9955...etc]
I want to create a logical 22879 entries long, with 'true' at the locations listed from the find command. i.e. the first entry in the logical will be at an index of 9788, the next at 9790 etc. All other entries in the logical should be '0'.
Help is much appreciated.
Accepted Answer
More Answers (1)
KSSV
on 8 Jan 2020
0 votes
Read about ind2vec. By the way you can straightaway logical, there is no need to use find.
1 Comment
Jessica Hiscocks
on 9 Jan 2020
Categories
Find more on Matrix Indexing 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!