y=a*b^x

6 vues (au cours des 30 derniers jours)
Jeyhun Mansurov
Jeyhun Mansurov le 2 Déc 2020
How to plot an equation that looks like y=a*b^x? i have values for x and y.
  3 commentaires
Jeyhun Mansurov
Jeyhun Mansurov le 2 Déc 2020
can u explain more? i have only worked with linear, and second grade equations. thank you
Houman Rastegarfar
Houman Rastegarfar le 2 Déc 2020
Hi Jeyhun,
If you know the values of x and y, then you can use the plot function. This line of code creates a plot of the data in y versus the corresponding values in x.
plot(x,y)
For more information, see plot.
-Houman

Connectez-vous pour commenter.

Réponses (1)

Setsuna Yuuki.
Setsuna Yuuki. le 2 Déc 2020
Modifié(e) : Setsuna Yuuki. le 2 Déc 2020
For example if your y = a*cos(x), you can use plot like this:
x = 0:1e-2:20; %x values
a = 2; %can be anything constant number
y = a*cos(x);
plot(x,y)

Catégories

En savoir plus sur Graphics 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!

Translated by