how to solve system of two non linear equations? (power law)
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Faisal
le 30 Mai 2023
Commenté : Faisal
le 30 Mai 2023
I have two equation related to power law equation solution.
- 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)
- 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.
0 commentaires
Réponse acceptée
Shaik mohammed ghouse basha
le 30 Mai 2023
Modifié(e) : Shaik mohammed ghouse basha
le 30 Mai 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);
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)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!