If matching multiple fields of various sizes, the sizes can mesh in such a way that the result could be valid. This behavior is inconsistent depending on the orientation of the mismatch.
>> S = struct(A=1, B=2, C=3, D=[4 5 6]);
>> mpath.get(S, ["/A", "/B", "/C"; "/D", missing, missing])
Error using cat
Dimensions of arrays being concatenated are not consistent.
Error in mpath.external.catcell (line 87)
Rnew{index} = cat(d, R{ind{:}});
^^^^^^^^^^^^^^^^^
Error in mpath.Pointer/get (line 148)
result = mpath.external.catcell(result,'all');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mpath.get (line 66)
result = mp.get(data, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^
>> S = struct(A=1, B=2, C=3, D=[4;5;6]);
>> mpath.get(S, ["/A", missing; "/B", missing; "/C", "/D"])
ans =
1 4
2 5
3 6
Expected behavior is to get an error in both cases from incompatible sizes.
This is an upstream bug with catcell (no repository currently).
If matching multiple fields of various sizes, the sizes can mesh in such a way that the result could be valid. This behavior is inconsistent depending on the orientation of the mismatch.
```matlab
>> S = struct(A=1, B=2, C=3, D=[4 5 6]);
>> mpath.get(S, ["/A", "/B", "/C"; "/D", missing, missing])
Error using cat
Dimensions of arrays being concatenated are not consistent.
Error in mpath.external.catcell (line 87)
Rnew{index} = cat(d, R{ind{:}});
^^^^^^^^^^^^^^^^^
Error in mpath.Pointer/get (line 148)
result = mpath.external.catcell(result,'all');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mpath.get (line 66)
result = mp.get(data, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^
```
```matlab
>> S = struct(A=1, B=2, C=3, D=[4;5;6]);
>> mpath.get(S, ["/A", missing; "/B", missing; "/C", "/D"])
ans =
1 4
2 5
3 6
```
Expected behavior is to get an error in both cases from incompatible sizes.
This is an upstream bug with `catcell` (no repository currently).