📄 test_rand_uniform_inside_hypersphere.m
字号:
% A test function for test_rand_uniform_inside_hypersphere.m%subplot(1,3,1)figure(1)X = zeros(1,100);ticX = rand_uniform_inside_hypersphere(1,100);tocplot(X(1,:),X(1,:), 'bo')figure(2)%subplot(1,3,2)X = ones(2,400);ticX = rand_uniform_inside_hypersphere(2,400);tocplot(X(1,:),X(2,:),'b.');figure(3)%subplot(1,3,3)X = zeros(3,4000);ticX = rand_uniform_inside_hypersphere(3,4000);tocplot3(X(1,:),X(2,:),X(3,:),'b.');% % Figure out which kind of random number is easier to generate.% pointCount = 2000;% X = zeros(2000);% tic% X = rand(2000);% toc% tic% X = randn(2000);% toc% % Uniform generation is actually a little slower than normal distribution.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -