How do i get the CDF and ICDF functions to accept a variable instead of just numbers.

조회 수: 1 (최근 30일)
HabenG
HabenG 2021년 12월 2일
댓글: dpb 2021년 12월 3일
Not sure what exactly is going on, when i plug in actual number for an upper and lower boundries into the icdf function it works fine but if i use variables with the exact same values it doesn't work, i get an empty matrix.
cdf_upper_bound = .10;
cdf_lower_bound = .20;
z = icdf(D_obj.n , [.10:0.01:.20])'
Unable to resolve the name D_obj.n.

답변 (1개)

dpb
dpb 2021년 12월 2일
K>> load D_obj
K>> fieldnames(D_obj)
ans =
3×1 cell array
{'k'}
{'n'}
{'w'}
K>>
The field name is lowercase "k", not uppercase "K". MATLAB is case-sensitive.
  댓글 수: 5
HabenG
HabenG 2021년 12월 3일
Opps, just realized i crossed my variable. that was the issue. thanks for taking a look though.
dpb
dpb 2021년 12월 3일
I was pretty sure had to be something of the sort...glad you found it.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by