Matrix construction from base n indices
显示 更早的评论
I'm looking for an efficient way to construct the following matrix
where
and
are indexed from 0 to N as they would be in a base
number system i.e. 000,001,...,00N,010,...,01N,...,0NN,...NNN. These indices are then 'split up' across the different functions
. Written out this looks like
.So, for example if
then the final matrix is the following 27x27 matrix:
.In practise N will probably be around 15 and the functions
can be quite costly so ideally I'd like to implement a vectorised method.
Thanks in advance,
Andrew
1 个评论
Jan
2018-12-12
If the computation of f,g,h is costly, the vectorization of the creation of the matrix is not the main problem, but vectorize f,g,h.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!