Problem 60441. Generate a point cloud named `Simplex-Lattice Design`
- [W,N] = SLD(M=3,H=2) -> W = [0 0 1; 0 .5 .5; 0 1 0; .5 0 .5; .5 .5 0; 1 0 0]; N = 6;
- [W,N] = SLD(M=5,H=2) -> W = [0 0 0 0 1; 0 0 0 .5 .5; 0 0 0 1 0; 0 0 .5 0 .5; 0 0 .5 .5 0; 0 0 1 0 0; 0 .5 0 0 .5; 0 .5 0 .5 0; 0 .5 .5 0 0; 0 1 0 0 0; .5 0 0 0 .5; .5 0 0 .5 0; .5 0 .5 0 0; .5 .5 0 0 0; 1 0 0 0 0]; N = 15;
- H. Scheffé, “Experiments with mixtures," Journal of the Royal Statistical Society: Series B (Methodological), Vol. 20, No. 2, pp. 344–360, 1958.
- I. Das and J. E. Dennis, “Normal-boundary intersection: A new method for generating the Pareto surface in nonlinear multicriteria optimization problems," SIAM Journal on Optimization, Vol. 8, No. 3, pp. 631–657, 1998.
Solution Stats
Problem Comments
-
1 Comment
The tests for W are pitiful. I solved this for real, with some real checks in my scratch pad.
More specifically,
After the check of N, there is a brief, repeatable set of tests which can confirm if W is valid, without providing W in the test. I'm pretty sure any edge cases it misses would be harder to exploit than actually solving the stated problem.
assert(isequal(size(W),[N M]))
assert(all(ismembertol(W*H,0:H),'all'))
WNI=round(W*H); % pretty safe now
assert(all(sum(WNI,2)==H))
assert(isequal(size(unique(WNI,'rows')),[N,M]))
assert(isequal(unique(WNI,'rows'),WNI))
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
2352 Solvers
-
Check to see if a Sudoku Puzzle is Solved
333 Solvers
-
11502 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
12948 Solvers
-
Find out sum and carry of Binary adder
1623 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!