tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File Exchange - type:Example category:"Desktop Tools and Development Environment"User-contributed code library2014-11-27T19:57:25-05:0031100tag:www.mathworks.com,2005:FileInfo/349882012-02-09T00:04:30Z2012-02-10T02:29:47ZSudokuThis code generates a random Sudoku puzzle or solves any given Sudoku puzzle.<p>I've been addicted to Sudoku since I knew the game and I play this game almost daily in my cellphone. However, sometimes the puzzle that I tried to solve is quite hard because I need to 'guess' a value at some point. To clear my frustation, I made SudokuSolver.m to solve any given Sudoku puzzle. This m-file includes random guessing scheme, so, when it is given an empty Sudoku puzzle, it will solves it and as the result, it generates a random Sudoku puzzle. After that, another m-file, Sudoku.m was made to generate user-interface for SudokuSolver.m.</p>Stepen Sahrunhttp://www.mathworks.com/matlabcentral/fileexchange/authors/127206MATLAB 7.13 (R2011b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/274722010-05-04T15:11:03Z2010-05-04T15:11:03ZparTicTocThis is a utility for timing PARFOR loops. <p>This utility is a class for timing PARFOR loops. It can be used to observe the various overheads that may exist in parallel for loops and the utilization of each worker. Various examples of using this utility can be found in Example_Script.m.
<br />
<br />This class should be used in the following way:
<br />
<br /> p = Par(n); (1)
<br /> parfor id = 1:n
<br /> Par.tic; (2)
<br />
<br /> <usual computations>
<br />
<br /> p(id) = Par.toc; (3)
<br /> end
<br /> stop(p); (4)
<br />
<br /> plot(p); (5)
<br />
<br /> 1. Construct a Par object, with the number of iterations as the input. This constructs the object.
<br /> 2. Call Par.tic just inside the PARFOR loop. This records the start time of the iteration.
<br /> 3. Call Par.toc just before the end of the PARFOR loop. Store the
<br />output to the appropriate index of the Par object. This is necessary for PARFOR to recognize that the variable is sliced.
<br /> 4. Stop the measurement. This records the final end time.
<br /> 5. Visualize.
<br />
<br />There may be some overhead in adding the Par construct. Because of this, the numbers you get may not accurately portray the true timing, especially for short computations.</p>Sarah Wait Zaranekhttp://www.mathworks.com/matlabcentral/fileexchange/authors/32376MATLAB 7.10 (R2010a)Parallel Computing Toolboxfalsetag:www.mathworks.com,2005:FileInfo/97742006-01-27T09:00:12Z2006-02-03T09:45:58Zehelp: a pedestrian extended help extractor utilityehelp typically is used as a subroutine to extract extended help from its main function<p>to provide good help is tricky: either it's too little or it clutters the command window with hundreds of lines - and thus becomes unintelligible.</p>
<p>Therefore, it is often desirable to give a user the option of various additional (=extended) help levels that go beyond the classical
<br />> help myfunc</p>
<p>EHELP offers a solution with these simple typical steps
<br />1) the author writes a function
<br />2) at the end, additional help sections are embedded, each between two unique tags
<br />3) the function body of EHELP is copy/pasted into the main function and acts as a subroutine
<br />3) command line options are implemented for a user to look at the extended help
<br />4) EHELP is called (typically within a switch-yard based on input options) to extract the appropriate section from its main function</p>
<p>EHELP can be used as a command line tool if the author provides appropriate information within the classical help section</p>
<p>use of low-level i/o functions guarantees a very quick extraction</p>
<p>see the accompanying published ML file for a simple example</p>ushttp://www.mathworks.com/matlabcentral/fileexchange/authors/4309MATLAB 7.1.0 (R14SP3)probably works for earlier releases as it was first programmed in 1996false