Merge 2 columns with strings
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I have been trying to look if someone else had a similar question. But not sucess so I want to ask. How would you approach merging two columns with strings as the picture below? Thanks in advance
1 件のコメント
採用された回答
Carson Purnell
2022 年 6 月 16 日
編集済み: Carson Purnell
2022 年 6 月 16 日
given column 1==A and column 2==B, this stacks those columns without sorting.
%example arrays
A = {'a',1;'b',2}; B = {'c',11;'n',12};
vertcat(A,B)
Pretty simple. But it is unclear what your data is, how it is organized, or what your specific intent is. Please provide more details.
6 件のコメント
Carson Purnell
2022 年 6 月 16 日
編集済み: Carson Purnell
2022 年 6 月 16 日
You don't need to keep trying, if you read my comment I have provided the code to do it. Just inches upward on the screen. Make sure to read the documentation on vertcat.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Shifting and Sorting Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!