How can I construct a Smolyak index Matrix?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!