フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how can i split a column and create a new one??

1 回表示 (過去 30 日間)
wasima tammi
wasima tammi 2015 年 3 月 1 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
suppose A is the column A= 1 2 3 4 4 4 4 3 3 3 2 2 1 and i want m= 1 1; n= 2 2 2; o= 3 3 3 3; p= 4 4 4 4 ;
can anyone tell me this???

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 3 月 1 日
A=[ 1 2 3 4 4 4 4 3 3 3 2 2 1]
[B,ii,jj]=unique(A)
out=accumarray(jj,1:numel(jj),[],@(x) {A(x)})
celldisp(out)

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by