Changes to a MATLAB (.m) File Are not Reflected In the VI Which Calls the .m File

Updated Nov 2, 2023

Reported In

Software

  • LabVIEW 2021
  • MATLAB

Issue Details

We are using Call Matlab function of LabVIEW.  After editing .m file in Matlab, LabVIEW doesn't recognize the change.

 

Solution

This is LabVIEW 2021 Known Issue.
There are two workarounds for this problem:
 

Workaround 1:
Restart LabVIEW and MATLAB
 

Workaround 2:

  • Create an additional function in additional file ClearAll.m:

function ClearAll()

clear functions

end

  • Run ClearAll.m file (callMATLAB function) after LabVIEW function 'OpenMATLAB Session'.