Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a817a166ed5d81f278c2000561295855634c68211a665ce838d74a6af997aff4
User & Date: gawthrop@users.sourceforge.net on 1996-08-30 09:54:44
Other Links: branch diff | manifest | tags
Context
1996-08-30
09:58:55
Uses str2ch to exteact a char from a string. check-in: 84fc025a5b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:54:44
Initial revision check-in: a817a166ed user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:35:10
Fixed problem with global variable in function. check-in: c6de5a3480 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/m/str2ch.m version [1c93c5cd01].





















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function ch = str2ch(str,n)
% str2ch - pulls the nth char from a string
% 
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%     %%%%% Model Transformation Tools %%%%%
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% Matlab function  str2ch.m
% ch = str2ch(str,n)
% Copyright (c) P.J. Gawthrop, 1996.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

implicit_str_to_num_ok = "true";
str = abs(str);

if (n>0) &  (n<=length(str))
  ch = setstr(str(n));
else
  ch = '';
end;
















MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]