Plotting an equation at different X

1 visualizzazione (ultimi 30 giorni)
Yalda Saffary
Yalda Saffary il 19 Feb 2016
Risposto: jgg il 19 Feb 2016
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?

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Particle & Nuclear Physics in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by