Merging Arrays in a Struct and Sorting them
이전 댓글 표시
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);
채택된 답변
추가 답변 (1개)
A more robust solution, where v is your 2x1 structure:
out = sort([v.IndividualStiffnessMatrix])
Note that your field name is misspelled "Indivual..."
카테고리
도움말 센터 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!