I want to know if it is possible to change the element of matrix without enumerate all other elements of that matrix.
for example I have a matrix (D) with 1900 rows and 1500 columns and 5 in third dimension. for example when I write the code:
D(1,2,[2,4])=[1 0];
It again makes new matrix D with a little change that I wanted. Is it possible that it changes just in those elements without making the other elements again.
Here's one way with
linear indexing-You can introduce
sub2indfor a bit more readability -Verify output -