Last change
on this file since 679 was
371,
checked in by sommeria, 13 years ago
|
various bug fixes with file indexing. mode displacement from a fixed image introduced.
PIV stereo suppressed (todo: introduce in the GUI series).
find_file_series cleaned, with a change in the function arguments
|
File size:
1.0 KB
|
Rev | Line | |
---|
[8] | 1 | %'num2stra': transform number to the corresponding character string depending on the nomenclature
|
---|
| 2 | %--------------------------------------------
|
---|
| 3 | % function str=num2stra(num,nom_type)
|
---|
| 4 | %
|
---|
| 5 | % OUTPUT:
|
---|
| 6 | % str: character string
|
---|
| 7 | %
|
---|
| 8 | % INPUT:
|
---|
| 9 | % num: input number (file index)
|
---|
| 10 | % nom_type: nomencalture type (see fct name_generator)
|
---|
| 11 | %
|
---|
| 12 | % see also: stra2num, name_generator, name2display
|
---|
| 13 |
|
---|
[122] | 14 | function str=num2stra(num,nom_type,index)
|
---|
[332] | 15 | str='';
|
---|
[8] | 16 | if ~exist('index','var')
|
---|
| 17 | index=2; %index 1 or 2 of the file indices
|
---|
| 18 | end
|
---|
| 19 | switch index
|
---|
| 20 | case 1
|
---|
[332] | 21 | % if length(nom_type)>=4 && isequal(nom_type(1:2),'%0') && isequal(nom_type(4),'d')
|
---|
| 22 | % str=num2str(num,nom_type(1:4));
|
---|
| 23 | % else
|
---|
[8] | 24 | str=num2str(num);
|
---|
[332] | 25 | % end
|
---|
[8] | 26 | case 2
|
---|
[371] | 27 | if ~isempty(nom_type) && (isequal(nom_type(end),'a')||isequal(nom_type(end),'b'))
|
---|
[8] | 28 | str=char(96+num);
|
---|
[371] | 29 | elseif ~isempty(nom_type) && (isequal(nom_type(end),'A')||isequal(nom_type(end),'B'))
|
---|
[8] | 30 | str=char(64+num);
|
---|
| 31 | else
|
---|
| 32 | str=num2str(num);
|
---|
| 33 | end
|
---|
| 34 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.