Clear Filters
Clear Filters

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

4 views (last 30 days)
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.

Answers (1)

Nicole Bonfatti
Nicole Bonfatti on 2 Aug 2023
Edited: Nicole Bonfatti on 2 Aug 2023
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.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!