y=a*b^x

조회 수: 6 (최근 30일)
Jeyhun Mansurov
Jeyhun Mansurov 2020년 12월 2일
편집: Setsuna Yuuki. 2020년 12월 2일
How to plot an equation that looks like y=a*b^x? i have values for x and y.
  댓글 수: 3
Jeyhun Mansurov
Jeyhun Mansurov 2020년 12월 2일
can u explain more? i have only worked with linear, and second grade equations. thank you
Houman Rastegarfar
Houman Rastegarfar 2020년 12월 2일
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

댓글을 달려면 로그인하십시오.

답변 (1개)

Setsuna Yuuki.
Setsuna Yuuki. 2020년 12월 2일
편집: Setsuna Yuuki. 2020년 12월 2일
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)

카테고리

Help CenterFile Exchange에서 Graphics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by