source: distools/ispsem.m @ 41

Last change on this file since 41 was 10, checked in by bduin, 14 years ago
File size: 628 bytes
Line 
1%ISPSEM Test on pseudo-Euclidean mapping
2%
3%  N = ISPSEM(W)
4%      ISPSEM(W)
5%
6% INPUT
7%  W    input mapping
8%
9% OUTPUT
10%  N    logical value
11%
12% DESCRIPTION
13% Returns true for psem mappings. If no output is required,
14% false outputs are turned into errors. This may be used for
15% assertion.
16%
17% SEE ALSO
18% PSEM
19
20function n = ispsem(w)
21
22        prtrace(mfilename);
23       
24        if isa(w,'mapping') & strcmp(w.mapping_file,'psem')
25                n = 1;
26        else
27                n = 0;
28        end
29
30        % generate error if input is not a psem mapping
31        % AND no output is requested (assertion)
32
33        if nargout == 0 & n == 0
34                error([newline '---- psem mapping expected -----'])
35        end
36
37return
Note: See TracBrowser for help on using the repository browser.