I start from a matrix of the shape: N · 2 · M which I call it as x. Then, I have another matrix called theta of the shape M. The following code give me the following error in octave: nonconformant arguments (op1 is 2x2x2, op2 is 2x2x2).
x(n+1,:,:) = x(n+1,:,:) + [cos(theta(:)) sin(theta(:))]
what is wrong with it?
PS. Here is the complete code:
M=30;
N=32;
for n=1:1:N
z = [1.0 0.0]
x(1,1,1:M) = z(1);
x(1,2,1:M) = z(2);
x(n+1,:,:) = x(n,:,:) + randn([1,2,M])
theta(:) = randn([M,1]);
x(n+1,:,:) = x(n+1,:,:) + [cos(theta(:)) sin(theta(:))]
end