how to solve system of two non linear equations? (power law)

1 view (last 30 days)
I have two equation related to power law equation solution.
  1. I have two points, and I want to find the power "b" in power law equation Y = ax^b. the points are x,y = (0.0226336, 24.988) & (0.0180306, 0.179498)
  2. I have one point and the power b. point x,y = (0.0226336, 24.988) and power b = 2. Now I want to plot the equation using point and power b.

Accepted Answer

Shaik mohammed ghouse basha
Edited: Shaik mohammed ghouse basha on 30 May 2023
Hello,
As per my understanding of your question, you have an equation of form . In first part with given two points on curve you want to find the variable b. In second part with a point and value of b you want to plot the curve.
Part I:
Given two points on curve as (0.0226336, 24.988) & (0.0180306, 0.179498).
Let points be
As both points satisfy the power law equation we can write:
dividing both these quations you get:
Take log on both sides of this equation you get:
y1 = 24.988;
y2 = 0.179498;
x1 = 0.0226336;
x2 = 0.0180306;
b = log(y1/y2) / log(x1/x2);
disp(b);
21.7095
Part II:
To plot the equation we need to find the value of a.
As given point satisfy the equation we can use this to find a.
y1 = 24.988;
x1 = 0.0226336;
b = 2;
a = y1/x1.^b;
x = -10:0.01:10;
%x goes from -10 to 10 with an increment of 0.01
y = a*x.^b;
plot(x, y)

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!