https://au.mathworks.com/help/rtw/ref/rtwrebuild.html
rtwrebuild - Rebuild generated code from model - MATLAB
This MATLAB function assumes that the current working folder is the build folder of the model (not the model location) and calls codebuild.
generated coderebuildmodelmatlab