How does MATLAB generate Halton sequences

p = haltonset(d)
constructs a Halton quasi-random point set in d dimensions. Mathematically, the Halton set is basically d van der Corput sequences with different bases. So my question is, which base values does MATLAB use? I opened the code of HALTONSET and QRANDSET, but couldn't figure it out.
I ask this because I am working with Halton sets for my thesis and want to clarify how they are used in MATLAB.

답변 (1개)

Arnab Sen
Arnab Sen 2016년 2월 22일

0 개 추천

Hi Eric,
You can get the Name of the sequence on which point set P is based from 'Type' property of P. So, the code snippet would be like below:
>> P = haltonset(d)
>> base=P.Type
The base value depends on the dimension provided. If the dimension is 'd' the Bases will be the first 'd' primes. For example for dimension d=5, the Bases is [2,3,5,7,11].

댓글 수: 3

Thank you for your answer, it seems very logical to me. However, when I try it myself, base returns
Halton
instead of a set of prime numbers. Am I doing something wrong?
Arnab Sen
Arnab Sen 2016년 2월 23일
편집: Arnab Sen 2016년 4월 26일
you are getting the correct answer. There is no property or function that output bases. I found that by inspecting the MATLAB script haltonset.m itself.
Eric Schols
Eric Schols 2016년 3월 3일
Then how is it results are reproducable? That indicates something is governing the output.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Type Identification에 대해 자세히 알아보기

질문:

2016년 2월 17일

편집:

2016년 4월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by