count elements falling within certain thresholds in array in matlab?

后端 未结 6 1650
无人及你
无人及你 2021-01-28 07:56

I have a huge vector. I have to count values falling within certain ranges. the ranges are like 0-10, 10-20 etc. I have to count the number of values which fall in certain rang

6条回答
  •  无人及你
    2021-01-28 08:27

    Matlab does not know how to evaluate the combined logical expression

    (0

    Insted you should use:

    for i=1:numel(m1)
        if (0

    And to fasten it up probably something like this:

    sum((0

提交回复
热议问题