-2

I have these two equations and I want to find the values of these two parameters:

9.393e(16) = ((N*K)/(K + 0.0045))*(1 - exp (-(K + 0.0045)*120))

1.376e (17) = ((N*K)/(K + 0.0045))*(1 - exp (-(K + 0.0045)*240))

How can I solve it in matlab or wolfram please

Buck Thorn
  • 5,024
  • 2
  • 17
  • 27

2 Answers2

1

I guess a hand calculator is sufficient for that.

Call:

a = 9.393e(16)
b = 1.376e (17)
Q = (N*K)/(K + 0.0045)
f = exp (-(K + 0.0045)*120)  => exp (-(K + 0.0045)*240) = f^2

You have:

 a = Q (1 - f)
 b = Q (1 - f^2)

so

a/b = (1 - f) / (1 - f^2) = 1 / (1 + f)

thus

f = b/a - 1

You can take the log at both sides and solve for K.

-(K + 0.0045)*120 = log(b/a - 1)

To find N the equation is again just linear.

Acorbe
  • 8,367
  • 5
  • 37
  • 66
  • I am really sorry, I don't understand your solution. Could you please guide me for the matlab – Hisham Alghamdi Sep 14 '13 at 17:57
  • @HishamAlghamdi, I extended the answer. There is no need for matlab to solve that. That is not matlab code, rather hand calculations. you can use matlab to evaluate the log. – Acorbe Sep 14 '13 at 18:02
  • Sorry, but how can I solve it if the second equation modified to 1.376e (17) = ((N*K)/(K + 0.0045))*(1 - exp (-(K + 0.0045)*300)) – Hisham Alghamdi Sep 14 '13 at 19:33
  • I found the solution by using in Matlab: sym x x=solve('((1-exp(-(x+0.0045)*120))/(1-exp(-(x+0.0045)*280)))-0.682') – Hisham Alghamdi Sep 14 '13 at 21:27
1

You can solve simultaneous non-linear equations in MATLAB via FSOLVE or LSQNONLIN. However, this requires the Optimization Toolbox.

See this MathWorks knowledgebase article.

Given the magnitude of the LHS of your equations, I would not be surprised if you see some numerical instability. You might want to do this problem by hand as suggested by Acorbe.

chappjc
  • 30,359
  • 6
  • 75
  • 132