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!

