time | calls | line |
---|
| | 498 | function [out, match] = find_in_registry(in, key)
|
| | 499 | %FIND_IN_REGISTRY Find a particular format given
|
| | 500 |
|
| 6 | 501 | validateattributes(key,{'char'},{'nonempty','row'},'','KEY');
|
| | 502 |
|
| | 503 |
|
| | 504 | % Look for the input format in the formats registry
|
| 6 | 505 | match = false(1,length(in));
|
| 6 | 506 | for p = 1:length(in)
|
| 114 | 507 | match(p) = any(strcmpi(key, in(p).ext));
|
| 114 | 508 | end
|
| | 509 |
|
| | 510 | % Check whether the format was found
|
| 6 | 511 | switch (sum(match))
|
| 6 | 512 | case 0
|
| | 513 | % Not found.
|
| | 514 | out = struct([]);
|
| 6 | 515 | case 1
|
| | 516 | % One match found.
|
| 6 | 517 | out = in(match);
|
| 6 | 518 | end
|
Other subfunctions in this file are not included in this listing.