0
$\begingroup$

I want to enter this function into matlab, but I am in doubt what to do with the infinite spectrum

enter image description here

My try was this, but the graph looks very wrong enter image description here

  • 3
    If you just need to see the graph, it looks wrong because you forgot to divide the argument of $\arctan$ by 5: you should have f=1/2*(1+(2/pi)*atan(x/5)); Also, take a smaller interval like $[-20:0.1:20]$.2012-11-20

1 Answers 1

1

As described by @icurays you should use the correct function and range:

x = -25:0.001:25; f=1/2*(1+(2/pi)*atan(x/5)); 

Furthermore you will probably want to get your plot in the right position, so not only plot the function values, but also give the x values as input to your plot function:

plot(x,expcdf(f)) 

I do not have Matlab at hand, so there may be a typo somewhere, but it should work like this.