MATLAB: How to divide every column of an array with another column of the same length

columnsindexing

I have a numerical array Y (1058×18) and another numerical array S (1058×1). I want to divide every column of Y with the single column of S and have an output X (1058×18)

Best Answer

res = Y ./ S;