Overview
| Comment: | split is obsolete in Octave, replaced with strsplit |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
4f50adcd1b220afe20abed0b576878cc |
| User & Date: | geraint@users.sourceforge.net on 2012-10-15 19:18:03.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
2012-10-15
| ||
| 19:22:44 | mtt_isunique replaces unique which masks a built-in function. check-in: 976af0e62f user: geraint@users.sourceforge.net tags: origin/master, trunk | |
| 19:18:03 | split is obsolete in Octave, replaced with strsplit check-in: 4f50adcd1b user: geraint@users.sourceforge.net tags: origin/master, trunk | |
| 19:17:19 | split is obsolete in Octave, replaced with strsplit and strtok. Semi-colons removed during debugging for more verbose log file. check-in: 078d645a0b user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/m/alias_args.m
from [c2ced77624]
to [e741159462].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function args = alias_args(args,alias,delim,message,FileID,sys_name) ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.8 2001/06/13 16:07:15 gawthrop ## Fixed bug with three separators in a row eg )/( ## ## Revision 1.7 2001/06/13 14:50:15 gawthrop ## Operator ^ now ok in args in abg and/or lbl ## ## Revision 1.6 2001/04/23 16:23:30 gawthrop | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function args = alias_args(args,alias,delim,message,FileID,sys_name) ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.9 2009/11/02 16:54:03 geraint ## Replaced deprecated functions from Octave 2.1 for Octave 3.0: is_struct -> isstruct, struct_contains -> isfield, struct_elements -> fieldnames, is_complex -> iscomplex, setstr -> char ## ## Revision 1.8 2001/06/13 16:07:15 gawthrop ## Fixed bug with three separators in a row eg )/( ## ## Revision 1.7 2001/06/13 14:50:15 gawthrop ## Operator ^ now ok in args in abg and/or lbl ## ## Revision 1.6 2001/04/23 16:23:30 gawthrop |
| ︙ | ︙ | |||
33 34 35 36 37 38 39 |
## Revision 1.1 1998/07/03 18:29:40 peterg
## Initial revision
##
###############################################################
if isstruct(alias)
if !isempty(args)
| | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
## Revision 1.1 1998/07/03 18:29:40 peterg
## Initial revision
##
###############################################################
if isstruct(alias)
if !isempty(args)
Args = char(strsplit(args,delim)); args="";
[N,M]= size(Args);
for i=1:N
arg = deblank(Args(i,:));
arg_ = strrep(arg,",","__");
if isfield(alias,arg_)
eval(["new_arg = alias.", arg_,";"]);
mtt_info(["Replacing ", arg, "\t by ",\
|
| ︙ | ︙ |
Modified mttroot/mtt/bin/trans/m/mtt_name2names.m
from [38b510c144]
to [e20ba547b3].
1 2 3 4 5 6 7 8 9 | function names = mtt_name2names (name) ## usage: names = mtt_name2names (name) ## ## Converts standard mtt name to an array of subsystem names ## Copyright (C) 2003 by Peter J. Gawthrop delim ="__"; # MTT delimiter | | | 1 2 3 4 5 6 7 8 9 10 11 12 | function names = mtt_name2names (name) ## usage: names = mtt_name2names (name) ## ## Converts standard mtt name to an array of subsystem names ## Copyright (C) 2003 by Peter J. Gawthrop delim ="__"; # MTT delimiter names = char(strsplit(name,delim)); endfunction |
Modified mttroot/mtt/bin/trans/m/mtt_resolve_cr.m
from [d1ee14d3a3]
to [bb4d4bdb2d].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | function eqn = mtt_resolve_cr (eqn) ## usage: eqn = mtt_resolve_cr (eqn) ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.1 2003/03/24 10:19:42 gawthrop ## Documentation added ## ############################################################### ## Temporary version to resolve lin only! ## How many equations here? N = length(findstr(eqn,"=")); | > > > | | | 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 |
function eqn = mtt_resolve_cr (eqn)
## usage: eqn = mtt_resolve_cr (eqn)
######################################
##### Model Transformation Tools #####
######################################
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2 2003/03/24 12:20:28 gawthrop
## *** empty log message ***
##
## Revision 1.1 2003/03/24 10:19:42 gawthrop
## Documentation added
##
###############################################################
## Temporary version to resolve lin only!
## How many equations here?
N = length(findstr(eqn,"="));
EQNS = char(strsplit(eqn,";"));
eqn = "";
for i = 1:N
## Split equation
EQN = char(strsplit(EQNS(i,:),":="));
LHS = deblank(EQN(1,:));
RHS = deblank(EQN(2,:));
if index(RHS,"lin(")>0 # lin cr is here
RHS = sprintf("%s;", RHS); # Put back ;
|
| ︙ | ︙ |