MATLAB Answers

Diana
0

Problems with intersect function

Asked by Diana
on 19 Sep 2019
Latest activity Answered by Divya Yerraguntla on 26 Sep 2019
A={'LA1';'LA2';'LA3';'LA4';'LA5';'LA6';'LA7';'LA8';'LA9';'LA10';'LA11'};
B={'LA1';'LA2';'LA3';'LA10';'LA11';'LA12';'LAH1'};
intersect(A,B, 'stable')
When I use intersect, I get this error:
Capture.PNG

  1 Comment

work for me (R2019B)
A={'LA1';'LA2';'LA3';'LA4';'LA5';'LA6';'LA7';'LA8';'LA9';'LA10';'LA11'};
B={'LA1';'LA2';'LA3';'LA10';'LA11';'LA12';'LAH1'};
intersect(A,B, 'stable')
ans =
5×1 cell array
{'LA1' }
{'LA2' }
{'LA3' }
{'LA10'}
{'LA11'}

Sign in to comment.

Tags

1 Answer

Answer by Divya Yerraguntla on 26 Sep 2019

Hi Diana,
Hope it helps!

  0 Comments

Sign in to comment.