General Binomial Matrix Manipulation
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alexander Pakakis
le 3 Sep 2019
Commenté : Alexander Pakakis
le 3 Sep 2019
Let's say I have a matrix of the form:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/236831/image.png)
Starting from this matrix, I would like to calculate a new matrix, in a time efficient way:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/236832/image.png)
The algorithm, which I am looking for, should also work for a matrix of the form:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/236833/image.png)
Does someone know how this algorithm could look like?
Best
Alex
2 commentaires
Akira Agata
le 3 Sep 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?
Réponse acceptée
Plus de réponses (1)
Andrei Bobrov
le 3 Sep 2019
Modifié(e) : Andrei Bobrov
le 3 Sep 2019
Aend = reshape(Abegin.*permute(Abegin,[1,3,2]),size(Abegin,1),[]);
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!