General Binomial Matrix Manipulation
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Akira Agata
2019-9-3
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?
采纳的回答
更多回答(1 个)
Andrei Bobrov
2019-9-3
编辑:Andrei Bobrov
2019-9-3
Aend = reshape(Abegin.*permute(Abegin,[1,3,2]),size(Abegin,1),[]);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!