randv - random vectors, with constraint axis

버전 1.0.0 (2.04 KB) 작성자: Carson Purnell
Generate random vectors on a unit sphere/circle/etc, and random vectors from a given axis based on cone-like constraints.
다운로드 수: 4
업데이트 날짜: 2023/9/13

라이선스 보기

A bit of code that i've ended up needing to have multiple times for different reasons and got tired of rebuilding it each time. Might be useful for anyone looking for similar random vectors.
Simple use case: generating a number of random vectors, uniformly distributed on the surface of the unit shape of at least dimension 2. Trivial use of randn and vecnorm.
Complex use cases: generating random vectors based on a given axis and constrained by some set of angles. Can make rings, cones, negative cones within spheres, etc. Only works for 3-dim vectors. Useful for getting a random 'search area' cone, random walks, of getting random radial deflections.

인용 양식

Carson Purnell (2024). randv - random vectors, with constraint axis (https://www.mathworks.com/matlabcentral/fileexchange/135301-randv-random-vectors-with-constraint-axis), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2019b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
태그 태그 추가

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0