Using MATLAB R2012a
I have a matlab script which I converted into a windows stand alone .exe file using the compiler. When I double click the created .exe, windows beeps at me and nothing happens, I don't even get a command window flashed at me. When I cd to the file location in the windows command window and type the file name I begin to get the text output that the script is supposed to give.
I use x = input('input x') with multiple disp() lines to guide the user through electing various parameters and giving the script file locations and names to read/write, but every time I input anything the command line spits back at me "'(input)' is not recognized as an internal or external command, operable program or batch file." It then kicks me to the standard command line prompt with my current directory location "C:\Documents and Settings\…>". If I then type my input again, the script seems to accept it and moves on to the next batch of text but then repeats this process.
I then run into a problem a little further on when trying to do some math after reading an input file, but I don't believe that the script is actually accepting any of the inputs as it skipped over creating an output file which is supposed to be open after the first series of input commands.
I have no idea what is causing the problem and I would rather not have to send my users to the windows command prompt if I can help it. I also would like to keep the input commands if possible as opposed to having the users alter an input file that the script reads to change input parameters.
Thanks
*Edit*
After some tweaks I managed to get the script working even in the command window (the script outputs the correct file format). However I still have to enter every input line twice, with the first giving the above reported problem. I am not only inputting file names/directories but variables as well which are required to produce the output file with the correct properties. As this is supposed to be a stand alone program for my end users I don't want to bog them down with having to enter the same information twice at each input line.
Also, the program still doesn't run if double clicked, it only functions if navigated to and run through the command window.
Best Answer