Hi @Alexander,
If you review @Torsten and @Walter Roberton’s comments, they have provided some good suggestions towards to your comments. To multiply two 3D matrices element-wise in MATLAB, the appropriate operator is the dot multiplication operator `.*`, not `pagemtimes`. The `pagemtimes` function is designed for matrix multiplication, which requires that the inner dimensions match (i.e., the number of columns in the first matrix must equal the number of rows in the second). Since you want to perform element-wise operations where corresponding elements from both matrices are multiplied together, using `.*` is straightforward and efficient. Here’s how you can do it:
% Assume A and B are your two 3D matrices of size 100x130x100 A = rand(100, 130, 100); % Example initialization B = rand(100, 130, 100); % Example initialization
% Perform element-wise multiplication C = A .* B;
% Now C will also be a 3D matrix of size 100x130x100 containing the products
Please see attached.

In this example: - The `rand` function initializes two random matrices for demonstration purposes. - The operation `A .* B` performs element-wise multiplication across all corresponding elements in matrices A and B.
Using `.*` is generally more efficient than using a for loop, especially with large matrices. MATLAB is optimized for vectorized operations, which means that they run faster than explicit loops. Also, bear in mind when dealing with multidimensional arrays, ensure that you are clear about how each dimension corresponds to your data. Each element in a 3D matrix can be accessed using three indices (e.g., `A(i,j,k)`), where `i`, `j`, and `k` are the indices along the first, second, and third dimensions, respectively.
If you encounter issues with dimensions again, you can check the size of your matrices using the `size` function:
size(A) % This will return [100, 130, 100]
By following this approach, you should be able to achieve your goal without running into dimensionality issues.
Don't hesitate to reach out if you have more questions or need further clarification!