Compute the Maximum Points Value in Optimum triangular area (update:07-29-07)

optimization analysis with cyclic-permutation
1.3K Downloads
Updated 30 Jul 2007

No License

In the one point-system, we suppose a optimum triangular area and this area should be contain maximum points in the selected point-system. Extarly, this triangular area's of boundary conditions should be depend only three-node in point-system.

Also, this sub-program running of similarly cyclic-permutation technique than not more-speedly. This program's cyclic-permutation run-time is depend matlab main function as -nchoosek-. Plainly, If you selected more 100 point than solution time possible be few minute. This program's low-order-level of run-time not depent is my program's base-algorithm.

for example:try run-time.
tic;nchoosek(500,3);toc <----|

Syntax:
Syntax.input
random=nodes = [x(i) y(i)]

Syntax.outputs
random_nodes_in = maximum node computed triangular area
random_nodes_out = other node

Example:
random_node = rand(20,2); <---|
random_nodes=
node value x(i) y(i)
3.0000 0.6104 0.2033
4.0000 0.9886 0.8193
9.0000 0.6655 0.2923
12.0000 0.4604 0.8841
13.0000 0.8000 0.6156
17.0000 0.7132 0.8267
18.0000 0.7204 0.6114
19.0000 0.7333 0.8473
20.0000 0.6223 0.1141

random_nodes_out=
node value x(i) y(i)
1.0000 0.5503 0.9898
2.0000 0.7772 0.1524
5.0000 0.0483 0.0584
6.0000 0.9854 0.5385
7.0000 0.2047 0.1902
8.0000 0.9125 0.5995
10.0000 0.4623 0.0913
11.0000 0.0483 0.5068
14.0000 0.2894 0.0464
15.0000 0.6951 0.9519
16.0000 0.2593 0.1690

Run-times:
tic;[A,B] = maxnodetrn(rand(5,2)),toc Elapsed time : 0.018329 s.
tic;[A,B] = maxnodetrn(rand(10,2)),toc Elapsed time : 0.062679 s.
tic;[A,B] = maxnodetrn(rand(20,2)),toc Elapsed time : 0.115247 s.
tic;[A,B] = maxnodetrn(rand(30,2)),toc Elapsed time : 0.193706 s.
tic;[A,B] = maxnodetrn(rand(40,2)),toc Elapsed time : 0.447564 s.
tic;[A,B] = maxnodetrn(rand(50,2)),toc Elapsed time : 0.935133 s.
tic;[A,B] = maxnodetrn(rand(100,2)),toc Elapsed time : 10.459298 s.
tic;[A,B] = maxnodetrn(rand(200,2)),toc Elapsed time : 140.301166 s.


Notice:
This sub-function is running the cyclic-permutation algorithm. If you selected more 100 point than solution time be possible a few minute.

Cite As

Ali OZGUL (2024). Compute the Maximum Points Value in Optimum triangular area (update:07-29-07) (https://www.mathworks.com/matlabcentral/fileexchange/15714-compute-the-maximum-points-value-in-optimum-triangular-area-update-07-29-07), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

program run-times updated