最接近蟒蛇的
id
format debug
pr
字段是指向数据真实部分的指针,并且
pi
是虚幻的部分(贷记
@rayryeng
this information
)从Matlab R2018a开始
指针不再存在,因为
interleaved complex
储存。
copy-on-write
机制。注意语句
y = x
x
(具有相同的
y
有),但修改
稍后会触发副本(
公共关系
更改)。
>> format debug
>> x = 1:5;
>> y = x;
>> x, y
x =
Structure address = 37751590
m = 1
n = 5
pr = ff4bbe80
pi = 0
1 2 3 4 5
y =
Structure address = 37751590
m = 1
n = 5
pr = ff4bbe80
pi = 0
1 2 3 4 5
>> y(5) = 10;
>> x, y
x =
Structure address = 37751590
m = 1
n = 5
pr = ff4bbe80
pi = 0
1 2 3 4 5
y =
Structure address = 37751de0
m = 1
n = 5
pr = 85c71e0
pi = 0
1 2 3 4 10