From: Thomas on

> There must be a method to make a copy of the Map (right?); the documentation isn't very helpful in this regard, as copying by value is a pretty standard operation.

I just figured out how to do this and thought I'd share:

>> x = containers.Map();
>> x('hi') = 1234;
>> y = [ x; containers.Map() ];
>> y('hi') = 4321;
>> x('hi')

ans =

1234

So, when you concatenate Map containers, you get a new one that's the union of the two. If you concatenate one with an empty one, you get a copy by value of the first one.

-Thomas
From: Joao Henriques on
"Thomas " <no.tgs.spam(a)resc.net> wrote in message <i17cr4$b0v$1(a)fred.mathworks.com>...
> So, when you concatenate Map containers, you get a new one that's the union of the two. If you concatenate one with an empty one, you get a copy by value of the first one.

Thanks, that is helpful!

João Henriques