N-queen generalized genetic algorithm. Parameters can be changed and tested. It has very basic but effective functions of selection,crossover and mutation. Queens are randomly positioned in the beginning. I have written it for n-queens. It gives a good amount of solutions for queens > 8. Also you can change parameters and test for yourself. The cross-over logic is given in the attached PDF-cross-over_logic.
IDX = OTSU(I,N) segments the image I into N classes by means of Otsu's N-thresholding method. OTSU returns an array IDX containing the cluster indices (from 1 to N) of each point. IDX = OTSU(I) uses two classes (N=2, default value).
TBiancoGlobe is a very simple GraphicControl that allow you to see a 3D ball. Setting the position repeatatly you could get a nice rotating effect. You can add points N everywhere by setting X, Y position and color.
This is project is a refactoring assistant kit. It intends to provide tools and script to help refactor C++ code, replacing our usual search'n'replace by providing some rough code analysis and IDE specific plug-ins for integration.
Y = INPAINTN(X) replaces the missing data in X by extra/interpolating the non-missing elements. The non finite values (NaN or Inf) in X are considered as missing data. X can be any N-D array. Important note: ----------------
NUMREGPOLY Number of Intersection Points and Regions Made By The Diagonals of a Regular Polygon [A,B,I,R]=numregpoly(N) for integer n returns the following: A: Vector of number of points inside the regular n-gon other than...
MAT = NPERMUTEK(N,K) returns all possible permutations of the elements taken from vector N of length K. This type of sampling is an ordered sample with replacement. This is also known as the permutations with repetition. MAT has size...
This submission contains VERT2LCON and LCON2VERT, which will find the linear constraints defining a bounded polyhedron in R^n, given its vertices, or vice versa. They are extensions of Michael Kleder's VERT2CON and CON2VERT functions that can...
Fct_MPN_FPN_I4_Ch1_NK.zip contains the following :
MPN_FPN.m : This programme creates Mersenne Prime Numbers and Fermat Prime Numbers. We are however, limited in the range here because MATLAB's isprime()is limited to only 2^32.
Calculates the Mardia's multivariate skewness and kurtosis coefficients as well as their corresponding statistical tests. For large sample size the multivariate skewness is asymptotically distributed as a Chi-square random variable; here it is...
One-sample repeated measures is used to analyze the relationship between the independent variable and dependent variable when:(1) the dependent variable is quantitative in nature and is measured on a level that at least approximates interval...
Creates a continuous shaded error region rather than discrete bars. Error region can either be specified explicitly or calculated on the fly based upon function handles. Handles of the plot objects are returned in a convenient structure.
I have looked far and wide for code for fast sorting of n dimensional arrays by the first element, for example if I had the array: ray = [[1,2,3,7,5][10,11,12,13,14]]
I would want it to come out as ray =...
Groups the elements returned by an iterator into n-tuples. The final tuple may be padded with Nones.
In this project, we seek to minimize the gap-to-capacity (given by Shannond-deOaos theoretical limit) of a rate 1/3 code (also can be modified for 1/N). This is done via a convolutional encoder/decoder for varying memory elements as well for both...
It uses an optimization formulation of n-person non-co-operative games as described in the paper "An Optimization Formulation to Compute Nash Equilibrium in finite Games" presented by the author, available at...
Multiscreen difraction PLmsd due to N+1 buildings replaced by equivalente N+1 absorving screen is quantized as 20log10(|Q(N+1,gc)|). Wb: distance between buildings; Ws: street width; ht: tx antenna heigth; hb: mean building...
NDSPACE N-dimensionally spaced points NDSPACE(X1, X2) generates a column matrix of 10^n linearly equally spaced points in the hypercube defined by the two diametrically opposite cornerpoints X1 and X2 both n-by-1 vectors. If...
The online tutorial starts by briefing the types of n-tier applications. The main theme of this article deals with the method of generating dataset which forms a web service to return data. From a Windows application the users could use a Web...
Task:
Think of a chess field 8x8. Place 8 queens in a way that no one menaces another one.
Intention:
Writing an algorithm to provide all solutions Adjusting the algorithm in a way that... |