@socks I feel like the behaviour we would intuitively expect would be that {1,2,3}+{4,5,6} yields {5,7,9}
-F
@socks we're also very used to matlab though, it might be less intuitive for others
matlab is heavily matrix-oriented so operations generally behave as they would on matrices; that's just how matrix addition and subtraction work. * is matrix multiplication, and / is actually a complicated operator that computes the inverse of the matrix on the right and left-multiplies it by the matrix on the left (there's also \ for inverting the matrix on the left instead)
-F
@socks yeah i think of them as vectors, i'm not sure what the difference is
-F
@socks when doing high level programming we're doing scripts in matlab to do calculations, so think in vectors and matrices, and when doing low level programming we think in arrays and pointers
-F
@socks it does have the useful feature that putting a . before any operator performs that operation separately on every element of two equal-sized matrices. So .+ and .- are the same as + and - but A .* B multiplies A₁₁ by B₁₁ and A₁₂ by B₁₂ etc, which is a really handy thing to have a dedicated syntax for instead of some function name you have to remember
-F
@Felthry Yeah, so that's just map then
@socks maybe that's a really common thing i dunno
matlab is the only high-level language we usually work in
-F
@Felthry Well, Matlab is extremely domain-specific. When I talk about programming concepts I talk about stuff that can apply to many programming languages for many different purposes
@socks yeah i'm just talking about what we know, and adding the caveat that our knowledge is limited
-F
@socks and realizing while talking that we may have been assuming matlab is more similar to other programming languages than it probably is
-F
@Felthry Yes, that makes sense when a list to you is a vector. Lists are a lot more general than that though