Plotting an equation at different X

조회 수: 2 (최근 30일)
Yalda Saffary
Yalda Saffary 2016년 2월 19일
답변: jgg 2016년 2월 19일
Hi I want to plot an equation which depends on x. For example I what to plot y=1/(1-x) where value of x can be between 0 to 20. How can I write this code?

채택된 답변

jgg
jgg 2016년 2월 19일
You should look up the plot function:
incr = 0.1;
x = [1:incr:20];
y = (1-x).^-1
plot(x,y)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by