how to find constant value for a equation

4 views (last 30 days)
erniza jaya
erniza jaya on 16 Nov 2015
Answered: Walter Roberson on 16 Nov 2015
how to find constant value for a equation J= 2/(1+2Kt) ?
i have a series value of J and t.
how do i find constant K?
J= 11.07,12.41,12.41,12.66,12.85,12.60,12.60,12.66
t= 5, 10, 15, 20, 25, 30, 35, 40

Answers (1)

Walter Roberson
Walter Roberson on 16 Nov 2015
funK = @(K) sum((2 ./ (1 + 2 * K * t) - J).^2);
bestK = fminsearch(funK, rand);
The answer you get back will be about -0.0108739275290992

Community Treasure Hunt

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

Start Hunting!