Why the response of Microservice difference the result of MATLAB directly?

4 次查看(过去 30 天)
In my project, I need to write a FastAPI to call a function in Matlab. Initially, I used matlabengine, but it was too slow. That's why I chose to create a microservice with a Docker image. However, both methods are returning false results.
Additionally, when I attempt to call another function within the .m file through the microservice, I encounter an error. However, the same function works without any issues when executed directly in MATLAB.

回答(1 个)

Nicole Bonfatti
Nicole Bonfatti 2023-8-2
编辑:Nicole Bonfatti 2023-8-2
Hard to tell exactly with the info given, but my suggestion would be to use the testing functionality in the Production Server Compiler app to understand what's happening differently from your REST call versus your MATLAB function call. You can use the MATLAB Production Server test functionality to have your MATLAB instance work like the microservice and debug the REST call by setting breakpoints and stepping through it.

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by