How to speed up this code?
Show older comments
Hi all,
I have the following code that I need to speed-up:
a(1).a='a';
a(2).a='b';
a(3).a='b';
a(4).a='c';
output=(contains(cellstr(char(a.a),'b')))
the desidered output is:
output=[0 1 1 0]
In my case the size of a is [11'000x1], so the computation is pretty slow.
How can I speed up the code?
Thanks
Accepted Answer
More Answers (1)
pietro
on 24 Jan 2019
0 votes
Categories
Find more on Characters and Strings 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!