Rank: 1536 based on 40 downloads (last 30 days) and 6 files submitted
photo

Mathias Benedek

E-mail
Company/University
University of Graz, Austria

Personal Profile:
Professional Interests:
Cognitive neuroscience, Psychophysiology

 

Watch this Author's files

 

Files Posted by Mathias View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
21 Oct 2011 Screenshot Connect Four The classic game connect four can be played on a 7x7 board against a computer-opponent at 3 levels. Author: Mathias Benedek game, minimax, algorithm, brute force, connect four 26 0
04 Jan 2011 Screenshot NSTRUCT2CELL Conversion of nested structure to cell, providing overview and easy access to all sub-fields Author: Mathias Benedek conversion struct cel... 2 0
  • 5.0
5.0 | 1 rating
19 Dec 2010 Screenshot mfilecompare MFILECOMPARE analyzes a set of m-files for the relative overlap of their content Author: Mathias Benedek mfile, content analysis, overlap, code, comments, plagiarism 5 0
19 Dec 2010 mfileread This function separately returns the code part and the comment part of an m-file Author: Mathias Benedek data import, mfile, read, code, comments, text 1 0
21 Jan 2008 Screenshot Chess clock Digital chess clock with variable time limit and optional extra time per move Author: Mathias Benedek games, fischer, chess, clock, game 4 2
  • 5.0
5.0 | 2 ratings
Comments and Ratings on Mathias' Files View all
Updated File Comment by Comments Rating
08 Jun 2011 NSTRUCT2CELL Conversion of nested structure to cell, providing overview and easy access to all sub-fields Author: Mathias Benedek Knight, Benjamin
05 Dec 2007 Chess clock Digital chess clock with variable time limit and optional extra time per move Author: Mathias Benedek D'Errico, John

Nicely cleaned up. One minor problem - the initial dialog box to set the clock times has a cancel button on it. But if you click on the cancel button, then you get an error message:

??? Index exceeds matrix dimensions.

Error in ==> chess_clock at 32
    timelimits = str2double(timeset(1:2)) * 60; %total time per player [sec]

I'd suggest that canceling out of the dialog box should close the clock instead of causing an error. If it does not close the clock, then there should be a way provided to restart the clock if you do click cancel.

I'll rate this clock as a 5 anyway, since the other issues I noted were all fixed cleanly, and assume the author will fix this one too.

26 Nov 2007 Chess clock Digital chess clock with variable time limit and optional extra time per move Author: Mathias Benedek D'Errico, John

One minor point - If the FIRST line of the help is a useful one line description of your function, including reasonable keywords, then the function lookfor will be able to search for your code. In this case, the author has a blank comment line in the help as the first line. Then he has a good descriptive line. But this means that lookfor no longer works on this file. For example, if I removed that blank line, then the command "lookfor chess" finds this file.

Another issue of note - the author uses globals in the code. Yes, perhaps the code works. But just imagine that you have some other code that uses the global variables "turn" or "status". Yep - your code may possibly no longer run properly if you use this clock!

The point is that global variables are dangerous, and simply not necessary to pass information around. Better approaches to the problem might have been to use nested functions for the callbacks, or guidata, or even persistent variables. At the very least, use names that are less likely to step on something else!

As for the clock itself, I like it. Its a nice idea. The help seems reasonable, as is the code, except for the use of globals. I might have added internal comments to the code - they are invaluable for the future when you will want to debug your own code if a problem comes up, or if you want to modify your code to add a new capability.

One downside to this clock - while I'm no longer a speed chess player (and an old nickname of mine, "Father Time", indicates I never really was a speed chess player) there is a certain satisfaction to smashing down the button on a chess clock after a particularly good move or sequence of moves. Will you get that same feeling when you hit the space bar on your keyboard?

09 Mar 2007 strrepx Replace string with another in any location of a mixed cell/struct - data structure Author: Mathias Benedek Roossien, B.

Wouldn't the functions 'structfun' and 'cellfun' be more useful instead of the for loops you now use?

Top Tags Applied by Mathias
code, comments, game, mfile, algorithm
Files Tagged by Mathias View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
21 Oct 2011 Screenshot Connect Four The classic game connect four can be played on a 7x7 board against a computer-opponent at 3 levels. Author: Mathias Benedek game, minimax, algorithm, brute force, connect four 26 0
04 Jan 2011 Screenshot NSTRUCT2CELL Conversion of nested structure to cell, providing overview and easy access to all sub-fields Author: Mathias Benedek conversion struct cel... 2 0
  • 5.0
5.0 | 1 rating
19 Dec 2010 Screenshot mfilecompare MFILECOMPARE analyzes a set of m-files for the relative overlap of their content Author: Mathias Benedek mfile, content analysis, overlap, code, comments, plagiarism 5 0
19 Dec 2010 mfileread This function separately returns the code part and the comment part of an m-file Author: Mathias Benedek data import, mfile, read, code, comments, text 1 0
21 Jan 2008 Screenshot Chess clock Digital chess clock with variable time limit and optional extra time per move Author: Mathias Benedek games, fischer, chess, clock, game 4 2
  • 5.0
5.0 | 2 ratings

Contact us at files@mathworks.com