Rev | Line | |
---|
[10] | 1 | %ISPE_EM Test on pseudo-Euclidean mapping |
---|
| 2 | % |
---|
| 3 | % N = ISPE_EM(W) |
---|
| 4 | % ISPE_EM(W) |
---|
| 5 | % |
---|
| 6 | % INPUT |
---|
| 7 | % W input mapping |
---|
| 8 | % |
---|
| 9 | % OUTPUT |
---|
| 10 | % N logical value |
---|
| 11 | % |
---|
| 12 | % DESCRIPTION |
---|
| 13 | % Returns true for pe_em 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 | % ISPE_EM |
---|
| 19 | |
---|
| 20 | function n = ispe_em(w) |
---|
| 21 | |
---|
| 22 | prtrace(mfilename); |
---|
| 23 | |
---|
| 24 | if isa(w,'mapping') & strcmp(w.mapping_file,'pe_em') |
---|
| 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 '---- pe_em mapping expected -----']) |
---|
| 35 | end |
---|
| 36 | |
---|
| 37 | return |
---|
Note: See
TracBrowser
for help on using the repository browser.