How can I construct a Smolyak index Matrix?

1 回表示 (過去 30 日間)
Jaime  de la Mota
Jaime de la Mota 2019 年 9 月 9 日
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 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by