Can I make a ' y=k*x^n ' distribution by makedist() ?
2 views (last 30 days)
Thank you at first.
I hope to have the relation when loglog(x, y) plot , there will be a straight line, I know the math equation 'y=k*x^n' will make it, since ' log10(y) = log10(k) + n*log10(x)'. So that, if given x = 0:1e-3:1, equally spaced steps (linear), then plot the loglog(x,y), the line will be straight with a slope=n, offset=log10(k).
The question is how to use it with griddedInterpolant() & makedist() ?
Fitp = griddedInterpolant(f_base(:,1),f_base(:,2),'linear','none');
pd = makedist('exponential');
exp_y = pdf(pd,x);
I found the most similar is using makedist('exponential') with 'method' = 'exponential', which has the relation y=1/e*exp(1-x), if take log() with both side, log10(y) = log10(1/e) + (1 - x)*log10(e), here the log(y) won't be linear to log(x), it's linear to 'x' only.
So, may I ask, how to have a logarithm to logarithm relations between the griddedInterpolant() points (steps) or makedist() probability density function ?
I need to specify some points for 'bin' search in an array which x value (indexing) is in linear, but the search result (returned 'y' vs. x) I hope it has the log-log relation.
Can you help to give some hint how to do this ?
Thank you very much.