view commandline with compile matlab exe - matlab

I have a matlab gui which works in matlab but if I compile it to a gui, the application
does not respond on buttons and somehow does not work.
Now I would like to see all error messages, but I can not because there is no commandline anymore.
Can I switch on a commandline ouput window for matlab executables?

One can simply run he exe from a dos shell. Alle comand line output will be available in the dos shell.

Related

Run MATLAB in command line allowing display of plots

To run MATLAB on Linux in the command line I use the following:
matlab -nodisplay
But I guess this does not allow windows of plots to open either, because the following command has no output:
plot(X,Y)
How to allow only graphs and plots to display when running MATLAB from the command line?
Under Linux, to run MATLAB in a terminal window use the -nodesktop option. It causes MATLAB to start without the GUI, with all text input and output to happen through the terminal window. But it does not disable the JVM software altogether and so allows interactive figure windows to be displayed.
The -nojvm option disables the JVM software, disallowing all Java-based components of MATLAB, including figure windows. The -nodisplay option disables al graphical display output, but doesn't disable the JVM.
For more details, see the documentation.

Matlab command window not using same path as full version

I use a DOS batch script to call the matlab Command Window (matlab -nodesktop -nosplash -noFigureWindows -r "myscript"), and the script relies on some functions in different folders, which are in my path.
When I run this, the matlab Command Window which is created cannot find one of these functions, saying 'undefined function or variable'.
This function is definitely in my path in the full Desktop version of matlab, but the path loaded in the Command Window version does not have that folder in it.
Calling which pathdef gives the same file in both versions, and they both have the same contents, but calling p=path; gives different paths, with the Command Window version only having psychtoolbox folders and the '\Documents\MATLAB' folders, not the folder this function is in.
Do you know how to get the Command Window to use the same path as the Desktop Window?

Execution of bash script differs when runned from Matlab and Terminal

I have a bash script and I want to execute it from Matlab 2014b in Ubuntu 14.04. When I launch it from terminal (that I start from os) everything is ok. I try to launch it from Matlab like this
!./script.sh
It executes but cannot open image files that have to be loaded.
More than that if I launch terminal window from Matlab
!./gnome-terminal
and use it to launch the script I got the same 'file not found' problem. Text files are accessed with no problem. Path to the images are global. To load images opencv library is used. My guess is that for some reason opencv works different from Matlab, but I don't know what to do.
I spend a lot of time to figure out the problem, but still cannot resolve it. I will appreciate any advise or help.
LD_LIBRARY_PATH of Matlab shell differs from one of teminal shell. Following command in Matlab:
setenv('LD_LIBRARY_PATH', <content of LD_LIBRARY_PATH from terminal>)
solves the problem.
Content of LD_LIBRARY_PATH from terminal is printed by
echo $LD_LIBRARY_PATH

Stop Eclipse Command Line Pop Ups

I am writing a small FLTK (GUI) program on windows 7 using Eclipse Kepler. My "int main()" function is not even set to receive any command line arguments, yet every time I build the program exe and run it a command line pops up being the GUI interface.
Does anyone know how to suppress this? I do not need a console display for any input or output etc. as this is all controlled via the GUI interface.
Thanks.
It has nothing to see with eclipse. It's a standard behaviour of c++ applications on Windows. Look for console on this page. You will find how to disable it.

Open a GUI directly from desktop (Shortcut) in MATLAB environment

I want open a GUI directly from desktop without opening MATLAB and run it from it. When I right click on the main MATLAB code file and select Run in windows environment, MATLAB starts and after that my GUI automatically runs but I want have this with double clicking on an Icon (shortcut) o desktop. How can I do this? I don't want compile my app.
My GUI contains training neural network so I can't compile it.
What you actually need is a way to run .m files via the command line - an action which isn't specific to GUIs. A command line operation is something you can bind to a shortcut on your desktop or execute using a batch file.
The solution you're looking for is a combination of MATLAB-specific syntax and a straightforward batch file creation procedure:
Open a text editor.
Write this inside:
"C:\<path to your MATLAB folder>\matlab.exe" -nodisplay -nosplash -nodesktop -r "cd('C:\<path to your where the .m file is>\'); run('C:\<path to where the .m file is>\mfile.m');"
Save the file as .bat (in windows) and run.