General Binomial Matrix Manipulation
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Alexander Pakakis
el 3 de Sept. de 2019
Comentada: Alexander Pakakis
el 3 de Sept. de 2019
Let's say I have a matrix of the form:
Starting from this matrix, I would like to calculate a new matrix, in a time efficient way:
The algorithm, which I am looking for, should also work for a matrix of the form:
Does someone know how this algorithm could look like?
Best
Alex
2 comentarios
Akira Agata
el 3 de Sept. de 2019
Assuming Astart is n-by-2 array, straight-forward way to calculate Aend would be:
Aend = [Astart(:,1).^2 Astart(:,1).*Astart(:,2) Astart(:,2).*Astart(:,1) Astart(:,2).^2];
But it's not clear for me what Aend looks like when Astart is n-by-m array.
Could you explain more detail on this?
Respuesta aceptada
Más respuestas (1)
Andrei Bobrov
el 3 de Sept. de 2019
Editada: Andrei Bobrov
el 3 de Sept. de 2019
Aend = reshape(Abegin.*permute(Abegin,[1,3,2]),size(Abegin,1),[]);
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!