Troubleshooting T-MATS

조회 수: 8 (최근 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