I want to get the result, not the graph, what to do

1 view (last 30 days)
>> gridx1=-0.25:.05:1.25;
>> gridx2=0:.1:15;
>> [x1,x2]=meshgrid(gridx1,gridx2);
>> x1=x1(:);
>> x2=x2(:);
>> x1=[x1 x2];
>> rng('default')
>> x=[0+.5*rand(20,1) 5+2.5*rand(20,1);
.75+.25*rand(10,1) 8.75+1.25*rand(10,1)];
>> figure
>> ksdensity(x,x1);
I want to get the result or function, not the graph, what to do
  2 Comments
Rik
Rik on 17 Apr 2022
Are you maybe looking for one of the output arguments that are listed in the documentation?
yutian liu
yutian liu on 17 Apr 2022
How to use ksdensity to find the probability density of the original data when only the original data is known?

Sign in to comment.

Answers (1)

KSSV
KSSV on 17 Apr 2022
[f,xi] = ksdensity(x,x1);
  1 Comment
yutian liu
yutian liu on 17 Apr 2022
How to use ksdensity to find the probability density of the original data when only the original data is known?

Sign in to comment.

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!