You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
% randDisk(nSamples,radius,center)
%
% Compute a random distribution of points inside a unit disk.
%
% INPUTS:
% nSamples = number of random samples to return
% radius = optional radius parameter. Default = 1.
% radius = R --> circle with radius R
% radius = [a;b;th] --> ellipse
% a = major-axis radius
% b = minor-axis radius
% th = angle between major-axis and x-axis
% center = [cx, cy] optional center of the circle command
%
% OUTPUTS:
% samples = [x;y] a uniform distribution within the desired region
%
%
Cite As
Matthew Kelly (2026). randDisk (https://www.mathworks.com/matlabcentral/fileexchange/54460-randdisk), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (1.5 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
