I've a model in flux 2022.3 that I'm trying to drive from matlab.
So far I can open then model and do a computation and all works fine. The problem is when I try and export the value to matlab i just get a java error from matlab. The code I've used is shown below. I did try to do this without saving the value, but that didn't seem to work.
FMP_executeJythonCommand(serverUid,"startMacroTransaction()")
FMP_executeJythonCommand(serverUid,"ComputePhysicTransient['ComputePhysic'].storageName='ComputePhysic_6'")
FMP_executeJythonCommand(serverUid,"ComputePhysicTransient['ComputePhysic'].formula=['FluxMag(S_PHB1P1)-FluxMag(S_PHB1M1)']")
FMP_executeJythonCommand(serverUid,"endMacroTransaction()")
FMP_executeJythonCommand(serverUid,"b = ComputePhysic(name='ComputePhysic_6', formula=['FluxMag(S_PHB1P1)-FluxMag(S_PHB1M1)'])")
b=FMP_getJythonDoubleArrayValue(serverUid,'b')
The logs from flux indicate that it's all gone ok I think up until the getJythonDoubleArray line.
The logs from matlab appear to indicate a class cast error somewhere