Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Sorting based on the total value of the point in 3 layers

1 Ansicht (letzte 30 Tage)
Manne Plok
Manne Plok am 6 Sep. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I have this 4*1*3 data
data(:,:,1) = [12;23;0;2]
data(:,:,2) = [2;1;8;25]
data(:,:,3) = [3;9;4;0]
And I want it to be sorted as so:
data(:,:,1) = [0;12;2;23]
data(:,:,2) = [8;2;25;1]
data(:,:,3) = [4;3;0;9]
The sorting is taking into account the total value of that specific point in all 3 layers, and comparing with the other totals. Then, it sorts in ascending order. I tried using sort command but it dislocates the points from each other in layers (eg 12 2 and 3 are not in the same point anymore). Is there an eloquent way to do this?

Antworten (0)

Diese Frage ist geschlossen.

Tags

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by