Réponse acceptée

dpb
dpb le 3 Oct 2021

0 votes

s=sort([x{:}]); % where x is the cell array

Plus de réponses (1)

Image Analyst
Image Analyst le 3 Oct 2021

0 votes

A cell can have anything it in, like arrays, structures, tables, even other cell arrays. See the FAQ:
So you can't sort them. Even if the cells contain matrices, you can't sort across cells. However you could sort the contents of each cell independently.
What is inside each of your four cells? You forgot to attach it in a .mat file so we don't know.

Catégories

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by