I have a 3D matrix, X, of size AxBxC and a 2D matrix, Y, of size CxD. I want to do a matrix multiply and end up with a 3d matrix, R, of size AxBxD:
A = 30, B = 70, C = 300, D = 100.
The 3-d matrix, is a dummy variable which takes the value:
- 1 - in each dimension C at the instances AxB if (...)(and sum of all Cs = 300), different for each C.
- 0 - otherwise
X is defined as follows:
X = zeros(A,B,C);
for s = 1:C
for i = 1:B
for j = 1:A
X(j,i,s) = data(2,s) >= beglat +5*j && ...
data(2,s) < beglat1 +5*j && ...
data(3,s) >= beglong +5*i && ...
data(3,s) < beglong1 +(5*i);
end
end
end
The 2D matrix, Y, is times series data.
My biggest problem is with the dummy variable.