# \`InexactError\` in my Plots.jl related script

**URL:** https://discourse.julialang.org/t/inexacterror-in-my-plots-jl-related-script/105170
**Category:** New to Julia
**Created:** [October 19, 2023, 9:53am UTC](https://discourse.julialang.org/t/inexacterror-in-my-plots-jl-related-script/105170 "2023-10-19T09:53:15Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [October 20, 2023, 10:43am UTC](https://discourse.julialang.org/t/inexacterror-in-my-plots-jl-related-script/105170/11 "2023-10-20T10:43:43Z")

</div>

I already explained this in my answer four days ago:

> [@Problem in my code](https://discourse.julialang.org/t/problem-in-my-code/105021/3):
>
> To be even clearer: nouvelles\_infections = Int[susceptibles[jour - 1] \* taux\_transmission \* infectes[jour - 1] / population\_totale] Here you are saying the number of new infections is given by the number of susceptible agents in the population yesterday, multiplied by a transmission rate and the share of infected in the total population. Clearly it is unlikely that this number will be an integer - the transmission rate is probably not an exact integer, and neither will the share of infected in…

You need to be careful about the distinction between a number (e.g. `4`) and a one-element vector holding a single number (`[4]`). They are not the same thing and the difference matters.

Not to unfairly prejudge you, but it seems to me you might have very limited experience with coding and Julia specifically. Instead of posting a full model here and then letting people on the forum debug it line-by-line, I think you might find it more productive to spend a bit of time learning the basics; [Think Julia: How to Think Like a Computer Scientist](https://benlauwens.github.io/ThinkJulia.jl/latest/book.html) is a good starting point for getting started both on programming and Julia, if you’re more of a video person I know many people like [https://www.youtube.com/c/juliafortalentedamateurs/about](https://www.youtube.com/c/juliafortalentedamateurs/about)

---

_[View the full topic](https://discourse.julialang.org/t/inexacterror-in-my-plots-jl-related-script/105170)._
