|
"Dave Brackett" <davebrackett@hotmail.com> wrote in message <gff0pa$n8e$1@fred.mathworks.com>...
> "Aaron " <borkovman@gmail.com> wrote in message <gfcl8e$lfg$1@fred.mathworks.com>...
> > I need a hangman program that would work on the R2008a version of Matlab. I tried the one in the file exchange and I couldn't run it (Maybe because it was on the R12 version of Matlab) I would really appreciate it if someone would help me!
> >
> >
> > tl;dr: I need a working .m file of hangman on Matlab.
>
>
> you could try writing one yourself using your version of Matlab based on the existing one from the file exchange. shouldn't be too difficult.
i've just tried using the hangman file from the file ex with version 2008a and the only thing stopping it from working is the 'flower' image which it tries to read from the image demos built in to matlab. This image does not come with version 2008a hence the difficulties in running it.
There does not appear to be a reason for displaying a picture of a flower so if you don't mind what is displayed, simply replace all references to 'flower' with an image that is included with this version.
If you type 'load imdemos' in the command window, it will load all of the available images. Choose one of those and replace the references in the code: e.g.
change the code to:
% HangMan Drawing
u = figure;
set(u,'Color',[1 1 0])
load imdemos pepper
myflower(:,:,1) = pepper;
myflower(:,:,2) = pepper;
myflower(:,:,3) = zeros(128,128);
subplot(2,1,1)
imshow(pepper)
See if that works for you.
|