How to replace a value at a specif place in a matrix with another value?

== is the comparison operator, not an assignment - you want = instead.