(On my machine, model.save() writes to \mli\startup for some reason.) I prefer to use mphsave() anyway, as the current Matlab working directory is usually the path I want to write to. So I guess in your case, you don't have write access to whatever the "local COMSOL server path" is.
Matlab save how to#
This section explains how to send data from a Simulink ® model to the MATLAB ® workspace so you can analyze the results of simulations in greater detail. If 'filename' does not provide a path the file is saved relatively to the local COMSOL server path. Export Data to MATLAB Use a To Workspace Block. The file extension determines which format to use (*.mph, *.m or *.java).Īlternatively you can use the save method: If the filename specified 'filename' does not provide a path the file is saved relatively to the local MATLAB path.
Use the function mphsave to save the model object linked to the MATLAB object model: Note that any data associated with the image acquisition object is not stored in the MAT-file. If no objects are specified, then all variables existing in the MATLAB workspace are saved. However, the documentation does have this to say: save (filename,obj1,obj2.) is the functional form of the command, where the file name and image acquisition objects must be specified as character vectors. Changing '-r1500' does not alter the resolution. saveas (figure (1), 'test.tif') save image as a. But as far as I can tell, it has no purpose. I create a figure with specific major and minor grid lines and a 3D image and want to save it at a high resolution for publication.
I don't know what the purpose of the modelPath property is, the documentation is mum on this. Variables that cannot be saved to a script are saved to a MAT-file with the same name as that of the script.
Model.modelPath('N:\Projects\MicFEAModelingPrograms\COMSOL42\BumpedBP\Matlab\') To save variables to a MATLAB script, click the Save Workspace button or select the Save As option, and in the Save As window, set the Save as type option to MATLAB Script.