Merging Arrays in a Struct and Sorting them
Afficher commentaires plus anciens
Hello, I have a struct like this:

I want to join its two arrays into one array and then sort them in ascending order, I am trying this code, but it is not giving me results:
c = [v(1) v(2)]
sort_c = sort(c);
Réponse acceptée
Plus de réponses (1)
A more robust solution, where v is your 2x1 structure:
out = sort([v.IndividualStiffnessMatrix])
Note that your field name is misspelled "Indivual..."
Catégories
En savoir plus sur Software Development Tools dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!