|
On 12/2/2012 10:27 PM, beginner1.mat@hotmail.com wrote:
> I would like to load several different mat files to make plots. Each
> mat file has the same format of variable names in them, but each mat
> file represents a different trial. Is there any way to add a "PREFIX" or
> "SUFFIX" or "EXTENSION" to all variables after being loaded? For
> example, when I load a mat file I will have 25 variables in my workspace:
...
> Is this possible?
It is, but you don't want to go down that road.
Use a structure name field for the various cases instead. See
<http://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html>
for background and suggestions of how to avoid the difficulties inherent
in making dynamic variable names (and, it's not the making that's the
problem; it's the using afterwards that's the pits).
--
|