How to find exponent of a function?

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?

Answers (2)

Alan Weiss
Alan Weiss on 18 Dec 2015
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 Comment

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.

Sign in to comment.

Guillaume
Guillaume on 18 Dec 2015
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 Comments

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.
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.

Sign in to comment.

Categories

Commented:

on 18 Dec 2015

Community Treasure Hunt

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

Start Hunting!