MATLAB API of SOFA in WINDOWS 10 #299
Replies: 1 comment 1 reply
-
Hi @ozilxu As far as I know there is no API for SOFA in Matlab but there is multiple solution to have sofa interacting with Matlab. The first solution consists in requesting matlab to launch "runSofa" in a separated process using the dedicated matlab API for lauching external application. This is the solution that you pointed in your link. There is no reason why it wouldn't work on every OS (Linux, MacOS or Windows). With this solution the challenging part is exchange data between Sofa and Matlab, in that case, it is possible to save sofa data's in files and load them in matlab. A second solution would be use the python interpreter in Matlab: https://fr.mathworks.com/help/matlab/matlab_external/install-supported-python-implementation.html import Sofa
import Sofa.Core
import SofaRuntime And use the complete SofaPython3 API to build scenes (), execute them (including doing simulation steps and accessing any sofa data as numpy structure which I think will be convertible with the Matlab python API), The is the solution I would recommend to experiment first, and would appreciate a feedback if it work or not. |
Beta Was this translation helpful? Give feedback.
-
Hello, guys. May I ask if there is any API that allows SOFA and MATLAB communication? I have searched a link related to this but it is only suitable for Ubuntu system not windows:https://www.sofa-framework.org/community/forum/topic/launching-sofa-from-matlab-script/. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions