Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Why my graph is not corelating with my calculations

1 visualizzazione (ultimi 30 giorni)
moonman
moonman il 3 Ott 2011
Chiuso: MATLAB Answer Bot il 20 Ago 2021
my equation is
exp(x)-(x+1)/(x-1)
Once i plot it with
> x=0:.01:3;
>> y=exp(x)-(x+1)/(x-1);
>> plot(x,y)
I get strange graph
For example at x=0 the equation says that y=2
but plot is showing close to -.5
why it is so??

Risposte (2)

Daniel Shub
Daniel Shub il 3 Ott 2011
There is a difference between "/" and "./". You want ./
y=exp(x)-(x+1)./(x-1);

moonman
moonman il 3 Ott 2011
Ok thanks daniel
I have calculated one root of this equation as
-1.5433
Is it correct answer can u check through matlab

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by