find probability of some data

I have some data in simulink, I want to know what is the probability of these data to be less than some determined constant number?
is there any function or way in matlab to find it?

Answers (1)

data = [2 3 5 7 11 13 17];
constant = 6;
probabilityDataLessThanConstant = mean(data<constant)
probabilityDataLessThanConstant = 0.4286

Categories

Find more on Modeling in Help Center and File Exchange

Asked:

Imp
on 7 Jun 2023

Answered:

on 7 Jun 2023

Community Treasure Hunt

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

Start Hunting!