How to find exponent of a function?
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I have the following function: Y=exp -[(d/D)^n] Y and n are unknowns. D is a scalar and d is a vector. From physical point of view, n must be between 2.3 and 2.8. How can I get Y and n from this equation?
0 个评论
回答(2 个)
Alan Weiss
2015-12-18
I suppose that you have some data for d and D, and maybe even Y, and are asking how you can fit n and Y to the data. If that is so, there are several approaches depending on which toolboxes you have. For a base MATLAB approach, see Curve Fitting via Optimization. However, this approach does not allow you to place any restrictions on n. If you have Optimization Toolbox, check out Nonlinear Data-Fitting. If you have Statistics Toolbox or Curve Fitting Toolbox, you have a lot more options.
I hope this helps,
Alan Weiss
MATLAB mathematical toolbox documentation
1 个评论
Guillaume
2015-12-18
Please use Comment on this Answer rather than Answer ths question, Parham's comment moved here:
thanks Alan, yes indeed I have, d=[0.1 0.2 0.3 0.4 0.5 0.8 1], D=1.33, my goal is to find Y as a vector and n as an exponent.
Guillaume
2015-12-18
Your question does not make much sense. If you have two unknowns you need at least two equations. Otherwise, you can just choose any n within your allowed range and calculate Y from there.
If you know Y, d, and D, then you can do a linear regression on log(log(Y))/log(d/D).
2 个评论
Guillaume
2015-12-18
Please use Comment on this Answer rather than Answer ths question, Parham's comment moved here:
yes, but the problem is that I do not have the value of n. I know that there are some optimization method to find these exponent but I dont know which one is better.
Guillaume
2015-12-18
If you do not know any Y or n, then there's nothing to optimise. Pick a n, say 2.5, you get a bunch of Y.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!