From: morrido on
hello! i made a program that basically identifies numbers in a sudoku puzzle and stores them into a matrix...

i recently came across with a Sudoku Solver program by Alan Tan..

i wanted to "link" my program with his..

i am a complete novice when it comes to MATLAB GUI's.. so please be patient and try to explain your answers as extensibly as possible..

my problem is as follows..
Alan Tan's sudoku solver has a "load" and a "make map" button..

"load" button loads a *.txt file with the sudoku numbers..

i have already been able to make the sudoku solver load the *.txt file made by my program on its first run..

now what i want is, that when his program is ran for it to fill the grid with the sudoku numbers provided in the already loaded *.txt without having to press the "make map" button

the "make map" button does this if i click it... but i want it to do it all by itself when the solver is started up...

is this possible? how?



Alan Tan's Sudoku Solver for matlab may be found at http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11247&objectType=file
From: Walter Roberson on
In article <13138774.1196390165073.JavaMail.jakarta(a)nitrogen.mathforum.org>,
morrido <dr_morrido(a)hotmail.com> wrote:
>Alan Tan's sudoku solver has a "load" and a "make map" button..

>now what i want is, that when his program is ran for it to fill the
>grid with the sudoku numbers provided in the already loaded *.txt
>without having to press the "make map" button

Search for the button and invoke its callback.

mmh = findobj('String','make map');
mmcb = get(mmh,'Callback');
mmcb{1}(mmh, [], mmcb{2:end});

--
"I was very young in those days, but I was also rather dim."
-- Christopher Priest
From: morrido on
where should I place those instructions? In my code or in his?

This is what I know about the Make Map button..

uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',0.9*m2, ...
'Callback','sudoku_guicb(''button_make'',get(gcbf,''UserData''));', ...
'Position',[485 303 50 16], ...
'String','Make Map');



do I place those instructions on the file where the code above is? I have tried it and it doesnt seem to work :/