How to left divide 4D arrays
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Mantas Vaitonis
el 16 de Jul. de 2018
Comentada: Mantas Vaitonis
el 22 de Jul. de 2018
If I have two 2D gpuArrays f(NxM) and f1(NxM) of same size, then I can left divide them like this:
beta=arrayfun(@(n) f(:,n)\f1(:,n), 1:size(f,2));
What would be the way to do this if both f and f1 are 4D arrays of size (NxMxZxK)?
0 comentarios
Respuesta aceptada
Walter Roberson
el 16 de Jul. de 2018
beta = arrayfun(@(n) f(:,n)\f1(:,n), 1:numel(f)/size(f,1));
after which you will need to reshape() to the appropriate size.
15 comentarios
Walter Roberson
el 19 de Jul. de 2018
The left division of two real-valued column vectors A\B, is equal to the dot product of the two vectors divided by the square of the norm of A (that is, the sum of squares of the elements of A)
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!