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!