MATLAB API engine for python shows less data

3 vues (au cours des 30 derniers jours)
ashraful alam
ashraful alam le 25 Avr 2022
Whenever, I run the code on MATLAB it get 32700+ values but If I run the same functions and parameters in the MATLAB API engine for python. I get very negligible amount of values like 32, 78, etc...
Please help

Réponses (1)

Infinite_king
Infinite_king le 11 Jan 2024
Hi ashraful alam,
The possible reason for this discrepancy is differences in data or input parameters between running the MATLAB code directly and using the MATLAB API engine for Python.
The solution is:
  • Carefully compare and ensure that the input data and parameters provided to the MATLAB functions are consistent in both scenarios.
  • Examine the MATLAB environment initialization, including any necessary settings or environment variables, to guarantee uniformity.
  • Use debugging tools in MATLAB to analyse intermediate steps and identify where the discrepancy arises.
  • Check the MATLAB version to ensure compatibility between the two scenarios.
  • Examine any error messages or warnings generated during code execution.
  • Ensure that dependencies and files are accessible.
  • Implement additional logging or diagnostic statements in the MATLAB code to capture intermediate results and aid in pinpointing the issue.
  • Reinstall the MATLAB engine and checkout this troubleshooting steps, https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html#mw_4b80d62e-4375-4310-b350-d3f4c509c83e
Hope this is helpful.

Catégories

En savoir plus sur Call MATLAB from Python dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by