array processing and sorting
이전 댓글 표시
Hello everyone, I have a big problem for my matlab skill level
One of my measuring instruments generates and exports an array like the one below (normally 100+ rows x 5-20 colums) in which each column is in ascending order. Further complication is that often in the last rows there are zeros because in case of different column lengths, a zero-filling process is automatically executed
a =
1 1 1
2 3 2
3 3 4
5 5 7
6 9 9
13 10 15
0 0 20
0 0 25
Now if the standard deviation of each row is <=1 then the entire row should be transcribed into a new array, else if standard deviation are >1 the row elements must be split into one or more new lines so that they remain overall anyway ascending sorted. I hope I explained. It is difficult for me to explain even in my language.
In other words I had to get this result
b =
1 1 1
2 3 2
3 3 4
5 5 0
6 0 0
0 0 7
0 9 9
0 10 0
13 0 0
0 0 15
0 0 20
0 0 25
I will have to import this array into another instrument that can also accept NaN instead of filling with zeros.
thank you in advance
Davide
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

