I already explained this in my answer four days ago:
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 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