0

I have been trying to solve for n in the equation given below in matlab. All the rest of the values are known : H_obs = 1*61 vector, dhdx = 1*61 vector, a = 1*61 vector. All the values of all the vectors are known

    a = (2*(10^-25)/(n+2))*((918*3.71)^n)*(H_obs.^(n+2))*(abs(dhdx).^(n-1))*dhdx;

Any tips on how to solve? TIA

Crossfit_Jesus
  • 53
  • 4
  • 18
  • First factor has (n+2) in denominator and rest have it in exponent? – hazeiio Nov 13 '18 at 09:34
  • 1
    Since you have 61 equations and 1 unknown, what you have is an overdetermined system - which means that you're not _solving_ it, but rather _finding an optimal solution_ in some sense. Take a look [here](https://www.mathworks.com/help/optim/index.html). – Dev-iL Nov 13 '18 at 09:36
  • @hazeiio : Yep. – Crossfit_Jesus Nov 13 '18 at 11:18
  • @Dev-iL : Thanks. That's exactly what I'm doing. – Crossfit_Jesus Nov 13 '18 at 11:19
  • Since it is nonlinear equation, you can use `fsolve` from Optimization Toolbox. You can find additional information on how to use it here: [link](https://www.mathworks.com/help/optim/ug/fsolve.html) – hazeiio Nov 13 '18 at 11:22
  • @hazeiio : Thanks. Will look into it. Was actually wondering how to go about solving it, making the objective function and solving for n using fsolve or fminunc. – Crossfit_Jesus Nov 13 '18 at 15:26

0 Answers0