MATLAB API engine for python shows less data

3 次查看(过去 30 天)
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

回答(1 个)

Infinite_king
Infinite_king 2024-1-11
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.

类别

Help CenterFile Exchange 中查找有关 Call MATLAB from Python 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by