Hi all,
I’m trying to optimize my code by implementing structs instead of just variables. This means changing my functions to receive structs instead of those variables, and I’m trying to broadcast over a particular struct.
I get the error MethodError: no method matching length(::Main.workspace323.Medium)
where Medium
is a struct of my design.
I have a self-contained Pluto notebook that you can investigate. Feel free to scroll right to the end where the error is displayed.
Basically my question is, how do I broadcast my function over the inputted array of structs?
3 posts - 2 participants