vytvoreni zakladnich funkci plistxyz() a coordxyz()
[plist.git] / plistxyz.m
blob44e68d3df18fdafee6351c07ab0dfbfb349b0b76
1 function plist = plistxyz(id, x, y, z)
2 %% create point list
4 if nargin ~= 4
5         usage('plistxyz(id, x, y, z)')
6 end
8 if ~isplist_id(id)
9         warning('plistxyz: wrong type of parameter id')
10         plist = nan;
11         return
12 end
14 [tst, x, y, z] = common_size(x, y, z);
15 if tst
16         warning('plistxyz: wrong sizes of x, y, z')
17         plist = nan;
18         return
19 end
21 id = plistid2cell(id);
23 if numel(x) ~= numel(id)
24         warning('plistxyz: the size of id do not equal to size of x, y and z')
25         plist = nan;
26         return
27 end
29 plist.id = id;
30 plist.coordxyz = cat(2,x(:),y(:),z(:));
32 if ~isplist_unique(plist)
33         warning('plistxyz: ids are not unique')
34 end