Troubleshooting T-MATS

5 次查看(过去 30 天)
Andrews Kwkaye
Andrews Kwkaye 2023-5-2
回答: Dhruv 2023-5-16
I am trying to run T-MATS (For a JT9D) and I keep getting this error:
Error using JT9D_setup_everything_Dyn (line 89) For S-function 'Compressor_TMATS', the number of defined parameters, 32, does not match the number of parameters on the dialog of 'JT9D_Model_Dyn_withPID/While Iterator Plant/Plant model/Fan/Compressor', 31. These two values must be identical.
I have cross-checked and the parameters are both 31, but I don't know why it keeps throwing this error. Any help?

采纳的回答

Dhruv
Dhruv 2023-5-16
To troubleshoot the issue of mismatch between the number of defined parameters in the S-function 'Compressor_TMATS' and the number of parameters on the dialog of the 'JT9D_Model_Dyn_withPID/ Compressor' block, try the following steps:
  1. Double-check the number of parameters: Verify that the number of parameters defined in the S-function matches the number of parameters in the dialog of the 'Compressor' block. Make sure there is no discrepancy in the count.
  2. Check for parameter inconsistencies: Examine the parameter names and ensure they are consistent. Even a small difference in spelling or capitalization can cause a mismatch.
  3. Review the S-function code: Look at the code of the 'Compressor_TMATS' S-function and check if there are any sections or lines where the number of parameters is explicitly specified or calculated. Make sure these sections are correct and consistent.
  4. Debugging with print statements: Insert print statements or use MATLAB's debug mode to track the values of parameters during the simulation. This can help identify where the discrepancy occurs and provide more insight into the issue.
By following these above steps, you should be able to identify the cause of the parameter mismatch error and resolve the issue.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Prepare Model Inputs and Outputs 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by