0

I am using a combination of matlab codes with some C++ libraries as .mex files. Those .mex files display some progress reports on my command window which I do not want to see them.

Is these any way to cancel those outputs on my command window?

Sam
  • 939
  • 5
  • 14
  • 41
  • This answer applies to any function, including C++ code. http://stackoverflow.com/a/3029883/2732801 – Daniel Mar 18 '15 at 23:16
  • evalc does not for disp in matlab! and it also does not work for the .mex file!! – Sam Mar 18 '15 at 23:52
  • I should put my function in '...' as a string to evalc! – Sam Mar 19 '15 at 00:03
  • It stops the "disp" output, but I still cannot stop the output of .exe files! any solutions? – Sam Mar 19 '15 at 01:47
  • 2
    what about `evalc('!ping 127.0.0.1')` or similar? Currently not using windows so I can't try with exe files. – Daniel Mar 19 '15 at 08:00
  • what is that? do you have a better example/test? – Sam Mar 19 '15 at 08:14
  • That is an example calling the `ping.exe` which some parameters to generate output. What "better" example do you want? – Daniel Mar 19 '15 at 08:28
  • It works for me, windows 7, matlab 2014b. I suppose you need to do the call as `evalc('!ping 127.0.0.1');` to not write out anything. Note the `;`. FYI, the program `ping.exe` performs a so called `Ping test`. This is a standardized test to check the connection to another device in an IP network. The IP 127.0.0.1 refers to local device (your own computer). – patrik Mar 19 '15 at 14:22
  • I tired that and still see some outputs on my command window ! – Sam Mar 19 '15 at 17:52
  • 1
    @patrik: Thx for the correction, forgetting the `;` especially in this case was very stupid. @Sam what OS / Matlab version do you use? With `evalc('!ping 127.0.0.1');` I don't see any output. Did you try it with `ping` or with your application? – Daniel Apr 11 '15 at 19:32
  • I had put ; and it did work and forgot to update it here. – Sam Apr 12 '15 at 03:35

0 Answers0