Out of Bounds Analysis of Array

1 次查看(过去 30 天)
I have two arrays that have been imported one of which is a double array of bounds inputed from the user called num which contains for example [32.2; 32;-80.68;-80], on the other hand I have a LatitudeColumn{} cell array of a a nX1 size( the size n can change dependent on which file the user selected). I would like take the values 32.2 and 32 and find all values inside the LatitudeColumn{} cell array in which are out of "bounds" and then save the total number of values of the bounds ex 32.2>x>32.0. "After analysis there are Xnumber out of bounds".

采纳的回答

Tessa Aus
Tessa Aus 2016-7-7
I discovered the answer to my own question, it was decided to store the two boundry points from the array and the use cellfun to implement the logic. Here is my code for future viewers if they have a similar question.
% code
Latmax = num(1,1);
Latmin = num(2,1);
OutOfRangeLat = cellfun(@(x) (x > Latmin) & (x < Latmax), LatitudeColumn, 'Uni',0);
NrOutOfRangeLat = sum('OutOfRangeLat');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Operators and Elementary Operations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by