フィルターのクリア

How to process a large matrix of size 28x28x11684?

1 回表示 (過去 30 日間)
Ajay Ganti
Ajay Ganti 2018 年 3 月 2 日
コメント済み: Ajay Ganti 2018 年 3 月 2 日
I'm having 11684 matrices each of size 28x28. So the variable a has size 28x28x11684. Now i would like to do sorting them using a for loop on each matrix of 28x28 and store it in a variable z. Here is my code
for i=1:11684
z=sort(a(:,:,i));
end
When i run the code, it is giving me the variable z of size 28x28. But i want the variable z to be of size 28x28x11684. Plese help me.

採用された回答

Andrei Bobrov
Andrei Bobrov 2018 年 3 月 2 日
編集済み: Andrei Bobrov 2018 年 3 月 2 日
Just:
z = sort(a);
With loop:
k = size(a,3);
z = a;
for ii = 1:k
z(:,:,ii) = sort(a(:,:,ii));
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by