From: Walter Roberson on
tinne123 wrote:
> I am missing the option to create a blank
> .mat file through File / New or something like that...

There is no documented Mathworks-provided mechanism to create a blank .mat
file from a menu or the command line: the provided mechanisms require that at
least one variable be saved in the .mat file.

I have not looked at the details of the API (Application Programming
Interface). I believe it is possible to make some C / C++ / Fortran / Visual
Basic calls that create a .mat file and then add variables to it, so possibly
it is possible to create a .mat file and then not actually store anything in
it before closing it.

It is not clear to me what the purpose of a blank .mat file would be?

> I discovered that now Workspace is living it's own life and instead I need
> to look on the file pane that is by default on the left, if I want to
> follow what is happening in .mat files.

Ummm, the Workspace pane is an inspector for your in-memory workspace. A .mat
file is not a Workspace -- a Workspace is closer to "all the state and data
associated with a particular function" (though there is also a "global"
workspace accessed by using the 'global' command, and a "base" workspace which
corresponds closely to the state and data associated with command-line
actions.) .mat files are used to hold disk copies of values for later recall.

As the Workspace pane is just a means for you to examine what is happening in
memory, closing the Workspace pane does not do anything other than close the
viewer. There is no reason for the Workspace pane to ask you to save the
values before closing, as the values continue to exist in memory when you are
not looking at them -- no Schrodinger's Cat paradoxes for workspace variables
;-) The Workspace viewer is more or less a debugging tool.

Please note for future reference that the save() command normally *replaces*
the .mat file you name: if you want to add to an existing .mat file, you would
use save() with the '-append' option.
From: tinne123 on
Thanks for explanation, Walter Roberson, I will try to get used to the nature of .mat files and using the save and related commands.