Can I save the "simout" while running "parsim" after each worker completes its simulation?
    6 ビュー (過去 30 日間)
  
       古いコメントを表示
    
    MathWorks Support Team
    
 2019 年 6 月 18 日
  
    
    
    
    
    コメント済み: Walter Roberson
      
      
 2024 年 8 月 22 日
            Can I save the variables to a MAT file while running "parsim" after each worker completes its simulation?
採用された回答
  MathWorks Support Team
    
 2024 年 7 月 30 日
        
      編集済み: MathWorks Support Team
    
 2024 年 8 月 21 日
  
      Yes, it is possible by enabling the "LoggingToFile" and "LoggingFileName" options using the "setModelParameter" parameter.
simin = setModelParameter(simin,'LoggingToFile', 'on', 'LoggingFileName', 'out.mat')
For more information, refer to the following documentation pages:
Please note that the "SimulationInput" objects and "SimulationOutput" objects can also be saved separately to a MAT file and loaded into the workspace later. You can then use:
openSimulationManager(in, out) 
to open the Simulation Manager GUI. For more information, refer to:
1 件のコメント
  Walter Roberson
      
      
 2024 年 8 月 22 日
				@Trent Gatz commented:
The provided answer is incorrect. In the first  line of provided code,  the parameter 'LoggingToFile' must be set to 'on'. This parameter is  case sensitive. Using 'On', as shown, does not work. A similar issue is  documented in this question:  https://www.mathworks.com/matlabcentral/answers/2011292-saving-signals-for-each-case-of-parsim-simulation 
[Note: Mathworks appears to have corrected the line today.]
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Run Multiple Simulations についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

