Y = zeros(15,10)
for i = 1:10
Y[:,i] = (Data[1:15,9+i].* ((1 .- Data[1:15,3+i]) + (0.3 .* Data[1:15,3+i])))
end
Hint: Use triple backticks to typeset code. On my keyboard, you can find the backtick character in the top left corner right below esc, but your keyboard may be different.
Yes, you do, or you can accept loss of performance and increased allocations. Alternatively, use @..
The point of dotting everything is that it all fuses into a single loop with no unnecessary intermediate arrays. If you drop it a single place, intermediate arrays are needed to hold each separate calculation, before combining them at the end.