Troubleshooting T-MATS

8 views (last 30 days)
Andrews Kwkaye
Andrews Kwkaye on 2 May 2023
Answered: Dhruv on 16 May 2023
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?

Accepted Answer

Dhruv
Dhruv on 16 May 2023
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.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!