defined categorical in same name but different number
1 回表示 (過去 30 日間)
古いコメントを表示
mohammed hussein
2017 年 11 月 28 日
コメント済み: Walter Roberson
2017 年 11 月 29 日
Hi
can you help me with this problem . i have different range of number i want to put them in categorical in the same name but in different numbers. for example .
clear all
clc
A1=[1:10]; % has to be in the first of categorical
B1=[11:20]; % has to be in the second of categorical
A2=[21:30]; % has to be in the third of categorical
B2=[31:40]; % has to be in the fourth of categorical
A3=[41:50]; % has to be in the fifth of categorical
Psition=categorical({'A' 'B' 'A' 'B' 'A'});
thanks
2 件のコメント
Guillaume
2017 年 11 月 28 日
I don't understand your question.
Psition=categorical({'A' 'B' 'A' 'B' 'A'});
creates a categorical variable that has only two possible values, the char array 'A' or the char array 'B'. That is completely independent of the variables you've created previously.
採用された回答
Walter Roberson
2017 年 11 月 28 日
編集済み: Walter Roberson
2017 年 11 月 29 日
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Categorical Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!