title: Command line does not wait until the exe execution is finished
body: <p>I converted my matlab program to a standalone exe. When I call the exe from the command line it does not wait till the exe is executed. The program takes about 20-30sec to run. The program basically creates a txt file. How can I make it to wait until the exe is executed. My matlab main function is </p>
  
  <pre><code>function []=features(img_path,category,output_path)
  if (strcmp('shoe',category)== 1)
      if exist(img_path,'file')
       test_shoes(img_path,output_path);            
      else
          disp ('Input image path does not exist');
      end     
  else
      disp('Sorry wrong input for category.Please give shoe/dress/handbag');
  
  end
  return;
  </code></pre>
  
  <p>The problem is shown in the below screenshot:<img src="https://i.stack.imgur.com/pLREK.jpg" alt=""></p>
  
  <p>The "All warnings have the state 'off'." is actually displayed by the exe from MATLAB afer 5 sec but the terminal does not wait until the exe is finished executing i.e "E:\test>" is already shown in the next line immediately after calling the exe.</p>
  
  <p>How can I make the commandline wait until the exe os finished executing so that the new command line does not appear until its finished??</p>