How can I construct a Smolyak index Matrix?
1 次查看(过去 30 天)
显示 更早的评论
Hello everybody.
I want to program a Smolyak matrix of indices, as in this article. For that, I need to decide the number of dimensions, d, and the level, l. The matrix has as many rows as dimensions and the sum of all elements on a row has to be between the values of d and d+l; also, the number formed by the elements of the row has to be as high as low as possible.
These are some examples of what I want:
Example 1: d=2, l=1.
In this case, the index matrix will look like
1 1
1 2
2 1
The first row is equal to d and the second and third are equal to d+l. Also, the number obtained from adding the row is as small as possible. Se 11, 12 and 21.
If the number of dimensions is 3 instead, the matrix would look like
1 1 1
1 1 2
1 2 1
2 1 1
If d=2 and also l=2 the matrix will look like
1 1
1 2
2 1
1 3
2 2
3 1
If someone has programmed how to construct matrices like this, I would be extremely thankful if they shared their code.
Thanks for reading.
Regards.
Jaime.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!