seconda lezione pre esercizi
This commit is contained in:
parent
f7a282108c
commit
8f36b9b171
5 changed files with 29 additions and 0 deletions
20
Lezione1/es1/es1.jl
Normal file
20
Lezione1/es1/es1.jl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
r+=p
|
||||
end
|
||||
return r
|
||||
end
|
||||
|
||||
|
||||
#plot the results
|
||||
|
||||
#define a range
|
||||
epsilon = 1e-3
|
||||
t = range(epsilon,1,lenght=20)
|
||||
|
||||
#define the approximation
|
||||
r(x,N) = (x^(N+1)/fatctorial(N+1))
|
||||
|
||||
# define the difference
|
||||
h(x,N) = exp(x)-g(x,N)
|
||||
|
||||
# plot
|
||||
Loading…
Add table
Add a link
Reference in a new issue