Plotting an equation at different X

2 次查看(过去 30 天)
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 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by