When RAM Mapping fails there should be a warning in the generated report that gives more information about what happened.
In this case, one thing I can see looking at the provided code is that there are non-scalar accesses to the variables intended to be mapped to RAM. I'd expect to see the warning 'RAM mapping failed for variable, "scaler_std_rec", because it has a non-scalar sub-matrix access.' and similar warnings for other variables.
This is related to the current limitation of the RAM Mapping "Each read or write access is for a single element only." The limitations are listed on the page Map Persistent Arrays and dsp.Delay Objects to RAM. The operation "(input - scaler_mean) .* scaler_std_rec" is considered a read to every element of scaler_std_rec in regards to this limitation.
A workaround would be to write this operation and other similar operations as a loops and use coder.unroll to unroll the loops.