#! /bin/sh # # To apply this patch, cd to the top level Octave source directory and # run this file through /bin/sh. It will first remove any files that # have been deleted from the source distribution since the last # release and then update the sources with patch(1). # # Diffs for updating *.ps, *.dvi, *.info*, and *.html files are not # included because they can be recreated from the Texinfo files using # TeX, makeinfo, or texi2html. # # Diffs for updating parse.cc and y.tab.h are not included because # they can be recreated from the file parse.y using bison. # # Diffs for updating lex.cc are not included because it can be # recreated from lex.l using flex. # # John W. Eaton # jwe@bevo.che.wisc.edu # University of Wisconsin-Madison # Department of Chemical Engineering if test -f src/octave.cc ; then true else echo '***********************************************************' 1>&2 echo 'You must run this script in the top-level octave directory!' 1>&2 echo '***********************************************************' 1>&2 exit 1 fi ### ### Special commands should go here. ### echo 'patching existing files' patch -p1 << \PATCH_EOF diff -cNr octave-2.9.16/ChangeLog octave-2.9.17/ChangeLog *** octave-2.9.16/ChangeLog Wed Oct 31 16:35:10 2007 --- octave-2.9.17/ChangeLog Sat Nov 10 00:17:27 2007 *************** *** 1,3 **** --- 1,16 ---- + 2007-11-10 John W. Eaton + + * configure.in: Delete AC_SUBST_FILE(f77_rules_frag). + + 2007-11-07 John W. Eaton + + * configure.in: Also check for pcre/pcre.h. + + 2007-11-01 John W. Eaton + + * configure.in: Delete BLAS library calling convention + compatibility check. + 2007-10-31 John W. Eaton * README.binary-dist: Delete. diff -cNr octave-2.9.16/INSTALL.OCTAVE octave-2.9.17/INSTALL.OCTAVE *** octave-2.9.16/INSTALL.OCTAVE Wed Oct 31 18:10:58 2007 --- octave-2.9.17/INSTALL.OCTAVE Sat Nov 10 00:59:49 2007 *************** *** 4,9 **** --- 4,13 ---- under the terms of the GNU General Public License as published by the Free Software Foundation. + *Note:* This file is automatically generated from + `doc/interpreter/install.txi' in the Octave sources, so to make changes + to this documenation file, change that source file. + 1 Installing Octave ******************* *************** *** 370,373 **** --- 374,388 ---- possible to modify Octave's configuration script to automatically determine the proper thing to do. + * If Octave is unable to find a header file because it is installed + in a location that is not normally searched by the compiler, you + can add the directory to the include search path by specifying + (for example) `CPPFLAGS=-I/some/nonstandard/directory' as an + argument to `configure'. Other variables that can be specified + this way are `CFLAGS', `CXXFLAGS', `FFLAGS', and `LDFLAGS'. + Passing them as options to the configure script also records them + in the `config.status' file. By default, `CPPFLAGS' and `LDFLAGS' + are empty, `CFLAGS' and `CXXFLAGS' are set to `"-g -O"' and + `FFLAGS' is set to `"-O"'. + diff -cNr octave-2.9.16/config.h.in octave-2.9.17/config.h.in *** octave-2.9.16/config.h.in Wed Oct 31 17:30:48 2007 --- octave-2.9.17/config.h.in Sat Nov 10 00:20:50 2007 *************** *** 433,438 **** --- 433,444 ---- /* Define if PCRE is available. */ #undef HAVE_PCRE + /* Define to 1 if you have the header file. */ + #undef HAVE_PCRE_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_PCRE_PCRE_H + /* Define to 1 if you have the `pipe' function. */ #undef HAVE_PIPE diff -cNr octave-2.9.16/configure octave-2.9.17/configure *** octave-2.9.16/configure Wed Oct 31 17:30:44 2007 --- octave-2.9.17/configure Sat Nov 10 00:20:46 2007 *************** *** 814,821 **** subdirs LIBOBJS LTLIBOBJS' ! ac_subst_files='f77_rules_frag ! bsd_gcc_kluge_targets_frag' ac_precious_vars='build_alias host_alias target_alias --- 814,820 ---- subdirs LIBOBJS LTLIBOBJS' ! ac_subst_files='bsd_gcc_kluge_targets_frag' ac_precious_vars='build_alias host_alias target_alias *************** *** 8488,8505 **** ### Check for pcre/regex library. WITH_PCRE_CONFIG=no ! if test "${ac_cv_header_pcre_h+set}" = set; then ! { echo "$as_me:$LINENO: checking for pcre.h" >&5 ! echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6; } ! if test "${ac_cv_header_pcre_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ! { echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 ! echo "${ECHO_T}$ac_cv_header_pcre_h" >&6; } else # Is the header compilable? ! { echo "$as_me:$LINENO: checking pcre.h usability" >&5 ! echo $ECHO_N "checking pcre.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF --- 8487,8510 ---- ### Check for pcre/regex library. WITH_PCRE_CONFIG=no ! ! ! for ac_header in pcre/pcre.h pcre.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ! { echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ! if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ! ac_res=`eval echo '${'$as_ac_Header'}'` ! { echo "$as_me:$LINENO: result: $ac_res" >&5 ! echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? ! { echo "$as_me:$LINENO: checking $ac_header usability" >&5 ! echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF *************** *** 8507,8513 **** cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default ! #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" --- 8512,8518 ---- cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default ! #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" *************** *** 8539,8553 **** echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? ! { echo "$as_me:$LINENO: checking pcre.h presence" >&5 ! echo $ECHO_N "checking pcre.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in --- 8544,8558 ---- echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? ! { echo "$as_me:$LINENO: checking $ac_header presence" >&5 ! echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *************** *** 8580,8624 **** # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) ! { echo "$as_me:$LINENO: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the compiler's result" >&5 ! echo "$as_me: WARNING: pcre.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) ! { echo "$as_me:$LINENO: WARNING: pcre.h: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: pcre.h: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: pcre.h: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: pcre.h: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: pcre.h: see the Autoconf documentation" >&5 ! echo "$as_me: WARNING: pcre.h: see the Autoconf documentation" >&2;} ! { echo "$as_me:$LINENO: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&5 ! echo "$as_me: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&2;} ! { echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: pcre.h: proceeding with the preprocessor's result" >&2;} ! { echo "$as_me:$LINENO: WARNING: pcre.h: in the future, the compiler will take precedence" >&5 ! echo "$as_me: WARNING: pcre.h: in the future, the compiler will take precedence" >&2;} ;; esac ! { echo "$as_me:$LINENO: checking for pcre.h" >&5 ! echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6; } ! if test "${ac_cv_header_pcre_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_cv_header_pcre_h=$ac_header_preproc fi ! { echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 ! echo "${ECHO_T}$ac_cv_header_pcre_h" >&6; } fi ! if test $ac_cv_header_pcre_h = yes; then ! WITH_PCRE=yes else WITH_PCRE=no fi if test $WITH_PCRE = no ; then # Extract the first word of "pcre-config", so it can be a program name with args. --- 8585,8634 ---- # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 ! echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 ! echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 ! echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac ! { echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ! if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! eval "$as_ac_Header=\$ac_header_preproc" fi ! ac_res=`eval echo '${'$as_ac_Header'}'` ! { echo "$as_me:$LINENO: result: $ac_res" >&5 ! echo "${ECHO_T}$ac_res" >&6; } fi ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ! _ACEOF ! WITH_PCRE=yes else WITH_PCRE=no fi + done if test $WITH_PCRE = no ; then # Extract the first word of "pcre-config", so it can be a program name with args. *************** *** 12220,12226 **** - ac_safe=`echo "-ffloat-store" | sed 'y%./+-:=%__p___%'` { echo "$as_me:$LINENO: checking whether ${F77-g77} accepts -ffloat-store" >&5 echo $ECHO_N "checking whether ${F77-g77} accepts -ffloat-store... $ECHO_C" >&6; } --- 12230,12235 ---- *************** *** 14092,14155 **** - - { echo "$as_me:$LINENO: checking BLAS library calling convention compatibility" >&5 - echo $ECHO_N "checking BLAS library calling convention compatibility... $ECHO_C" >&6; } - cat << EOF > conftest.f - program foo - double complex zdotu, zx(10), zy(10), retval - integer n, incx, incy - n = 10 - incx = 1 - incy = 1 - do 10 i = 1, n - zx(i) = dcmplx (i, 0) - zy(i) = dcmplx (0, i) - 10 continue - retval = zdotu (n, zx, incx, zy, incy) - if (retval .eq. dcmplx (0, 385)) then - print *, 'succeeded' - else - print *, 'failed' - print *, retval - endif - end - EOF - XLIBS="$LIBS" - LIBS="$BLAS_LIBS $FLIBS $LIBS" - ac_ext=f - ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' - ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - (eval "$ac_compile"; eval "$ac_link") 2>&5 - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - LIBS="$XLIBS" - case "`./conftest$ac_exeext`" in - *succeeded*) - { echo "$as_me:$LINENO: result: yes" >&5 - echo "${ECHO_T}yes" >&6; } - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: WARNING: Your BLAS library was apparently compiled with a Fortran" >&5 - echo "$as_me: WARNING: Your BLAS library was apparently compiled with a Fortran" >&2;} - { echo "$as_me:$LINENO: WARNING: compiler that uses a different calling convention from" >&5 - echo "$as_me: WARNING: compiler that uses a different calling convention from" >&2;} - { echo "$as_me:$LINENO: WARNING: the one used by the selected compiler, $F77." >&5 - echo "$as_me: WARNING: the one used by the selected compiler, $F77." >&2;} - { { echo "$as_me:$LINENO: error: You must correct this problem before building Octave." >&5 - echo "$as_me: error: You must correct this problem before building Octave." >&2;} - { (exit 1); exit 1; }; } - ;; - esac - # Check for AMD library AMD_LIBS= --- 14101,14106 ---- *************** *** 29038,29046 **** XTRA_CFLAGS!$XTRA_CFLAGS$ac_delim XTRA_CXXFLAGS!$XTRA_CXXFLAGS$ac_delim LD_STATIC_FLAG!$LD_STATIC_FLAG$ac_delim _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 --- 28989,29000 ---- XTRA_CFLAGS!$XTRA_CFLAGS$ac_delim XTRA_CXXFLAGS!$XTRA_CXXFLAGS$ac_delim LD_STATIC_FLAG!$LD_STATIC_FLAG$ac_delim + BUILD_CC!$BUILD_CC$ac_delim + BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim + BUILD_CXX!$BUILD_CXX$ac_delim _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 *************** *** 29060,29069 **** cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b - /^[ ]*@f77_rules_frag@[ ]*$/{ - r $f77_rules_frag - d - } /^[ ]*@bsd_gcc_kluge_targets_frag@[ ]*$/{ r $bsd_gcc_kluge_targets_frag d --- 29014,29019 ---- *************** *** 29087,29095 **** ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF - BUILD_CC!$BUILD_CC$ac_delim - BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim - BUILD_CXX!$BUILD_CXX$ac_delim BUILD_CXXFLAGS!$BUILD_CXXFLAGS$ac_delim BUILD_LDFLAGS!$BUILD_LDFLAGS$ac_delim BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim --- 29037,29042 ---- *************** *** 29184,29189 **** --- 29131,29139 ---- INSTALL_DATA!$INSTALL_DATA$ac_delim DESKTOP_FILE_INSTALL!$DESKTOP_FILE_INSTALL$ac_delim GNUPLOT_BINARY!$GNUPLOT_BINARY$ac_delim + DEFAULT_PAGER!$DEFAULT_PAGER$ac_delim + GPERF!$GPERF$ac_delim + GHOSTSCRIPT!$GHOSTSCRIPT$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then *************** *** 29225,29233 **** ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF - DEFAULT_PAGER!$DEFAULT_PAGER$ac_delim - GPERF!$GPERF$ac_delim - GHOSTSCRIPT!$GHOSTSCRIPT$ac_delim MAKEINFO!$MAKEINFO$ac_delim TEXI2DVI!$TEXI2DVI$ac_delim TEXI2PDF!$TEXI2PDF$ac_delim --- 29175,29180 ---- *************** *** 29239,29245 **** LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 --- 29186,29192 ---- LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff -cNr octave-2.9.16/configure.in octave-2.9.17/configure.in *** octave-2.9.16/configure.in Wed Oct 31 17:26:39 2007 --- octave-2.9.17/configure.in Sat Nov 10 00:17:27 2007 *************** *** 425,431 **** ### Check for pcre/regex library. AC_SUBST(REGEX_LIBS) WITH_PCRE_CONFIG=no ! AC_CHECK_HEADER(pcre.h, WITH_PCRE=yes, WITH_PCRE=no) if test $WITH_PCRE = no ; then AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) if test $WITH_PCRE_CONFIG = yes ; then --- 425,431 ---- ### Check for pcre/regex library. AC_SUBST(REGEX_LIBS) WITH_PCRE_CONFIG=no ! AC_CHECK_HEADERS([pcre/pcre.h pcre.h], WITH_PCRE=yes, WITH_PCRE=no) if test $WITH_PCRE = no ; then AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) if test $WITH_PCRE_CONFIG = yes ; then *************** *** 713,719 **** FC=$F77 AC_SUBST(FC) - AC_SUBST_FILE(f77_rules_frag) OCTAVE_F77_FLAG(-ffloat-store, [ AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store]) --- 713,718 ---- *************** *** 731,779 **** AC_SUBST(BLAS_DIR) AC_SUBST(LAPACK_DIR) - dnl I see no clean way to do the following check with autoconf macros, - dnl hence the big mess. - - AC_MSG_CHECKING([BLAS library calling convention compatibility]) - cat << EOF > conftest.f - program foo - double complex zdotu, zx(10), zy(10), retval - integer n, incx, incy - n = 10 - incx = 1 - incy = 1 - do 10 i = 1, n - zx(i) = dcmplx (i, 0) - zy(i) = dcmplx (0, i) - 10 continue - retval = zdotu (n, zx, incx, zy, incy) - if (retval .eq. dcmplx (0, 385)) then - print *, 'succeeded' - else - print *, 'failed' - print *, retval - endif - end - EOF - XLIBS="$LIBS" - LIBS="$BLAS_LIBS $FLIBS $LIBS" - AC_LANG_PUSH(Fortran 77) - (eval "$ac_compile"; eval "$ac_link") 2>&AS_MESSAGE_LOG_FD - AC_LANG_POP(Fortran 77) - LIBS="$XLIBS" - case "`./conftest$ac_exeext`" in - *succeeded*) - AC_MSG_RESULT(yes) - ;; - *) - AC_MSG_RESULT(no) - AC_MSG_WARN([Your BLAS library was apparently compiled with a Fortran]) - AC_MSG_WARN([compiler that uses a different calling convention from]) - AC_MSG_WARN([the one used by the selected compiler, $F77.]) - AC_MSG_ERROR([You must correct this problem before building Octave.]) - ;; - esac - # Check for AMD library AMD_LIBS= AC_SUBST(AMD_LIBS) --- 730,735 ---- diff -cNr octave-2.9.16/doc/ChangeLog octave-2.9.17/doc/ChangeLog *** octave-2.9.16/doc/ChangeLog Tue Oct 30 21:08:14 2007 --- octave-2.9.17/doc/ChangeLog Fri Nov 9 13:15:39 2007 *************** *** 1,3 **** --- 1,11 ---- + 2007-11-09 David Bateman + + * interpreter/plot.txi: Document the new hidden and area functions. + + 2007-11-07 David Bateman + + * interpreter/plot.txi: Document new functions. + 2007-10-30 David Bateman * interpreter/dynamic.txi, interpreter/install.txi, diff -cNr octave-2.9.16/doc/conf.texi octave-2.9.17/doc/conf.texi *** octave-2.9.16/doc/conf.texi Wed Oct 31 18:08:45 2007 --- octave-2.9.17/doc/conf.texi Fri Nov 9 20:59:14 2007 *************** *** 20,26 **** @set top_srcdir .. @set abs_top_srcdir /tmp/jwe/octave @set OCTAVEHOME /usr/local ! @set VERSION 2.9.16 @set HAVE_COLAMD @set HAVE_CHOLMOD @set HAVE_UMFPACK --- 20,26 ---- @set top_srcdir .. @set abs_top_srcdir /tmp/jwe/octave @set OCTAVEHOME /usr/local ! @set VERSION 2.9.17 @set HAVE_COLAMD @set HAVE_CHOLMOD @set HAVE_UMFPACK Binary files octave-2.9.16/doc/faq/Octave-FAQ.pdf and octave-2.9.17/doc/faq/Octave-FAQ.pdf differ diff -cNr octave-2.9.16/doc/faq/Octave-FAQ.texi octave-2.9.17/doc/faq/Octave-FAQ.texi *** octave-2.9.16/doc/faq/Octave-FAQ.texi Fri Oct 12 20:52:12 2007 --- octave-2.9.17/doc/faq/Octave-FAQ.texi Wed Nov 7 10:49:37 2007 *************** *** 216,222 **** @item better support for both msvc and mingw ! @item a fully compatiable MEX interface @item many many other minor features and compatibility changes --- 216,222 ---- @item better support for both msvc and mingw ! @item a fully compatible MEX interface @item many many other minor features and compatibility changes *************** *** 798,804 **** bindings from Octave to Tcl/Tk, Vtk and zenity included in the Octave Forge project (@url{http://octave.sourceforge.net}) for example that can be used for a GUI, but these are not @sc{Matlab} ! compatible. Work on a matlab compatiable GUI is in an alpha stage in the JHandles package (@url{http://octave.sourceforge.net/jhandles/index.html}). This might be an issue if you intend to exchange Octave code with @sc{Matlab} users. --- 798,804 ---- bindings from Octave to Tcl/Tk, Vtk and zenity included in the Octave Forge project (@url{http://octave.sourceforge.net}) for example that can be used for a GUI, but these are not @sc{Matlab} ! compatible. Work on a matlab compatible GUI is in an alpha stage in the JHandles package (@url{http://octave.sourceforge.net/jhandles/index.html}). This might be an issue if you intend to exchange Octave code with @sc{Matlab} users. Binary files octave-2.9.16/doc/interpreter/HTML/errorbar.png and octave-2.9.17/doc/interpreter/HTML/errorbar.png differ Binary files octave-2.9.16/doc/interpreter/HTML/grid.png and octave-2.9.17/doc/interpreter/HTML/grid.png differ Binary files octave-2.9.16/doc/interpreter/HTML/griddata.png and octave-2.9.17/doc/interpreter/HTML/griddata.png differ Binary files octave-2.9.16/doc/interpreter/HTML/hist.png and octave-2.9.17/doc/interpreter/HTML/hist.png differ Binary files octave-2.9.16/doc/interpreter/HTML/interpn.png and octave-2.9.17/doc/interpreter/HTML/interpn.png differ Binary files octave-2.9.16/doc/interpreter/HTML/mesh.png and octave-2.9.17/doc/interpreter/HTML/mesh.png differ Binary files octave-2.9.16/doc/interpreter/HTML/plot3.png and octave-2.9.17/doc/interpreter/HTML/plot3.png differ diff -cNr octave-2.9.16/doc/interpreter/arith.texi octave-2.9.17/doc/interpreter/arith.texi *** octave-2.9.16/doc/interpreter/arith.texi Wed Oct 31 18:11:01 2007 --- octave-2.9.17/doc/interpreter/arith.texi Sat Nov 10 00:59:54 2007 *************** *** 874,884 **** --- 874,896 ---- @anchor{doc-sum} @deftypefn {Built-in Function} {} sum (@var{x}, @var{dim}) + @deftypefnx {Built-in Function} {} sum (@dots{}, 'native') Sum of elements along dimension @var{dim}. If @var{dim} is omitted, it defaults to 1 (column-wise sum). As a special case, if @var{x} is a vector and @var{dim} is omitted, return the sum of the elements. + + If the optional argument 'native' is given, then the sum is performed + in the same type as the original argument, rather than in the default + double type. For example + + @example + sum ([true, true]) + @result{} 2 + sum ([true, true], 'native') + @result{} true + @end example @end deftypefn diff -cNr octave-2.9.16/doc/interpreter/basics.texi octave-2.9.17/doc/interpreter/basics.texi *** octave-2.9.16/doc/interpreter/basics.texi Wed Oct 31 18:11:01 2007 --- octave-2.9.17/doc/interpreter/basics.texi Sat Nov 10 00:59:54 2007 *************** *** 480,486 **** @deftypefn {Built-in Function} {@var{val} =} info_program () @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val}) Query or set the internal variable that specifies the name of the ! info program to run. The default initial value is @code{"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info"} in which @var{octave-home} is the directory where all of Octave is installed, @var{version} is the Octave version number, and @var{arch} --- 480,486 ---- @deftypefn {Built-in Function} {@var{val} =} info_program () @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val}) Query or set the internal variable that specifies the name of the ! info program to run. The default value is @code{"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info"} in which @var{octave-home} is the directory where all of Octave is installed, @var{version} is the Octave version number, and @var{arch} *************** *** 1009,1015 **** To change it, use a command like @example ! octave:13> PS1 = "\\u@@\\H> " @end example @noindent --- 1009,1015 ---- To change it, use a command like @example ! octave:13> PS1 ("\\u@@\\H> ") @end example @noindent diff -cNr octave-2.9.16/doc/interpreter/container.texi octave-2.9.17/doc/interpreter/container.texi *** octave-2.9.16/doc/interpreter/container.texi Wed Oct 31 18:11:01 2007 --- octave-2.9.17/doc/interpreter/container.texi Sat Nov 10 00:59:54 2007 *************** *** 551,557 **** @group s.name1 = "John Smith"; s.name2 = "Jill Jones"; ! structfun (@{x@} regexp (x, '(\w+)$', 'matches')@{1@}, s, 'UniformOutput', false) @end group @end example --- 551,557 ---- @group s.name1 = "John Smith"; s.name2 = "Jill Jones"; ! structfun (@@(x) regexp (x, '(\w+)$', 'matches')@{1@}, s, 'UniformOutput', false) @end group @end example diff -cNr octave-2.9.16/doc/interpreter/contributors.in octave-2.9.17/doc/interpreter/contributors.in *** octave-2.9.16/doc/interpreter/contributors.in Fri Oct 12 02:40:56 2007 --- octave-2.9.17/doc/interpreter/contributors.in Fri Nov 2 15:21:56 2007 *************** *** 173,178 **** --- 173,179 ---- Russell Standish Doug Stewart Thomas Stuart + John Swensen Ariel Tankus Georg Thimm Duncan Temple Lang diff -cNr octave-2.9.16/doc/interpreter/contributors.texi octave-2.9.17/doc/interpreter/contributors.texi *** octave-2.9.16/doc/interpreter/contributors.texi Wed Oct 31 18:11:05 2007 --- octave-2.9.17/doc/interpreter/contributors.texi Sat Nov 10 00:59:57 2007 *************** *** 57,68 **** @item John Smith @tab Julius Smith @tab Shan G. Smith @item Joerg Specht @tab Quentin H. Spencer @tab Christoph Spiel @item Richard Stallman @tab Russell Standish @tab Doug Stewart ! @item Thomas Stuart @tab Ariel Tankus @tab Georg Thimm ! @item Duncan Temple Lang @tab Olaf Till @tab Thomas Treichl ! @item Utkarsh Upadhyay @tab Stefan van der Walt @tab Peter Van Wieren ! @item James R. Van Zandt @tab Gregory Vanuxem @tab Ivana Varekova ! @item Thomas Walter @tab Olaf Weber @tab Thomas Weber ! @item Bob Weigel @tab Andreas Weingessel @tab Michael Weitzel ! @item Fook Fah Yap @tab Michael Zeising @tab Federico Zenith ! @item Alex Zvoleff @end multitable --- 57,68 ---- @item John Smith @tab Julius Smith @tab Shan G. Smith @item Joerg Specht @tab Quentin H. Spencer @tab Christoph Spiel @item Richard Stallman @tab Russell Standish @tab Doug Stewart ! @item Thomas Stuart @tab John Swensen @tab Ariel Tankus ! @item Georg Thimm @tab Duncan Temple Lang @tab Olaf Till ! @item Thomas Treichl @tab Utkarsh Upadhyay @tab Stefan van der Walt ! @item Peter Van Wieren @tab James R. Van Zandt @tab Gregory Vanuxem ! @item Ivana Varekova @tab Thomas Walter @tab Olaf Weber ! @item Thomas Weber @tab Bob Weigel @tab Andreas Weingessel ! @item Michael Weitzel @tab Fook Fah Yap @tab Michael Zeising ! @item Federico Zenith @tab Alex Zvoleff @end multitable diff -cNr octave-2.9.16/doc/interpreter/control.texi octave-2.9.17/doc/interpreter/control.texi *** octave-2.9.16/doc/interpreter/control.texi Wed Oct 31 18:11:01 2007 --- octave-2.9.17/doc/interpreter/control.texi Sat Nov 10 00:59:54 2007 *************** *** 1465,1471 **** System outputs: (1) airspeed and (2) pitch angle. ! @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight Control), Springer, 1994. @seealso{ord2} @end deftypefn --- 1465,1472 ---- System outputs: (1) airspeed and (2) pitch angle. ! @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight ! Control), Springer, 1994. @seealso{ord2} @end deftypefn diff -cNr octave-2.9.16/doc/interpreter/convhull.eps octave-2.9.17/doc/interpreter/convhull.eps *** octave-2.9.16/doc/interpreter/convhull.eps Wed Oct 31 18:09:32 2007 --- octave-2.9.17/doc/interpreter/convhull.eps Fri Nov 9 21:00:04 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: convhull.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:32 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: convhull.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:04 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:32 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:04 2007) /DOCINFO pdfmark end } ifelse diff -cNr octave-2.9.16/doc/interpreter/convhull.pdf octave-2.9.17/doc/interpreter/convhull.pdf *** octave-2.9.16/doc/interpreter/convhull.pdf Wed Oct 31 18:09:34 2007 --- octave-2.9.17/doc/interpreter/convhull.pdf Fri Nov 9 21:00:05 2007 *************** *** 59,66 **** endobj 2 0 obj <> startxref 3987 --- 80,86 ---- 0000003669 00000 n trailer << /Size 11 /Root 1 0 R /Info 2 0 R ! /ID [(÷”!Ï™ÞKwMäîýt)(÷”!Ï™ÞKwMäîýt)] >> startxref 3987 diff -cNr octave-2.9.16/doc/interpreter/delaunay.eps octave-2.9.17/doc/interpreter/delaunay.eps *** octave-2.9.16/doc/interpreter/delaunay.eps Wed Oct 31 18:09:34 2007 --- octave-2.9.17/doc/interpreter/delaunay.eps Fri Nov 9 21:00:06 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: delaunay.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:34 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: delaunay.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:06 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:34 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:06 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/delaunay.pdf and octave-2.9.17/doc/interpreter/delaunay.pdf differ diff -cNr octave-2.9.16/doc/interpreter/diffeq.texi octave-2.9.17/doc/interpreter/diffeq.texi *** octave-2.9.16/doc/interpreter/diffeq.texi Wed Oct 31 18:11:02 2007 --- octave-2.9.17/doc/interpreter/diffeq.texi Sat Nov 10 00:59:54 2007 *************** *** 459,465 **** tried if the @code{"compute consistent initial condition"} option has been set to 1 (default is 5). ! Note that the maximum number of Newton iterations allowed in all is @code{MXNIT*MXNJ*MXNH} if the @code{"compute consistent initial condition"} option has been set to 1 and @code{MXNIT*MXNJ} if it is set to 2. --- 459,465 ---- tried if the @code{"compute consistent initial condition"} option has been set to 1 (default is 5). ! Note that the maximum total number of Newton iterations allowed is @code{MXNIT*MXNJ*MXNH} if the @code{"compute consistent initial condition"} option has been set to 1 and @code{MXNIT*MXNJ} if it is set to 2. diff -cNr octave-2.9.16/doc/interpreter/dynamic.texi octave-2.9.17/doc/interpreter/dynamic.texi *** octave-2.9.16/doc/interpreter/dynamic.texi Wed Oct 31 18:11:02 2007 --- octave-2.9.17/doc/interpreter/dynamic.texi Sat Nov 10 00:59:55 2007 *************** *** 1476,1486 **** @end example ! The example above uses @code{mxGetDimensions}, ! @code{mxGetNumberOfElements}, @code{mxGetNumberOfDimensions}, to work with ! the dimensional parameters of multi-dimensional arrays. The also exists ! the functions @code{mxGetM}, and @code{mxGetN} that probe the number of ! rows and columns in a matrix. @node Character Strings in Mex-Files @subsection Character Strings in Mex-Files --- 1476,1486 ---- @end example ! The example above uses the functions @code{mxGetDimensions}, ! @code{mxGetNumberOfElements}, and @code{mxGetNumberOfDimensions} to work ! with the dimensions of multi-dimensional arrays. The functions ! @code{mxGetM}, and @code{mxGetN} are also available to find the number ! of rows and columns in a matrix. @node Character Strings in Mex-Files @subsection Character Strings in Mex-Files *************** *** 1504,1515 **** @end group @end example ! There are a couple of additional functions available in mex-files of ! interest in the treatment of strings. These are @code{mxCreateString}, ! @code{mxArrayToString} and @code{mxCreateCharMatrixFromStrings}. A ! string in a mex-file is considered to be a vector rather than a ! matrix. This is perhaps an arbitrary distinction as the data in the ! mxArray for the matrix is consecutive in any case. @node Cell Arrays with Mex-Files @subsection Cell Arrays with Mex-Files --- 1504,1515 ---- @end group @end example ! Other functions in the mex interface for handling character strings are ! @code{mxCreateString}, @code{mxArrayToString}, and ! @code{mxCreateCharMatrixFromStrings}. In a mex-file, a character string ! is considered to be a vector rather than a matrix. This is perhaps an ! arbitrary distinction as the data in the mxArray for the matrix is ! consecutive in any case. @node Cell Arrays with Mex-Files @subsection Cell Arrays with Mex-Files diff -cNr octave-2.9.16/doc/interpreter/dynamic.txi octave-2.9.17/doc/interpreter/dynamic.txi *** octave-2.9.16/doc/interpreter/dynamic.txi Tue Oct 30 21:08:14 2007 --- octave-2.9.17/doc/interpreter/dynamic.txi Fri Nov 2 12:13:43 2007 *************** *** 1364,1374 **** @end example ! The example above uses @code{mxGetDimensions}, ! @code{mxGetNumberOfElements}, @code{mxGetNumberOfDimensions}, to work with ! the dimensional parameters of multi-dimensional arrays. The also exists ! the functions @code{mxGetM}, and @code{mxGetN} that probe the number of ! rows and columns in a matrix. @node Character Strings in Mex-Files @subsection Character Strings in Mex-Files --- 1364,1374 ---- @end example ! The example above uses the functions @code{mxGetDimensions}, ! @code{mxGetNumberOfElements}, and @code{mxGetNumberOfDimensions} to work ! with the dimensions of multi-dimensional arrays. The functions ! @code{mxGetM}, and @code{mxGetN} are also available to find the number ! of rows and columns in a matrix. @node Character Strings in Mex-Files @subsection Character Strings in Mex-Files *************** *** 1392,1403 **** @end group @end example ! There are a couple of additional functions available in mex-files of ! interest in the treatment of strings. These are @code{mxCreateString}, ! @code{mxArrayToString} and @code{mxCreateCharMatrixFromStrings}. A ! string in a mex-file is considered to be a vector rather than a ! matrix. This is perhaps an arbitrary distinction as the data in the ! mxArray for the matrix is consecutive in any case. @node Cell Arrays with Mex-Files @subsection Cell Arrays with Mex-Files --- 1392,1403 ---- @end group @end example ! Other functions in the mex interface for handling character strings are ! @code{mxCreateString}, @code{mxArrayToString}, and ! @code{mxCreateCharMatrixFromStrings}. In a mex-file, a character string ! is considered to be a vector rather than a matrix. This is perhaps an ! arbitrary distinction as the data in the mxArray for the matrix is ! consecutive in any case. @node Cell Arrays with Mex-Files @subsection Cell Arrays with Mex-Files diff -cNr octave-2.9.16/doc/interpreter/emacs.texi octave-2.9.17/doc/interpreter/emacs.texi *** octave-2.9.16/doc/interpreter/emacs.texi Wed Oct 31 18:11:02 2007 --- octave-2.9.17/doc/interpreter/emacs.texi Sat Nov 10 00:59:55 2007 *************** *** 482,496 **** @node Using the Emacs Info Reader for Octave @appendixsec Using the Emacs Info Reader for Octave ! You can also set up the Emacs Info reader for dealing with the results ! of Octave's @samp{help -i}. For this, the package @file{gnuserv} needs ! to be installed, which unfortunately still does not come with GNU Emacs ! (it does with XEmacs). It can be retrieved from any GNU Emacs Lisp Code ! Directory archive, e.g.@: ! @url{ftp://ftp.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive}, ! in the @file{packages} subdirectory. A recent version of gnuserv is ! available from ! @url{http://www.meltin.net/hacks/emacs/src/gnuserv-3.12.2.tar.gz}. If @file{gnuserv} is installed, add the lines @lisp --- 482,489 ---- @node Using the Emacs Info Reader for Octave @appendixsec Using the Emacs Info Reader for Octave ! You may also use the Emacs Info reader with Octave's @code{doc} function. ! For this, the package @file{gnuserv} needs to be installed. If @file{gnuserv} is installed, add the lines @lisp *************** *** 509,518 **** that the Emacs variable @code{octave-help-files} is set correctly). In this case, use @code{info_program ("info-emacs-octave-help")}. ! If you use Octave from within Emacs, these settings are best done in the ! @file{~/.emacs-octave} startup file (or the file pointed to by the Emacs ! variable @code{inferior-octave-startup-file}). ! ! @c Local Variables: ! @c TeX-command-default: "Texinfo" ! @c End: --- 502,507 ---- that the Emacs variable @code{octave-help-files} is set correctly). In this case, use @code{info_program ("info-emacs-octave-help")}. ! If you use Octave from within Emacs, it is best to add these settings to ! your @file{~/.emacs-octave} startup file (or the file pointed to by the ! Emacs variable @code{inferior-octave-startup-file}). diff -cNr octave-2.9.16/doc/interpreter/emacs.txi octave-2.9.17/doc/interpreter/emacs.txi *** octave-2.9.16/doc/interpreter/emacs.txi Fri Oct 12 20:52:12 2007 --- octave-2.9.17/doc/interpreter/emacs.txi Fri Nov 2 12:13:43 2007 *************** *** 480,494 **** @node Using the Emacs Info Reader for Octave @appendixsec Using the Emacs Info Reader for Octave ! You can also set up the Emacs Info reader for dealing with the results ! of Octave's @samp{help -i}. For this, the package @file{gnuserv} needs ! to be installed, which unfortunately still does not come with GNU Emacs ! (it does with XEmacs). It can be retrieved from any GNU Emacs Lisp Code ! Directory archive, e.g.@: ! @url{ftp://ftp.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive}, ! in the @file{packages} subdirectory. A recent version of gnuserv is ! available from ! @url{http://www.meltin.net/hacks/emacs/src/gnuserv-3.12.2.tar.gz}. If @file{gnuserv} is installed, add the lines @lisp --- 480,487 ---- @node Using the Emacs Info Reader for Octave @appendixsec Using the Emacs Info Reader for Octave ! You may also use the Emacs Info reader with Octave's @code{doc} function. ! For this, the package @file{gnuserv} needs to be installed. If @file{gnuserv} is installed, add the lines @lisp *************** *** 507,516 **** that the Emacs variable @code{octave-help-files} is set correctly). In this case, use @code{info_program ("info-emacs-octave-help")}. ! If you use Octave from within Emacs, these settings are best done in the ! @file{~/.emacs-octave} startup file (or the file pointed to by the Emacs ! variable @code{inferior-octave-startup-file}). ! ! @c Local Variables: ! @c TeX-command-default: "Texinfo" ! @c End: --- 500,505 ---- that the Emacs variable @code{octave-help-files} is set correctly). In this case, use @code{info_program ("info-emacs-octave-help")}. ! If you use Octave from within Emacs, it is best to add these settings to ! your @file{~/.emacs-octave} startup file (or the file pointed to by the ! Emacs variable @code{inferior-octave-startup-file}). diff -cNr octave-2.9.16/doc/interpreter/errorbar.eps octave-2.9.17/doc/interpreter/errorbar.eps *** octave-2.9.16/doc/interpreter/errorbar.eps Wed Oct 31 18:09:43 2007 --- octave-2.9.17/doc/interpreter/errorbar.eps Fri Nov 9 21:00:15 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: errorbar.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:43 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: errorbar.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:15 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:43 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:15 2007) /DOCINFO pdfmark end } ifelse *************** *** 458,509 **** (Helvetica) findfont 140 scalefont setfont 1.000 UL LTb ! 574 663 M 63 0 V 6325 0 R -63 0 V stroke ! 490 663 M [ [(Helvetica) 140.0 0.0 true true 0 (-1)] ] -46.7 MRshow 1.000 UL LTb ! 574 1619 M 63 0 V 6325 0 R -63 0 V stroke ! 490 1619 M [ [(Helvetica) 140.0 0.0 true true 0 (-0.5)] ] -46.7 MRshow 1.000 UL LTb ! 574 2576 M 63 0 V 6325 0 R -63 0 V stroke ! 490 2576 M [ [(Helvetica) 140.0 0.0 true true 0 (0)] ] -46.7 MRshow 1.000 UL LTb ! 574 3533 M 63 0 V 6325 0 R -63 0 V stroke ! 490 3533 M [ [(Helvetica) 140.0 0.0 true true 0 (0.5)] ] -46.7 MRshow 1.000 UL LTb ! 574 4489 M 63 0 V 6325 0 R -63 0 V stroke ! 490 4489 M [ [(Helvetica) 140.0 0.0 true true 0 (1)] ] -46.7 MRshow 1.000 UL --- 458,509 ---- (Helvetica) findfont 140 scalefont setfont 1.000 UL LTb ! 574 647 M 63 0 V 6325 0 R -63 0 V stroke ! 490 647 M [ [(Helvetica) 140.0 0.0 true true 0 (-1)] ] -46.7 MRshow 1.000 UL LTb ! 574 1566 M 63 0 V 6325 0 R -63 0 V stroke ! 490 1566 M [ [(Helvetica) 140.0 0.0 true true 0 (-0.5)] ] -46.7 MRshow 1.000 UL LTb ! 574 2484 M 63 0 V 6325 0 R -63 0 V stroke ! 490 2484 M [ [(Helvetica) 140.0 0.0 true true 0 (0)] ] -46.7 MRshow 1.000 UL LTb ! 574 3403 M 63 0 V 6325 0 R -63 0 V stroke ! 490 3403 M [ [(Helvetica) 140.0 0.0 true true 0 (0.5)] ] -46.7 MRshow 1.000 UL LTb ! 574 4321 M 63 0 V 6325 0 R -63 0 V stroke ! 490 4321 M [ [(Helvetica) 140.0 0.0 true true 0 (1)] ] -46.7 MRshow 1.000 UL *************** *** 582,1294 **** 1.000 UP 1.000 UL LT0 ! 574 2318 M ! 0 328 V ! 543 2318 M 62 0 V ! -62 328 R 62 0 V ! 33 -28 R ! 0 85 V ! -31 -85 R 62 0 V ! -62 85 R 62 0 V ! 33 556 R ! 0 -436 V ! -31 436 R 62 0 V ! 671 2823 M 62 0 V ! 33 205 R ! 0 157 V ! 735 3028 M 62 0 V ! -62 157 R 62 0 V ! 33 -160 R ! 0 521 V ! 799 3025 M 62 0 V ! -62 521 R 62 0 V ! 32 25 R ! 0 -43 V ! -31 43 R ! 62 0 V ! -62 -43 R ! 62 0 V ! 33 85 R ! 0 152 V ! 926 3613 M ! 62 0 V ! -62 152 R ! 62 0 V ! 33 50 R ! 0 116 V ! 990 3815 M ! 62 0 V ! -62 116 R ! 62 0 V ! 33 -243 R ! 0 130 V ! -31 -130 R ! 62 0 V ! -62 130 R ! 62 0 V ! 33 257 R ! 0 -223 V ! -31 223 R ! 62 0 V ! -62 -223 R 62 0 V ! 33 417 R ! 0 306 V ! -31 -306 R 62 0 V ! -62 306 R 62 0 V ! 33 -695 R ! 0 495 V ! -31 -495 R 62 0 V ! -62 495 R 62 0 V ! 33 188 R ! 0 -254 V ! -31 254 R 62 0 V ! -62 -254 R 62 0 V ! 32 27 R ! 0 -315 V ! -31 315 R 62 0 V ! -62 -315 R 62 0 V ! 33 359 R ! 0 71 V ! -31 -71 R 62 0 V ! -62 71 R 62 0 V ! 33 207 R ! 0 -600 V ! -31 600 R 62 0 V ! -62 -600 R 62 0 V ! 33 374 R ! 0 -138 V ! -31 138 R 62 0 V ! -62 -138 R 62 0 V ! 33 96 R ! 0 176 V ! -31 -176 R ! 1691 4390 L ! -62 176 R 62 0 V ! 33 -183 R ! 0 -204 V ! -31 204 R 62 0 V ! -62 -204 R 62 0 V ! 33 -168 R ! 0 549 V ! -31 -549 R 62 0 V ! -62 549 R 62 0 V ! 33 -200 R ! 0 -198 V ! -31 198 R 62 0 V ! -62 -198 R 62 0 V ! 32 218 R ! 0 20 V ! -31 -20 R 62 0 V ! -62 20 R 62 0 V ! 33 -111 R ! 0 -271 V ! -31 271 R 62 0 V ! -62 -271 R 62 0 V ! 33 40 R ! 0 157 V ! -31 -157 R 62 0 V ! -62 157 R 62 0 V ! 33 -482 R ! 0 -80 V ! -31 80 R 62 0 V ! -62 -80 R 62 0 V ! 33 -110 R ! 0 28 V ! -31 -28 R 62 0 V ! -62 28 R 62 0 V ! 33 339 R ! 0 -350 V ! -31 350 R 62 0 V ! -62 -350 R 62 0 V ! 33 -54 R ! 0 -2 V ! -31 2 R 62 0 V ! -62 -2 R 62 0 V ! 33 -555 R ! 0 247 V ! -31 -247 R 62 0 V ! -62 247 R 62 0 V ! 33 -88 R ! 0 120 V ! -31 -120 R 62 0 V ! -62 120 R 62 0 V ! 32 -480 R ! 0 108 V ! -31 -108 R 62 0 V ! -62 108 R 62 0 V ! 33 -186 R ! 0 -246 V ! -31 246 R 62 0 V ! -62 -246 R 62 0 V ! 33 -109 R ! 0 -121 V ! -31 121 R 62 0 V ! -62 -121 R 62 0 V ! 33 6 R ! 0 83 V ! -31 -83 R 62 0 V ! -62 83 R 62 0 V ! 33 85 R ! 0 -112 V ! -31 112 R 62 0 V ! -62 -112 R 62 0 V ! 33 -367 R ! 2810 1832 L ! -31 57 R 62 0 V ! -62 -57 R 62 0 V ! 33 30 R ! 0 -661 V ! -31 661 R 62 0 V ! -62 -661 R 62 0 V ! 33 504 R ! 0 -320 V ! -31 320 R 62 0 V ! -62 -320 R 62 0 V ! 32 242 R ! 0 -338 V ! -31 338 R 62 0 V ! -62 -338 R 62 0 V ! 33 -199 R ! 0 493 V ! -31 -493 R 62 0 V ! -62 493 R 62 0 V ! 33 -464 R ! 0 -293 V ! -31 293 R 62 0 V ! 3098 826 M 62 0 V ! 33 217 R ! 0 228 V ! -31 -228 R 62 0 V ! -62 228 R 62 0 V ! 33 -191 R ! 0 -31 V ! -31 31 R 62 0 V ! -62 -31 R 62 0 V ! 33 -196 R ! 0 -17 V ! -31 17 R 62 0 V ! -62 -17 R 62 0 V ! 33 3 R ! 0 -228 V ! -31 228 R 62 0 V ! 3354 611 M 62 0 V ! 33 211 R ! 0 -58 V ! -31 58 R 62 0 V ! -62 -58 R 62 0 V ! 32 -49 R ! 0 -167 V ! -31 167 R 62 0 V ! 3481 548 M 62 0 V ! 33 -223 R ! 0 166 V ! 3545 325 M 62 0 V ! -62 166 R 62 0 V ! 33 187 R ! 0 24 V ! -31 -24 R 62 0 V ! -62 24 R 62 0 V ! 33 -116 R ! 0 42 V ! -31 -42 R 62 0 V ! -62 42 R 62 0 V ! 33 211 R ! 0 -146 V ! -31 146 R 62 0 V ! 3737 693 M 62 0 V ! 33 376 R ! 0 -364 V ! -31 364 R 62 0 V ! 3801 705 M 62 0 V ! 33 -139 R ! 0 47 V ! -31 -47 R 62 0 V ! -62 47 R ! 3927 613 L ! 33 -11 R ! 0 393 V ! 3929 602 M 62 0 V ! -62 393 R 62 0 V ! 33 -33 R ! 0 53 V ! -31 -53 R 62 0 V ! -62 53 R 62 0 V ! 32 41 R ! 0 -93 V ! -31 93 R 62 0 V ! -62 -93 R 62 0 V ! 33 519 R ! 0 -159 V ! -31 159 R 62 0 V ! -62 -159 R 62 0 V ! 33 234 R ! 0 -73 V ! -31 73 R 62 0 V ! -62 -73 R 62 0 V ! 33 331 R ! 0 -11 V ! -31 11 R 62 0 V ! -62 -11 R 62 0 V ! 33 173 R ! 0 76 V ! -31 -76 R 62 0 V ! -62 76 R 62 0 V ! 33 -70 R ! 0 164 V ! -31 -164 R 62 0 V ! -62 164 R 62 0 V ! 33 -137 R ! 0 106 V ! -31 -106 R 62 0 V ! -62 106 R 62 0 V ! 33 148 R ! 0 -161 V ! -31 161 R 62 0 V ! -62 -161 R 62 0 V ! 32 285 R ! 0 361 V ! -31 -361 R 62 0 V ! -62 361 R 62 0 V ! 33 120 R ! 0 -47 V ! -31 47 R 62 0 V ! -62 -47 R 62 0 V ! 33 342 R ! 0 -330 V ! -31 330 R 62 0 V ! -62 -330 R 62 0 V ! 33 239 R ! 0 214 V ! -31 -214 R 62 0 V ! -62 214 R 62 0 V ! 33 126 R ! 0 110 V ! -31 -110 R 62 0 V ! -62 110 R 62 0 V ! 33 -171 R ! 0 -154 V ! -31 154 R 62 0 V ! -62 -154 R 62 0 V ! 33 313 R ! 0 183 V ! -31 -183 R 62 0 V ! -62 183 R 62 0 V ! 33 25 R ! 0 226 V ! -31 -226 R ! 5077 3719 L ! -62 226 R 62 0 V ! 32 54 R ! 0 -17 V ! -31 17 R 62 0 V ! -62 -17 R 62 0 V ! 33 -90 R ! 0 419 V ! -31 -419 R 62 0 V ! -62 419 R 62 0 V ! 33 -197 R ! 0 -91 V ! -31 91 R 62 0 V ! -62 -91 R 62 0 V ! 33 311 R ! 0 405 V ! -31 -405 R 62 0 V ! -62 405 R 62 0 V ! 33 -113 R ! 0 -238 V ! -31 238 R 62 0 V ! -62 -238 R 62 0 V ! 33 227 R ! 0 -383 V ! -31 383 R 62 0 V ! -62 -383 R 62 0 V ! 33 -52 R ! 0 317 V ! -31 -317 R 62 0 V ! -62 317 R 62 0 V ! 33 -391 R ! 0 381 V ! -31 -381 R 62 0 V ! -62 381 R 62 0 V ! 33 -37 R ! 0 110 V ! -31 -110 R 62 0 V ! -62 110 R 62 0 V ! 32 -158 R ! 0 169 V ! -31 -169 R 62 0 V ! -62 169 R 62 0 V ! 33 -150 R ! 0 -264 V ! -31 264 R 62 0 V ! -62 -264 R 62 0 V ! 33 235 R ! 0 38 V ! -31 -38 R 62 0 V ! -62 38 R 62 0 V ! 33 -315 R ! 0 -52 V ! -31 52 R 62 0 V ! -62 -52 R 62 0 V ! 33 182 R ! 0 179 V ! -31 -179 R 62 0 V ! -62 179 R 62 0 V ! 33 -386 R ! 0 -77 V ! -31 77 R 62 0 V ! -62 -77 R 62 0 V ! 33 32 R ! 0 -3 V ! -31 3 R 62 0 V ! -62 -3 R 62 0 V ! 33 -60 R ! 0 -389 V ! -31 389 R 62 0 V ! -62 -389 R 62 0 V ! 32 -313 R ! 6195 3626 L ! -31 -398 R ! 62 0 V ! -62 398 R ! 62 0 V ! 33 -237 R ! 0 255 V ! -31 -255 R ! 62 0 V ! -62 255 R ! 62 0 V ! 33 -299 R ! 0 -41 V ! -31 41 R ! 62 0 V ! -62 -41 R ! 62 0 V ! 33 -380 R ! 0 239 V ! -31 -239 R ! 62 0 V ! -62 239 R ! 62 0 V ! 33 -269 R ! 0 -24 V ! -31 24 R ! 62 0 V ! -62 -24 R ! 62 0 V ! 33 -343 R ! 0 265 V ! -31 -265 R ! 62 0 V ! -62 265 R ! 62 0 V ! 33 -408 R ! 0 85 V ! -31 -85 R ! 62 0 V ! -62 85 R ! 62 0 V ! 33 257 R ! 0 -186 V ! -31 186 R ! 62 0 V ! -62 -186 R ! 62 0 V ! 32 -313 R ! 0 -64 V ! -31 64 R ! 62 0 V ! -62 -64 R ! 62 0 V ! 33 129 R ! 0 -195 V ! -31 195 R ! 62 0 V ! -62 -195 R ! 62 0 V ! 33 -373 R ! 0 498 V ! -31 -498 R ! 62 0 V ! -62 498 R ! 62 0 V ! 33 -542 R ! 0 48 V ! -31 -48 R ! 62 0 V ! -62 48 R ! 62 0 V ! 33 37 R ! 0 4 V ! -31 -4 R ! 62 0 V ! -62 4 R ! 62 0 V ! 574 2576 Pls ! 638 2767 Pls ! 702 2956 Pls ! 766 3141 Pls ! 830 3321 Pls ! 893 3493 Pls ! 957 3656 Pls ! 1021 3809 Pls ! 1085 3949 Pls ! 1149 4075 Pls ! 1213 4186 Pls ! 1277 4281 Pls ! 1341 4359 Pls ! 1404 4420 Pls ! 1468 4461 Pls ! 1532 4485 Pls ! 1596 4489 Pls ! 1660 4473 Pls ! 1724 4439 Pls ! 1788 4387 Pls ! 1852 4316 Pls ! 1915 4228 Pls ! 1979 4123 Pls ! 2043 4003 Pls ! 2107 3868 Pls ! 2171 3721 Pls ! 2235 3562 Pls ! 2299 3394 Pls ! 2363 3217 Pls ! 2427 3034 Pls ! 2490 2846 Pls ! 2554 2656 Pls ! 2618 2464 Pls ! 2682 2274 Pls ! 2746 2087 Pls ! 2810 1905 Pls ! 2874 1729 Pls ! 2938 1562 Pls ! 3001 1405 Pls ! 3065 1260 Pls ! 3129 1128 Pls ! 3193 1010 Pls ! 3257 908 Pls ! 3321 823 Pls ! 3385 755 Pls ! 3449 706 Pls ! 3512 675 Pls ! 3576 663 Pls ! 3640 670 Pls ! 3704 696 Pls ! 3768 741 Pls ! 3832 805 Pls ! 3896 886 Pls ! 3960 984 Pls ! 4024 1097 Pls ! 4087 1226 Pls ! 4151 1368 Pls ! 4215 1522 Pls ! 4279 1687 Pls ! 4343 1861 Pls ! 4407 2041 Pls ! 4471 2227 Pls ! 4535 2417 Pls ! 4598 2608 Pls ! 4662 2799 Pls ! 4726 2988 Pls ! 4790 3172 Pls ! 4854 3351 Pls ! 4918 3521 Pls ! 4982 3683 Pls ! 5046 3833 Pls ! 5109 3971 Pls ! 5173 4095 Pls ! 5237 4203 Pls ! 5301 4296 Pls ! 5365 4371 Pls ! 5429 4428 Pls ! 5493 4467 Pls ! 5557 4487 Pls ! 5621 4487 Pls ! 5684 4469 Pls ! 5748 4432 Pls ! 5812 4376 Pls ! 5876 4302 Pls ! 5940 4211 Pls ! 6004 4104 Pls ! 6068 3981 Pls ! 6132 3844 Pls ! 6195 3695 Pls ! 6259 3535 Pls ! 6323 3365 Pls ! 6387 3187 Pls ! 6451 3002 Pls ! 6515 2814 Pls ! 6579 2623 Pls ! 6643 2432 Pls ! 6706 2242 Pls ! 6770 2056 Pls ! 6834 1875 Pls ! 6898 1701 Pls ! 6962 1535 Pls 1.000 UL LTb 574 4872 N --- 582,1294 ---- 1.000 UP 1.000 UL LT0 ! 574 2765 M ! 0 -387 V ! -31 387 R 62 0 V ! 543 2378 M 62 0 V ! 33 94 R ! 0 129 V ! 607 2472 M 62 0 V ! -62 129 R 62 0 V ! 33 403 R ! 0 132 V ! 671 3004 M 62 0 V ! -62 132 R 62 0 V ! 33 -181 R ! 0 92 V ! -31 -92 R 62 0 V ! -62 92 R 62 0 V ! 33 220 R ! 0 154 V ! 799 3267 M 62 0 V ! -62 154 R 62 0 V ! 32 -95 R ! 0 76 V ! -31 -76 R 62 0 V ! -62 76 R 62 0 V ! 33 -239 R ! 0 350 V ! 926 3163 M 62 0 V ! -62 350 R 62 0 V ! 33 209 R ! 0 213 V ! 990 3722 M 62 0 V ! -62 213 R 62 0 V ! 33 -184 R ! 0 107 V ! -31 -107 R 62 0 V ! -62 107 R 62 0 V ! 33 -175 R ! 0 -161 V ! -31 161 R 62 0 V ! -62 -161 R 62 0 V ! 33 590 R ! 0 14 V ! -31 -14 R 62 0 V ! -62 14 R 62 0 V ! 33 -111 R ! 0 403 V ! -31 -403 R 62 0 V ! -62 403 R 62 0 V ! 33 -80 R ! 0 76 V ! -31 -76 R 62 0 V ! -62 76 R 62 0 V ! 32 -335 R ! 0 251 V ! -31 -251 R 62 0 V ! -62 251 R 62 0 V ! 33 -29 R ! 0 209 V ! -31 -209 R 62 0 V ! -62 209 R 62 0 V ! 33 -234 R ! 0 -63 V ! -31 63 R 62 0 V ! -62 -63 R 62 0 V ! 33 159 R ! 0 -58 V ! -31 58 R 62 0 V ! -62 -58 R 62 0 V ! 33 323 R ! 0 -653 V ! -31 653 R ! 1691 4637 L ! -62 -653 R 62 0 V ! 33 212 R ! 0 108 V ! -31 -108 R 62 0 V ! -62 108 R 62 0 V ! 33 -124 R ! 0 332 V ! -31 -332 R 62 0 V ! -62 332 R 62 0 V ! 33 -93 R ! 0 -599 V ! -31 599 R 62 0 V ! -62 -599 R 62 0 V ! 32 203 R ! 0 -35 V ! -31 35 R 62 0 V ! -62 -35 R 62 0 V ! 33 34 R ! 0 -217 V ! -31 217 R 62 0 V ! -62 -217 R 62 0 V ! 33 319 R ! 0 5 V ! -31 -5 R 62 0 V ! -62 5 R 62 0 V ! 33 -418 R ! 0 124 V ! -31 -124 R 62 0 V ! -62 124 R 62 0 V ! 33 -370 R ! 0 212 V ! -31 -212 R 62 0 V ! -62 212 R 62 0 V ! 33 -191 R ! 0 200 V ! -31 -200 R 62 0 V ! -62 200 R 62 0 V ! 33 -764 R ! 0 484 V ! -31 -484 R 62 0 V ! -62 484 R 62 0 V ! 33 -278 R ! 0 191 V ! -31 -191 R 62 0 V ! -62 191 R 62 0 V ! 33 -438 R ! 0 -155 V ! -31 155 R 62 0 V ! -62 -155 R 62 0 V ! 32 445 R ! 0 -472 V ! -31 472 R 62 0 V ! -62 -472 R 62 0 V ! 33 181 R ! 0 -163 V ! -31 163 R 62 0 V ! -62 -163 R 62 0 V ! 33 -475 R ! 0 349 V ! -31 -349 R 62 0 V ! -62 349 R 62 0 V ! 33 -515 R ! 0 300 V ! -31 -300 R 62 0 V ! -62 300 R 62 0 V ! 33 55 R ! 0 -27 V ! -31 27 R 62 0 V ! -62 -27 R 62 0 V ! 33 -564 R ! 2810 1990 L ! -31 -150 R 62 0 V ! -62 150 R 62 0 V ! 33 -360 R ! 0 11 V ! -31 -11 R 62 0 V ! -62 11 R 62 0 V ! 33 -70 R ! 0 -360 V ! -31 360 R 62 0 V ! -62 -360 R 62 0 V ! 32 243 R ! 0 13 V ! -31 -13 R 62 0 V ! -62 13 R 62 0 V ! 33 -83 R ! 0 -78 V ! -31 78 R 62 0 V ! -62 -78 R 62 0 V ! 33 -32 R ! 0 -159 V ! -31 159 R 62 0 V ! -62 -159 R 62 0 V ! 33 -126 R ! 0 243 V ! 3162 989 M 62 0 V ! -62 243 R 62 0 V ! 33 -440 R ! 0 44 V ! -31 -44 R 62 0 V ! -62 44 R 62 0 V ! 33 103 R ! 0 -355 V ! -31 355 R 62 0 V ! 3290 584 M 62 0 V ! 33 50 R ! 0 -40 V ! -31 40 R 62 0 V ! -62 -40 R 62 0 V ! 33 230 R ! 0 -412 V ! -31 412 R 62 0 V ! 3418 412 M 62 0 V ! 32 512 R ! 0 176 V ! 3481 924 M 62 0 V ! -62 176 R 62 0 V ! 33 -442 R ! 0 207 V ! 3545 658 M 62 0 V ! -62 207 R 62 0 V ! 33 -311 R ! 0 224 V ! 3609 554 M 62 0 V ! -62 224 R 62 0 V ! 33 -12 R ! 0 -313 V ! -31 313 R 62 0 V ! 3673 453 M 62 0 V ! 33 367 R ! 0 -92 V ! -31 92 R 62 0 V ! -62 -92 R 62 0 V ! 33 -60 R ! 0 -54 V ! -31 54 R 62 0 V ! -62 -54 R 62 0 V ! 33 639 R ! 0 -459 V ! -31 459 R ! 62 0 V ! 3865 794 M ! 3927 794 L ! 33 184 R ! 0 132 V ! 3929 978 M 62 0 V ! -62 132 R 62 0 V ! 33 -70 R ! 0 366 V ! -31 -366 R 62 0 V ! -62 366 R 62 0 V ! 32 -195 R ! 0 -360 V ! -31 360 R 62 0 V ! 4056 851 M 62 0 V ! 33 420 R ! 0 262 V ! -31 -262 R 62 0 V ! -62 262 R 62 0 V ! 33 -204 R ! 0 257 V ! -31 -257 R 62 0 V ! -62 257 R 62 0 V ! 33 -62 R ! 0 178 V ! -31 -178 R 62 0 V ! -62 178 R 62 0 V ! 33 134 R ! 0 136 V ! -31 -136 R 62 0 V ! -62 136 R 62 0 V ! 33 -154 R ! 0 195 V ! -31 -195 R 62 0 V ! -62 195 R 62 0 V ! 33 467 R ! 0 -479 V ! -31 479 R 62 0 V ! -62 -479 R 62 0 V ! 33 538 R ! 0 174 V ! -31 -174 R 62 0 V ! -62 174 R 62 0 V ! 32 -99 R ! 0 147 V ! -31 -147 R 62 0 V ! -62 147 R 62 0 V ! 33 -36 R ! 0 29 V ! -31 -29 R 62 0 V ! -62 29 R 62 0 V ! 33 65 R ! 0 205 V ! -31 -205 R 62 0 V ! -62 205 R 62 0 V ! 33 82 R ! 0 92 V ! -31 -92 R 62 0 V ! -62 92 R 62 0 V ! 33 -166 R ! 0 446 V ! -31 -446 R 62 0 V ! -62 446 R 62 0 V ! 33 -182 R ! 0 -38 V ! -31 38 R 62 0 V ! -62 -38 R 62 0 V ! 33 314 R ! 0 -128 V ! -31 128 R 62 0 V ! -62 -128 R 62 0 V ! 33 76 R ! 0 168 V ! -31 -168 R ! 5077 3520 L ! -62 168 R 62 0 V ! 32 -76 R ! 0 -48 V ! -31 48 R 62 0 V ! -62 -48 R 62 0 V ! 33 445 R ! 0 -180 V ! -31 180 R 62 0 V ! -62 -180 R 62 0 V ! 33 508 R ! 0 -243 V ! -31 243 R 62 0 V ! -62 -243 R 62 0 V ! 33 -8 R ! 0 187 V ! -31 -187 R 62 0 V ! -62 187 R 62 0 V ! 33 -282 R ! 0 196 V ! -31 -196 R 62 0 V ! -62 196 R 62 0 V ! 33 -164 R ! 0 -68 V ! -31 68 R 62 0 V ! -62 -68 R 62 0 V ! 33 371 R ! 0 -82 V ! -31 82 R 62 0 V ! -62 -82 R 62 0 V ! 33 529 R ! 0 -437 V ! -31 437 R 62 0 V ! -62 -437 R 62 0 V ! 33 -41 R ! 0 -8 V ! -31 8 R 62 0 V ! -62 -8 R 62 0 V ! 32 0 R ! 0 90 V ! -31 -90 R 62 0 V ! -62 90 R 62 0 V ! 33 216 R ! 0 -310 V ! -31 310 R 62 0 V ! -62 -310 R 62 0 V ! 33 -154 R ! 0 -101 V ! -31 101 R 62 0 V ! -62 -101 R 62 0 V ! 33 -73 R ! 0 -2 V ! -31 2 R 62 0 V ! -62 -2 R 62 0 V ! 33 138 R ! 0 150 V ! -31 -150 R ! 62 0 V ! -62 150 R ! 62 0 V ! 33 -284 R ! 0 -267 V ! -31 267 R ! 62 0 V ! -62 -267 R ! 62 0 V ! 33 621 R ! 0 -513 V ! -31 513 R ! 62 0 V ! -62 -513 R ! 62 0 V ! 33 -189 R ! 0 207 V ! -31 -207 R ! 62 0 V ! -62 207 R ! 62 0 V ! 32 -330 R ! 6195 3764 L ! -31 -278 R ! 62 0 V ! -62 278 R ! 62 0 V ! 33 -473 R ! 0 219 V ! -31 -219 R ! 62 0 V ! -62 219 R ! 62 0 V ! 33 -268 R ! 0 88 V ! -31 -88 R ! 62 0 V ! -62 88 R ! 62 0 V ! 33 -401 R ! 0 91 V ! -31 -91 R ! 62 0 V ! -62 91 R ! 62 0 V ! 33 -278 R ! 0 68 V ! -31 -68 R ! 62 0 V ! -62 68 R ! 62 0 V ! 33 -98 R ! 0 420 V ! -31 -420 R ! 62 0 V ! -62 420 R ! 62 0 V ! 33 -508 R ! 0 29 V ! -31 -29 R ! 62 0 V ! -62 29 R ! 62 0 V ! 33 -295 R ! 0 211 V ! -31 -211 R ! 62 0 V ! -62 211 R ! 62 0 V ! 32 -318 R ! 0 -505 V ! -31 505 R ! 62 0 V ! -62 -505 R ! 62 0 V ! 33 464 R ! 0 -216 V ! -31 216 R ! 62 0 V ! -62 -216 R ! 62 0 V ! 33 -214 R ! 0 -111 V ! -31 111 R ! 62 0 V ! -62 -111 R ! 62 0 V ! 33 -59 R ! 0 19 V ! -31 -19 R ! 62 0 V ! -62 19 R ! 62 0 V ! 33 68 R ! 0 -265 V ! -31 265 R ! 62 0 V ! -62 -265 R ! 62 0 V ! 574 2484 Pls ! 638 2668 Pls ! 702 2849 Pls ! 766 3027 Pls ! 830 3199 Pls ! 893 3365 Pls ! 957 3521 Pls ! 1021 3667 Pls ! 1085 3802 Pls ! 1149 3923 Pls ! 1213 4030 Pls ! 1277 4121 Pls ! 1341 4196 Pls ! 1404 4254 Pls ! 1468 4294 Pls ! 1532 4316 Pls ! 1596 4320 Pls ! 1660 4306 Pls ! 1724 4273 Pls ! 1788 4222 Pls ! 1852 4154 Pls ! 1915 4070 Pls ! 1979 3969 Pls ! 2043 3854 Pls ! 2107 3725 Pls ! 2171 3583 Pls ! 2235 3431 Pls ! 2299 3269 Pls ! 2363 3099 Pls ! 2427 2924 Pls ! 2490 2743 Pls ! 2554 2561 Pls ! 2618 2377 Pls ! 2682 2194 Pls ! 2746 2015 Pls ! 2810 1840 Pls ! 2874 1671 Pls ! 2938 1511 Pls ! 3001 1360 Pls ! 3065 1221 Pls ! 3129 1094 Pls ! 3193 981 Pls ! 3257 883 Pls ! 3321 801 Pls ! 3385 736 Pls ! 3449 689 Pls ! 3512 659 Pls ! 3576 648 Pls ! 3640 654 Pls ! 3704 680 Pls ! 3768 723 Pls ! 3832 784 Pls ! 3896 861 Pls ! 3960 955 Pls ! 4024 1065 Pls ! 4087 1188 Pls ! 4151 1325 Pls ! 4215 1473 Pls ! 4279 1631 Pls ! 4343 1797 Pls ! 4407 1971 Pls ! 4471 2150 Pls ! 4535 2332 Pls ! 4598 2515 Pls ! 4662 2698 Pls ! 4726 2879 Pls ! 4790 3056 Pls ! 4854 3228 Pls ! 4918 3392 Pls ! 4982 3547 Pls ! 5046 3691 Pls ! 5109 3823 Pls ! 5173 3942 Pls ! 5237 4046 Pls ! 5301 4135 Pls ! 5365 4207 Pls ! 5429 4262 Pls ! 5493 4299 Pls ! 5557 4318 Pls ! 5621 4319 Pls ! 5684 4301 Pls ! 5748 4266 Pls ! 5812 4212 Pls ! 5876 4141 Pls ! 5940 4054 Pls ! 6004 3951 Pls ! 6068 3833 Pls ! 6132 3702 Pls ! 6195 3559 Pls ! 6259 3404 Pls ! 6323 3241 Pls ! 6387 3070 Pls ! 6451 2894 Pls ! 6515 2713 Pls ! 6579 2530 Pls ! 6643 2346 Pls ! 6706 2164 Pls ! 6770 1985 Pls ! 6834 1811 Pls ! 6898 1644 Pls ! 6962 1485 Pls 1.000 UL LTb 574 4872 N Binary files octave-2.9.16/doc/interpreter/errorbar.pdf and octave-2.9.17/doc/interpreter/errorbar.pdf differ Binary files octave-2.9.16/doc/interpreter/errorbar.png and octave-2.9.17/doc/interpreter/errorbar.png differ diff -cNr octave-2.9.16/doc/interpreter/gplot.eps octave-2.9.17/doc/interpreter/gplot.eps *** octave-2.9.16/doc/interpreter/gplot.eps Wed Oct 31 18:09:03 2007 --- octave-2.9.17/doc/interpreter/gplot.eps Fri Nov 9 20:59:34 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: gplot.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:03 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: gplot.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:34 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:03 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:34 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/gplot.pdf and octave-2.9.17/doc/interpreter/gplot.pdf differ diff -cNr octave-2.9.16/doc/interpreter/grid.eps octave-2.9.17/doc/interpreter/grid.eps *** octave-2.9.16/doc/interpreter/grid.eps Wed Oct 31 18:09:06 2007 --- octave-2.9.17/doc/interpreter/grid.eps Fri Nov 9 20:59:38 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: grid.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:06 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: grid.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:38 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:06 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:38 2007) /DOCINFO pdfmark end } ifelse *************** *** 503,511 **** }{ /g {stroke pm3dround pm3dGamma exp setgray} bind def } ifelse ! 1.000 UL LTb ! 1370 1151 M 669 437 V 3791 -77 R -3791 77 V --- 503,1794 ---- }{ /g {stroke pm3dround pm3dGamma exp setgray} bind def } ifelse ! 1.000 UP ! 0.500 UL ! LT0 ! 0.00 0.00 1.00 C 1905 1501 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2095 1707 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1905 1501 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2229 1794 M ! 2039 1588 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2095 1707 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1560 1357 M ! 479 231 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2095 1707 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2095 1707 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2284 1913 M ! -55 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2095 1707 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2418 2000 M ! 2229 1794 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2284 1913 M ! -55 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1750 1563 M ! 479 231 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2284 1913 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2284 1913 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2664 2115 M ! 2418 2000 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2284 1913 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2797 2203 M ! 2418 2000 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2664 2115 M ! 2418 2000 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2129 1765 M ! 289 235 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2664 2115 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2664 2115 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3043 2317 M ! 2797 2203 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2664 2115 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3176 2405 M ! 2797 2203 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3043 2317 M ! 2797 2203 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2508 1967 M ! 289 236 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3043 2317 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3043 2317 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3800 2721 M ! 3176 2405 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3043 2317 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3934 2808 M ! 3176 2405 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3800 2721 M ! 3176 2405 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3266 2372 M ! -90 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3800 2721 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3800 2721 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4558 3125 M ! 3934 2808 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3800 2721 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4692 3213 M ! 3934 2808 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4558 3125 M ! 3934 2808 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4024 2775 M ! -90 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1705 1369 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1705 1369 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2095 1707 M ! 1905 1501 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1504 1238 M ! 401 263 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1705 1369 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2095 1707 M ! 1905 1501 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2284 1913 M ! 2095 1707 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 401 263 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2284 1913 M ! 2095 1707 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4558 3125 M ! 134 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4558 3125 M ! 134 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4938 3327 M ! 4692 3213 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4558 3125 M ! 134 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5071 3415 M ! 4692 3213 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4938 3327 M ! 4692 3213 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4403 2977 M ! 289 236 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2664 2115 M ! 2284 1913 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 401 263 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2664 2115 M ! 2284 1913 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4938 3327 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4938 3327 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5317 3530 M ! 5071 3415 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4938 3327 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5450 3617 M ! 5071 3415 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5317 3530 M ! 5071 3415 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4782 3180 M ! 289 235 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3043 2317 M ! 2664 2115 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! 402 262 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3043 2317 M ! 2664 2115 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5317 3530 M ! 133 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5317 3530 M ! 133 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5506 3736 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5317 3530 M ! 133 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5640 3823 M ! 5450 3617 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5506 3736 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4971 3386 M ! 479 231 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 3043 2317 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3800 2721 M ! 3043 2317 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! 401 262 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3800 2721 M ! 3043 2317 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 3043 2317 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5506 3736 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5506 3736 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5696 3942 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5506 3736 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5830 4029 M ! 5640 3823 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5696 3942 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5696 3942 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 3800 2721 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4558 3125 M ! 3800 2721 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 400 262 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4558 3125 M ! 3800 2721 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 3800 2721 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4938 3327 M ! 4558 3125 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 401 262 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4938 3327 M ! 4558 3125 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5317 3530 M ! 4938 3327 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! 402 262 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5317 3530 M ! 4938 3327 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1504 1238 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1504 1238 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 1705 1369 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1504 1238 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1894 1576 M ! 1705 1369 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 11 -74 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5506 3736 M ! 5317 3530 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! 401 263 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5506 3736 M ! 5317 3530 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 11 -74 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 11 -74 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 1894 1576 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2084 1782 M ! 1894 1576 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 11 -74 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5495 3811 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5696 3942 M ! 5506 3736 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 401 263 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5696 3942 M ! 5506 3736 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5495 3811 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! 2084 1782 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 201 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2463 1984 M ! 2084 1782 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5495 3811 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! 2463 1984 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2842 2186 M ! 2463 1984 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 2842 2186 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 2842 2186 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2590 M ! 2842 2186 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 2842 2186 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 3600 2590 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 3600 2590 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4358 2994 M ! 3600 2590 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 3600 2590 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! 4358 2994 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4737 3196 M ! 4358 2994 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! -178 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! 4737 3196 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5116 3398 M ! 4737 3196 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! -179 -71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1370 1151 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1560 1357 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1370 1151 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 1504 1238 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1694 1444 M ! 1504 1238 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1560 1357 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 5116 3398 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! 200 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5306 3604 M ! 5116 3398 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1560 1357 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1560 1357 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1750 1563 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1560 1357 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 1694 1444 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1883 1650 M ! 1694 1444 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1750 1563 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5295 3679 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5495 3811 M ! 5306 3604 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 201 131 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5495 3811 M ! 5306 3604 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5295 3679 M ! 11 -75 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1750 1563 M ! 133 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1750 1563 M ! 133 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2129 1765 M ! 1883 1650 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1750 1563 M ! 133 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! 1883 1650 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2262 1853 M ! 1883 1650 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2129 1765 M ! 1883 1650 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5295 3679 M ! 200 132 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2129 1765 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2129 1765 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2508 1967 M ! 2262 1853 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2129 1765 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! 2262 1853 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2642 2055 M ! 2262 1853 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2508 1967 M ! 2262 1853 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2508 1967 M ! 134 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2508 1967 M ! 134 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3266 2372 M ! 2642 2055 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2508 1967 M ! 134 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 2642 2055 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2459 M ! 2642 2055 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3266 2372 M ! 2642 2055 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3266 2372 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3266 2372 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4024 2775 M ! 3400 2459 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 3266 2372 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 3400 2459 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4157 2863 M ! 3400 2459 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4024 2775 M ! 3400 2459 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1560 1357 M ! 1370 1151 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1750 1563 M ! 1560 1357 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4024 2775 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4024 2775 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4403 2977 M ! 4157 2863 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4024 2775 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! 4157 2863 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4536 3065 M ! 4157 2863 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4403 2977 M ! 4157 2863 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2129 1765 M ! 1750 1563 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4403 2977 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4403 2977 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4782 3180 M ! 4536 3065 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4403 2977 M ! 133 88 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! 4536 3065 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4916 3267 M ! 4536 3065 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4782 3180 M ! 4536 3065 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 2508 1967 M ! 2129 1765 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4782 3180 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4782 3180 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4971 3386 M ! -55 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4782 3180 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 4916 3267 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5105 3473 M ! 4916 3267 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4971 3386 M ! -55 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3266 2372 M ! 2508 1967 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4971 3386 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4971 3386 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5161 3592 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4971 3386 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5295 3679 M ! 5105 3473 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5295 3679 M ! 5105 3473 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5161 3592 M ! -56 -119 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5161 3592 M ! 134 87 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4024 2775 M ! 3266 2372 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4403 2977 M ! 4024 2775 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4782 3180 M ! 4403 2977 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 4971 3386 M ! 4782 3180 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 5161 3592 M ! 4971 3386 L ! stroke ! LT0 ! 0.00 0.00 1.00 C 1.000 UL LTb ! 5830 1511 M ! 5161 1074 L ! -3791 77 R ! 3791 -77 V ! -3791 77 R 669 437 V 3791 -77 R -3791 77 V *************** *** 515,524 **** 0 2518 V 5830 1511 M 0 2518 V ! 1370 3669 M 669 437 V 3791 -77 R -3791 77 V 1370 1151 M 17 11 V stroke --- 1798,1813 ---- 0 2518 V 5830 1511 M 0 2518 V ! 5161 1074 M ! 0 2518 V ! -3791 77 R 669 437 V 3791 -77 R -3791 77 V + 1370 3669 M + 3791 -77 V + 669 437 R + 5161 3592 L 1370 1151 M 17 11 V stroke *************** *** 722,1063 **** 1.000 UL LTb 1.000 UP - 0.500 UL - LT0 - 0.00 0.00 1.00 C 0.00 0.00 1.00 C 1369 1150 M - 134 87 V - 56 119 V - 1369 1150 L - 134 87 V - 201 131 V - -11 75 V - 1503 1237 L - 201 131 V - 200 132 V - -11 75 V - 1704 1368 L - 200 132 V - 134 87 V - 56 119 V - 1904 1500 L - 1503 1237 L - 190 206 V - -134 -87 V - -56 -119 V - 201 131 V - 189 207 V - 1693 1443 L - 11 -75 V - 200 132 V - 190 206 V - 1893 1575 L - 11 -75 V - 134 87 V - 190 206 V - -134 -87 V - -56 -119 V - 1559 1356 L - 134 87 V - 56 119 V - 1559 1356 L - 134 87 V - 200 132 V - -11 74 V - 1693 1443 L - 200 132 V - 201 131 V - -11 75 V - 1893 1575 L - 201 131 V - 134 87 V - 55 119 V - 2094 1706 L - 1693 1443 L - 189 206 V - -133 -87 V - -56 -119 V - 200 132 V - 190 206 V - 1882 1649 L - 11 -74 V - 201 131 V - 189 206 V - 2083 1781 L - 11 -75 V - 134 87 V - 189 206 V - -134 -87 V - -55 -119 V - 1749 1562 L - 133 87 V - 246 115 V - 1749 1562 L - 133 87 V - 201 132 V - 178 71 V - 1882 1649 L - 201 132 V - 200 131 V - 179 71 V - 2083 1781 L - 200 131 V - 134 87 V - 246 115 V - 2283 1912 L - 1882 1649 L - 379 203 V - -133 -88 V - 1882 1649 L - 201 132 V - 379 202 V - 2261 1852 L - -178 -71 V - 200 131 V - 380 202 V - 2462 1983 L - -179 -71 V - 134 87 V - 379 203 V - -133 -88 V - 2417 1999 L - 2128 1764 L - 133 88 V - 246 114 V - 2128 1764 L - 133 88 V - 201 131 V - 179 71 V - 2261 1852 L - 201 131 V - 201 131 V - 178 71 V - 2462 1983 L - 201 131 V - 133 88 V - 246 114 V - 2663 2114 L - 2261 1852 L - 380 202 V - -134 -88 V - 2261 1852 L - 201 131 V - 379 202 V - 2641 2054 L - -179 -71 V - 201 131 V - 379 202 V - 2841 2185 L - -178 -71 V - 133 88 V - 379 202 V - -133 -88 V - 2796 2202 L - 2507 1966 L - 134 88 V - 624 317 V - 2507 1966 L - 134 88 V - 200 131 V - 558 273 V - 2641 2054 L - 200 131 V - 201 131 V - 558 274 V - 2841 2185 L - 201 131 V - 133 88 V - 625 317 V - 3042 2316 L - 2641 2054 L - 758 404 V - -134 -87 V - 2641 2054 L - 200 131 V - 759 405 V - 3399 2458 L - 2841 2185 L - 201 131 V - 758 405 V - 3600 2590 L - 3042 2316 L - 133 88 V - 759 404 V - -134 -87 V - 3175 2404 L - 90 -33 V - 134 87 V - 625 317 V - 3265 2371 L - 134 87 V - 201 132 V - 557 273 V - 3399 2458 L - 201 132 V - 200 131 V - 558 273 V - 3600 2590 L - 200 131 V - 134 87 V - 624 317 V - 3800 2721 L - 3399 2458 L - 758 405 V - -133 -88 V - 3399 2458 L - 201 132 V - 758 404 V - 4157 2863 L - 3600 2590 L - 200 131 V - 758 404 V - 4358 2994 L - 3800 2721 L - 134 87 V - 758 405 V - -134 -88 V - 3934 2808 L - 90 -33 V - 133 88 V - 246 114 V - 4024 2775 L - 133 88 V - 201 131 V - 178 71 V - 4157 2863 L - 201 131 V - 200 131 V - 179 71 V - 4358 2994 L - 200 131 V - 134 88 V - 246 114 V - 4558 3125 L - 4157 2863 L - 379 202 V - -133 -88 V - 4157 2863 L - 201 131 V - 379 202 V - 4536 3065 L - -178 -71 V - 200 131 V - 380 202 V - 4737 3196 L - -179 -71 V - 134 88 V - 379 202 V - -133 -88 V - 4692 3213 L - 4403 2977 L - 133 88 V - 246 115 V - 4403 2977 L - 133 88 V - 201 131 V - 179 71 V - 4536 3065 L - 201 131 V - 201 131 V - 178 71 V - 4737 3196 L - 201 131 V - 133 88 V - 246 115 V - 4938 3327 L - 4536 3065 L - 380 202 V - -134 -87 V - 4536 3065 L - 201 131 V - 379 202 V - 4916 3267 L - -179 -71 V - 201 131 V - 379 203 V - 5116 3398 L - -178 -71 V - 133 88 V - 379 202 V - -133 -87 V - 5071 3415 L - 4782 3180 L - 134 87 V - 55 119 V - 4782 3180 L - 134 87 V - 200 131 V - -11 75 V - 4916 3267 L - 200 131 V - 201 132 V - -11 74 V - 5116 3398 L - 201 132 V - 133 87 V - 56 119 V - 5317 3530 L - 4916 3267 L - 189 206 V - -134 -87 V - -55 -119 V - 200 131 V - 190 206 V - 5105 3473 L - 11 -75 V - 201 132 V - 189 206 V - 5306 3604 L - 11 -74 V - 133 87 V - 190 206 V - -134 -87 V - -56 -119 V - 4971 3386 L - 134 87 V - 56 119 V - 4971 3386 L - 134 87 V - 201 131 V - -11 75 V - 5105 3473 L - 201 131 V - 200 132 V - -11 75 V - 5306 3604 L - 200 132 V - 134 87 V - 56 119 V - 5506 3736 L - 5105 3473 L - 190 206 V - -134 -87 V - -56 -119 V - 201 131 V - 189 207 V - 5295 3679 L - 11 -75 V - 200 132 V - 190 206 V - 5495 3811 L - 11 -75 V - 134 87 V - 190 206 V - -134 -87 V - -56 -119 V - stroke - 1.000 UL - LTb - 5830 1511 M - 5161 1074 L - -3791 77 R - 3791 -77 V - 0 2518 V - -3791 77 R - 3791 -77 V - 669 437 R - 5161 3592 L - 1.000 UP - stroke grestore % colour palette end stroke grestore --- 2011,2016 ---- Binary files octave-2.9.16/doc/interpreter/grid.pdf and octave-2.9.17/doc/interpreter/grid.pdf differ Binary files octave-2.9.16/doc/interpreter/grid.png and octave-2.9.17/doc/interpreter/grid.png differ diff -cNr octave-2.9.16/doc/interpreter/griddata.eps octave-2.9.17/doc/interpreter/griddata.eps *** octave-2.9.16/doc/interpreter/griddata.eps Wed Oct 31 18:09:30 2007 --- octave-2.9.17/doc/interpreter/griddata.eps Fri Nov 9 21:00:02 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: griddata.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:30 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: griddata.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:02 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:30 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:02 2007) /DOCINFO pdfmark end } ifelse *************** *** 5262,5277 **** 0 -367 V 6299 3579 M 0 -2214 V - 3245 2800 M - 0 -2214 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! 3245 2800 M ! 901 3815 L ! 3245 2800 M ! 3054 779 V 3245 586 M -58 25 V stroke --- 5262,5277 ---- 0 -367 V 6299 3579 M 0 -2214 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! stroke ! LTa ! 3245 586 M ! 901 1601 L ! stroke ! LTb 3245 586 M -58 25 V stroke *************** *** 5284,5289 **** --- 5284,5297 ---- LTb 959 1576 M -58 25 V + stroke + LTa + 3186 1137 M + 1665 1796 L + 4008 781 M + -650 282 V + stroke + LTb 4008 781 M -58 25 V stroke *************** *** 5296,5301 **** --- 5304,5317 ---- LTb 1723 1771 M -58 25 V + stroke + LTa + 3049 1722 M + -620 268 V + 4771 976 M + 3485 1533 L + stroke + LTb 4771 976 M -57 24 V stroke *************** *** 5308,5313 **** --- 5324,5335 ---- LTb 2486 1965 M -57 25 V + stroke + LTa + 5535 1170 M + 3629 1996 L + stroke + LTb 5535 1170 M -58 25 V stroke *************** *** 5317,5322 **** --- 5339,5348 ---- 1.000 UL LTb 1.000 UL + LTa + 6299 1365 M + 4105 2314 L + stroke LTb 6299 1365 M -58 25 V *************** *** 5327,5332 **** --- 5353,5362 ---- 1.000 UL LTb 1.000 UL + LTa + 3245 586 M + 3054 779 V + stroke LTb 3245 586 M 50 13 V *************** *** 5340,5345 **** --- 5370,5383 ---- LTb 6249 1352 M 50 13 V + stroke + LTa + 3346 1015 M + 2367 603 V + 2659 840 M + 558 142 V + stroke + LTb 2659 840 M 50 13 V stroke *************** *** 5352,5357 **** --- 5390,5403 ---- LTb 5663 1606 M 50 12 V + stroke + LTa + 2073 1094 M + 1064 271 V + 323 82 R + 1667 425 V + stroke + LTb 2073 1094 M 50 12 V stroke *************** *** 5364,5369 **** --- 5410,5423 ---- LTb 5077 1859 M 50 13 V + stroke + LTa + 1487 1347 M + 1556 397 V + 550 140 R + 948 242 V + stroke + LTb 1487 1347 M 50 13 V stroke *************** *** 5376,5381 **** --- 5430,5441 ---- LTb 4491 2113 M 50 13 V + stroke + LTa + 901 1601 M + 2047 521 V + stroke + LTb 901 1601 M 50 13 V stroke *************** *** 5385,5390 **** --- 5445,5456 ---- 1.000 UL LTb 1.000 UL + LTa + 901 1601 M + 2047 521 V + 6299 1365 M + 4105 2314 L + stroke LTb 964 1601 M -63 0 V *************** *** 5395,5400 **** --- 5461,5478 ---- 1.000 UL LTb 1.000 UL + LTa + 1158 1983 M + 1712 436 V + 901 1917 M + 247 63 V + 6299 1681 M + -240 104 V + -37 16 R + -2 1 V + -2 1 R + 4326 2535 L + stroke LTb 964 1917 M -63 0 V *************** *** 5405,5410 **** --- 5483,5500 ---- 1.000 UL LTb 1.000 UL + LTa + 1249 2322 M + 1491 380 V + 901 2234 M + 330 84 V + 6299 1998 M + -311 134 V + -28 13 R + -2 0 V + -59 26 R + 4511 2771 L + stroke LTb 964 2234 M -63 0 V *************** *** 5415,5420 **** --- 5505,5522 ---- 1.000 UL LTb 1.000 UL + LTa + 1353 2664 M + 1195 305 V + 901 2550 M + 418 106 V + 6299 2314 M + -390 169 V + -63 27 R + -2 1 V + -84 36 R + 4683 3013 L + stroke LTb 964 2550 M -63 0 V *************** *** 5425,5430 **** --- 5527,5546 ---- 1.000 UL LTb 1.000 UL + LTa + 1467 3010 M + 856 218 V + 901 2866 M + 521 132 V + 3358 289 R + -1 1 V + 6299 2630 M + -474 205 V + -32 13 R + -1 1 V + -257 111 R + -627 272 V + stroke LTb 964 2866 M -63 0 V *************** *** 5435,5440 **** --- 5551,5576 ---- 1.000 UL LTb 1.000 UL + LTa + 1622 3366 M + 2 0 V + 1698 433 R + 2 1 V + 2123 3494 M + 3 0 V + -125 -31 R + 7 1 V + 901 3182 M + 643 164 V + 2989 365 R + -6 2 V + 232 -100 R + -4 2 V + 6299 2946 M + -593 257 V + -503 218 R + -12 5 V + stroke LTb 964 3182 M -63 0 V *************** *** 5445,5450 **** --- 5581,5602 ---- 1.000 UL LTb 1.000 UL + LTa + 3794 4236 M + 161 41 V + 3063 4050 M + 7 2 V + 901 3499 M + 848 216 V + 2324 511 R + -118 51 V + 5142 3763 M + -7 4 V + 6299 3263 M + -766 331 V + -193 84 R + -4 1 V + stroke LTb 964 3499 M -63 0 V *************** *** 5455,5460 **** --- 5607,5618 ---- 1.000 UL LTb 1.000 UL + LTa + 901 3815 M + 3054 779 V + 6299 3579 M + 3955 4594 L + stroke LTb 964 3815 M -63 0 V Binary files octave-2.9.16/doc/interpreter/griddata.pdf and octave-2.9.17/doc/interpreter/griddata.pdf differ Binary files octave-2.9.16/doc/interpreter/griddata.png and octave-2.9.17/doc/interpreter/griddata.png differ diff -cNr octave-2.9.16/doc/interpreter/hist.eps octave-2.9.17/doc/interpreter/hist.eps *** octave-2.9.16/doc/interpreter/hist.eps Wed Oct 31 18:09:41 2007 --- octave-2.9.17/doc/interpreter/hist.eps Fri Nov 9 21:00:13 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: hist.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:41 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: hist.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:13 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:41 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:13 2007) /DOCINFO pdfmark end } ifelse *************** *** 503,1076 **** } ifelse 1.000 UL LTb ! 574 280 M 63 0 V ! 6325 0 R -63 0 V stroke ! 490 280 M [ [(Helvetica) 140.0 0.0 true true 0 (0)] ] -46.7 MRshow 1.000 UL LTb ! 574 1198 M 63 0 V ! 6325 0 R -63 0 V stroke ! 490 1198 M [ [(Helvetica) 140.0 0.0 true true 0 (200)] ] -46.7 MRshow 1.000 UL LTb ! 574 2117 M 63 0 V ! 6325 0 R -63 0 V stroke ! 490 2117 M [ [(Helvetica) 140.0 0.0 true true 0 (400)] ] -46.7 MRshow 1.000 UL LTb ! 574 3035 M 63 0 V ! 6325 0 R -63 0 V stroke ! 490 3035 M [ [(Helvetica) 140.0 0.0 true true 0 (600)] ] -46.7 MRshow 1.000 UL LTb ! 574 3954 M 63 0 V ! 6325 0 R -63 0 V stroke ! 490 3954 M [ [(Helvetica) 140.0 0.0 true true 0 (800)] ] -46.7 MRshow 1.000 UL LTb ! 574 4872 M 63 0 V ! 6325 0 R -63 0 V stroke ! 490 4872 M ! [ [(Helvetica) 140.0 0.0 true true 0 (1000)] ] -46.7 MRshow 1.000 UL LTb ! 1255 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 1255 140 M [ [(Helvetica) 140.0 0.0 true true 0 (-3)] ] -46.7 MCshow 1.000 UL LTb ! 2107 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 2107 140 M [ [(Helvetica) 140.0 0.0 true true 0 (-2)] ] -46.7 MCshow 1.000 UL LTb ! 2959 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 2959 140 M [ [(Helvetica) 140.0 0.0 true true 0 (-1)] ] -46.7 MCshow 1.000 UL LTb ! 3811 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 3811 140 M [ [(Helvetica) 140.0 0.0 true true 0 (0)] ] -46.7 MCshow 1.000 UL LTb ! 4662 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 4662 140 M [ [(Helvetica) 140.0 0.0 true true 0 (1)] ] -46.7 MCshow 1.000 UL LTb ! 5514 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 5514 140 M [ [(Helvetica) 140.0 0.0 true true 0 (2)] ] -46.7 MCshow 1.000 UL LTb ! 6366 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 6366 140 M [ [(Helvetica) 140.0 0.0 true true 0 (3)] ] -46.7 MCshow 1.000 UL LTb 1.000 UL LTb ! 574 4872 N ! 574 280 L ! 6388 0 V 0 4592 V ! -6388 0 V Z stroke 1.000 UP 1.000 UL LTb 1.000 UL LT0 ! 1.00 0.00 0.00 C gsave 612 280 N 0 0 V 0 14 V 211 0 V 0 -14 V 1 PolyFill ! 612 280 M ! 0 14 V ! 211 0 V ! 0 -14 V stroke LT1 ! 0.00 0.00 0.00 C 612 280 M ! 0 14 V ! 211 0 V ! 0 -14 V ! -211 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 823 280 N 0 0 V 0 9 V 210 0 V 0 -9 V 1 PolyFill ! 823 280 M ! 0 9 V ! 210 0 V ! 0 -9 V stroke LT3 ! 0.00 0.00 0.00 C 823 280 M ! 0 9 V ! 210 0 V ! 0 -9 V ! -210 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 1033 280 N 0 0 V 0 46 V 210 0 V 0 -46 V 1 PolyFill ! 1033 280 M ! 0 46 V ! 210 0 V ! 0 -46 V stroke LT5 ! 0.00 0.00 0.00 C 1033 280 M ! 0 46 V ! 210 0 V ! 0 -46 V ! -210 0 V stroke LT6 ! 1.00 0.00 0.00 C gsave 1243 280 N 0 0 V 0 92 V 211 0 V 0 -92 V 1 PolyFill ! 1243 280 M ! 0 92 V ! 211 0 V ! 0 -92 V stroke LT7 ! 0.00 0.00 0.00 C 1243 280 M ! 0 92 V ! 211 0 V ! 0 -92 V ! -211 0 V stroke LT8 ! 1.00 0.00 0.00 C gsave 1454 280 N 0 0 V 0 115 V 210 0 V 0 -115 V 1 PolyFill ! 1454 280 M ! 0 115 V ! 210 0 V ! 0 -115 V stroke LT0 ! 0.00 0.00 0.00 C 1454 280 M ! 0 115 V ! 210 0 V ! 0 -115 V ! -210 0 V stroke LT1 ! 1.00 0.00 0.00 C gsave 1664 280 N 0 0 V 0 216 V 210 0 V 0 -216 V 1 PolyFill ! 1664 280 M ! 0 216 V ! 210 0 V ! 0 -216 V stroke LT2 ! 0.00 0.00 0.00 C 1664 280 M ! 0 216 V ! 210 0 V ! 0 -216 V ! -210 0 V stroke LT3 ! 1.00 0.00 0.00 C gsave 1874 280 N 0 0 V 0 432 V 211 0 V 0 -432 V 1 PolyFill ! 1874 280 M ! 0 432 V ! 211 0 V ! 0 -432 V stroke LT4 ! 0.00 0.00 0.00 C 1874 280 M ! 0 432 V ! 211 0 V ! 0 -432 V ! -211 0 V stroke LT5 ! 1.00 0.00 0.00 C gsave 2085 280 N 0 0 V 0 716 V 210 0 V 0 -716 V 1 PolyFill ! 2085 280 M ! 0 716 V ! 210 0 V ! 0 -716 V stroke LT6 ! 0.00 0.00 0.00 C 2085 280 M ! 0 716 V ! 210 0 V ! 0 -716 V ! -210 0 V stroke LT7 ! 1.00 0.00 0.00 C gsave 2295 280 N 0 0 V 0 1254 V 210 0 V 0 -1254 V 1 PolyFill ! 2295 280 M ! 0 1254 V ! 210 0 V ! 0 -1254 V stroke LT8 ! 0.00 0.00 0.00 C 2295 280 M ! 0 1254 V ! 210 0 V ! 0 -1254 V ! -210 0 V stroke LT0 ! 1.00 0.00 0.00 C gsave 2505 280 N 0 0 V 0 1828 V 211 0 V 0 -1828 V 1 PolyFill ! 2505 280 M ! 0 1828 V ! 211 0 V ! 0 -1828 V stroke LT1 ! 0.00 0.00 0.00 C 2505 280 M ! 0 1828 V ! 211 0 V ! 0 -1828 V ! -211 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 2716 280 N 0 0 V 0 2475 V 210 0 V 0 -2475 V 1 PolyFill ! 2716 280 M ! 0 2475 V ! 210 0 V ! 0 -2475 V stroke LT3 ! 0.00 0.00 0.00 C 2716 280 M ! 0 2475 V ! 210 0 V ! 0 -2475 V ! -210 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 2926 280 N 0 0 V 0 3049 V 210 0 V 0 -3049 V 1 PolyFill ! 2926 280 M ! 0 3049 V ! 210 0 V ! 0 -3049 V stroke LT5 ! 0.00 0.00 0.00 C 2926 280 M ! 0 3049 V ! 210 0 V ! 0 -3049 V ! -210 0 V stroke LT6 ! 1.00 0.00 0.00 C gsave 3136 280 N 0 0 V 0 3527 V 211 0 V 0 -3527 V 1 PolyFill ! 3136 280 M ! 0 3527 V ! 211 0 V ! 0 -3527 V stroke LT7 ! 0.00 0.00 0.00 C 3136 280 M ! 0 3527 V ! 211 0 V ! 0 -3527 V ! -211 0 V stroke LT8 ! 1.00 0.00 0.00 C gsave 3347 280 N 0 0 V 0 4004 V 210 0 V 0 -4004 V 1 PolyFill ! 3347 280 M ! 0 4004 V ! 210 0 V ! 0 -4004 V stroke LT0 ! 0.00 0.00 0.00 C 3347 280 M ! 0 4004 V ! 210 0 V ! 0 -4004 V ! -210 0 V stroke LT1 ! 1.00 0.00 0.00 C gsave 3557 280 N 0 0 V 0 4427 V 210 0 V 0 -4427 V 1 PolyFill ! 3557 280 M ! 0 4427 V ! 210 0 V ! 0 -4427 V stroke LT2 ! 0.00 0.00 0.00 C 3557 280 M ! 0 4427 V ! 210 0 V ! 0 -4427 V ! -210 0 V stroke LT3 ! 1.00 0.00 0.00 C gsave 3767 280 N 0 0 V 0 4592 V 211 0 V 0 -4592 V 1 PolyFill ! 3767 280 M ! 0 4592 V ! 211 0 V ! 0 -4592 V stroke LT4 ! 0.00 0.00 0.00 C 3767 280 M ! 0 4592 V ! 211 0 V ! 0 -4592 V ! -211 0 V stroke LT5 ! 1.00 0.00 0.00 C gsave 3978 280 N 0 0 V 0 4229 V 210 0 V 0 -4229 V 1 PolyFill ! 3978 280 M ! 0 4229 V ! 210 0 V ! 0 -4229 V stroke LT6 ! 0.00 0.00 0.00 C 3978 280 M ! 0 4229 V ! 210 0 V ! 0 -4229 V ! -210 0 V stroke LT7 ! 1.00 0.00 0.00 C gsave 4188 280 N 0 0 V 0 3830 V 211 0 V 0 -3830 V 1 PolyFill ! 4188 280 M ! 0 3830 V ! 211 0 V ! 0 -3830 V stroke LT8 ! 0.00 0.00 0.00 C 4188 280 M ! 0 3830 V ! 211 0 V ! 0 -3830 V ! -211 0 V stroke LT0 ! 1.00 0.00 0.00 C gsave 4399 280 N 0 0 V 0 3150 V 210 0 V 0 -3150 V 1 PolyFill ! 4399 280 M ! 0 3150 V ! 210 0 V ! 0 -3150 V stroke LT1 ! 0.00 0.00 0.00 C 4399 280 M ! 0 3150 V ! 210 0 V ! 0 -3150 V ! -210 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 4609 280 N 0 0 V 0 2599 V 210 0 V 0 -2599 V 1 PolyFill ! 4609 280 M ! 0 2599 V ! 210 0 V ! 0 -2599 V stroke LT3 ! 0.00 0.00 0.00 C 4609 280 M ! 0 2599 V ! 210 0 V ! 0 -2599 V ! -210 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 4819 280 N 0 0 V 0 1906 V 211 0 V 0 -1906 V 1 PolyFill ! 4819 280 M ! 0 1906 V ! 211 0 V ! 0 -1906 V stroke LT5 ! 0.00 0.00 0.00 C 4819 280 M ! 0 1906 V ! 211 0 V ! 0 -1906 V ! -211 0 V stroke LT6 ! 1.00 0.00 0.00 C gsave 5030 280 N 0 0 V 0 1295 V 210 0 V 0 -1295 V 1 PolyFill ! 5030 280 M ! 0 1295 V ! 210 0 V ! 0 -1295 V stroke LT7 ! 0.00 0.00 0.00 C 5030 280 M ! 0 1295 V ! 210 0 V ! 0 -1295 V ! -210 0 V stroke LT8 ! 1.00 0.00 0.00 C gsave 5240 280 N 0 0 V 0 914 V 210 0 V 0 -914 V 1 PolyFill ! 5240 280 M ! 0 914 V ! 210 0 V ! 0 -914 V stroke LT0 ! 0.00 0.00 0.00 C 5240 280 M ! 0 914 V ! 210 0 V ! 0 -914 V ! -210 0 V stroke LT1 ! 1.00 0.00 0.00 C gsave 5450 280 N 0 0 V 0 556 V 211 0 V 0 -556 V 1 PolyFill ! 5450 280 M ! 0 556 V ! 211 0 V ! 0 -556 V stroke LT2 ! 0.00 0.00 0.00 C 5450 280 M ! 0 556 V ! 211 0 V ! 0 -556 V ! -211 0 V stroke LT3 ! 1.00 0.00 0.00 C gsave 5661 280 N 0 0 V 0 257 V 210 0 V 0 -257 V 1 PolyFill ! 5661 280 M ! 0 257 V ! 210 0 V ! 0 -257 V stroke LT4 ! 0.00 0.00 0.00 C 5661 280 M ! 0 257 V ! 210 0 V ! 0 -257 V ! -210 0 V stroke LT5 ! 1.00 0.00 0.00 C gsave 5871 280 N 0 0 V 0 193 V 210 0 V 0 -193 V 1 PolyFill ! 5871 280 M ! 0 193 V ! 210 0 V ! 0 -193 V stroke LT6 ! 0.00 0.00 0.00 C 5871 280 M ! 0 193 V ! 210 0 V ! 0 -193 V ! -210 0 V stroke LT7 ! 1.00 0.00 0.00 C gsave 6081 280 N 0 0 V 0 110 V 211 0 V 0 -110 V 1 PolyFill ! 6081 280 M ! 0 110 V ! 211 0 V ! 0 -110 V stroke LT8 ! 0.00 0.00 0.00 C 6081 280 M ! 0 110 V ! 211 0 V ! 0 -110 V ! -211 0 V stroke LT0 ! 1.00 0.00 0.00 C gsave 6292 280 N 0 0 V 0 55 V 210 0 V 0 -55 V 1 PolyFill ! 6292 280 M ! 0 55 V ! 210 0 V ! 0 -55 V stroke LT1 ! 0.00 0.00 0.00 C 6292 280 M ! 0 55 V ! 210 0 V ! 0 -55 V ! -210 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 6502 280 N 0 0 V 0 23 V 210 0 V 0 -23 V 1 PolyFill ! 6502 280 M ! 0 23 V ! 210 0 V ! 0 -23 V stroke LT3 ! 0.00 0.00 0.00 C 6502 280 M ! 0 23 V ! 210 0 V ! 0 -23 V ! -210 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 6712 280 N 0 0 V 0 9 V 211 0 V 0 -9 V 1 PolyFill ! 6712 280 M ! 0 9 V ! 211 0 V ! 0 -9 V stroke LT5 ! 0.00 0.00 0.00 C 6712 280 M ! 0 9 V ! 211 0 V ! 0 -9 V ! -211 0 V stroke LTb ! 574 4872 N ! 574 280 L ! 6388 0 V 0 4592 V ! -6388 0 V Z stroke 1.000 UP 1.000 UL --- 503,1116 ---- } ifelse 1.000 UL LTb ! 490 280 M 63 0 V ! 6409 0 R -63 0 V stroke ! 406 280 M [ [(Helvetica) 140.0 0.0 true true 0 (0)] ] -46.7 MRshow 1.000 UL LTb ! 490 763 M ! 63 0 V ! 6409 0 R ! -63 0 V ! stroke ! 406 763 M ! [ [(Helvetica) 140.0 0.0 true true 0 (100)] ! ] -46.7 MRshow ! 1.000 UL ! LTb ! 490 1247 M 63 0 V ! 6409 0 R -63 0 V stroke ! 406 1247 M [ [(Helvetica) 140.0 0.0 true true 0 (200)] ] -46.7 MRshow 1.000 UL LTb ! 490 1730 M 63 0 V ! 6409 0 R -63 0 V stroke ! 406 1730 M ! [ [(Helvetica) 140.0 0.0 true true 0 (300)] ! ] -46.7 MRshow ! 1.000 UL ! LTb ! 490 2213 M ! 63 0 V ! 6409 0 R ! -63 0 V ! stroke ! 406 2213 M [ [(Helvetica) 140.0 0.0 true true 0 (400)] ] -46.7 MRshow 1.000 UL LTb ! 490 2697 M ! 63 0 V ! 6409 0 R ! -63 0 V ! stroke ! 406 2697 M ! [ [(Helvetica) 140.0 0.0 true true 0 (500)] ! ] -46.7 MRshow ! 1.000 UL ! LTb ! 490 3180 M 63 0 V ! 6409 0 R -63 0 V stroke ! 406 3180 M [ [(Helvetica) 140.0 0.0 true true 0 (600)] ] -46.7 MRshow 1.000 UL LTb ! 490 3664 M ! 63 0 V ! 6409 0 R ! -63 0 V ! stroke ! 406 3664 M ! [ [(Helvetica) 140.0 0.0 true true 0 (700)] ! ] -46.7 MRshow ! 1.000 UL ! LTb ! 490 4147 M 63 0 V ! 6409 0 R -63 0 V stroke ! 406 4147 M [ [(Helvetica) 140.0 0.0 true true 0 (800)] ] -46.7 MRshow 1.000 UL LTb ! 490 4630 M 63 0 V ! 6409 0 R -63 0 V stroke ! 406 4630 M ! [ [(Helvetica) 140.0 0.0 true true 0 (900)] ] -46.7 MRshow 1.000 UL LTb ! 1037 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 1037 140 M [ [(Helvetica) 140.0 0.0 true true 0 (-3)] ] -46.7 MCshow 1.000 UL LTb ! 1948 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 1948 140 M [ [(Helvetica) 140.0 0.0 true true 0 (-2)] ] -46.7 MCshow 1.000 UL LTb ! 2860 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 2860 140 M [ [(Helvetica) 140.0 0.0 true true 0 (-1)] ] -46.7 MCshow 1.000 UL LTb ! 3772 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 3772 140 M [ [(Helvetica) 140.0 0.0 true true 0 (0)] ] -46.7 MCshow 1.000 UL LTb ! 4683 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 4683 140 M [ [(Helvetica) 140.0 0.0 true true 0 (1)] ] -46.7 MCshow 1.000 UL LTb ! 5595 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 5595 140 M [ [(Helvetica) 140.0 0.0 true true 0 (2)] ] -46.7 MCshow 1.000 UL LTb ! 6506 280 M 0 63 V 0 4529 R 0 -63 V stroke ! 6506 140 M [ [(Helvetica) 140.0 0.0 true true 0 (3)] ] -46.7 MCshow 1.000 UL LTb 1.000 UL LTb ! 490 4872 N ! 490 280 L ! 6472 0 V 0 4592 V ! -6472 0 V Z stroke 1.000 UP 1.000 UL LTb 1.000 UL LT0 ! 1.00 0.00 0.00 C gsave 509 280 N 0 0 V 0 15 V 214 0 V 0 -15 V 1 PolyFill ! 509 280 M ! 0 15 V ! 214 0 V ! 0 -15 V stroke LT1 ! 0.00 0.00 0.00 C 509 280 M ! 0 15 V ! 214 0 V ! 0 -15 V ! -214 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 723 280 N 0 0 V 0 29 V 214 0 V 0 -29 V 1 PolyFill ! 723 280 M ! 0 29 V ! 214 0 V ! 0 -29 V stroke LT3 ! 0.00 0.00 0.00 C 723 280 M ! 0 29 V ! 214 0 V ! 0 -29 V ! -214 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 937 280 N 0 0 V 0 63 V 215 0 V 0 -63 V 1 PolyFill ! 937 280 M ! 0 63 V ! 215 0 V ! 0 -63 V stroke LT5 ! 0.00 0.00 0.00 C 937 280 M ! 0 63 V ! 215 0 V ! 0 -63 V ! -215 0 V stroke LT6 ! 1.00 0.00 0.00 C gsave 1152 280 N 0 0 V 0 111 V 214 0 V 0 -111 V 1 PolyFill ! 1152 280 M ! 0 111 V ! 214 0 V ! 0 -111 V stroke LT7 ! 0.00 0.00 0.00 C 1152 280 M ! 0 111 V ! 214 0 V ! 0 -111 V ! -214 0 V stroke LT8 ! 1.00 0.00 0.00 C gsave 1366 280 N 0 0 V 0 160 V 214 0 V 0 -160 V 1 PolyFill ! 1366 280 M ! 0 160 V ! 214 0 V ! 0 -160 V stroke LT0 ! 0.00 0.00 0.00 C 1366 280 M ! 0 160 V ! 214 0 V ! 0 -160 V ! -214 0 V stroke LT1 ! 1.00 0.00 0.00 C gsave 1580 280 N 0 0 V 0 396 V 215 0 V 0 -396 V 1 PolyFill ! 1580 280 M ! 0 396 V ! 215 0 V ! 0 -396 V stroke LT2 ! 0.00 0.00 0.00 C 1580 280 M ! 0 396 V ! 215 0 V ! 0 -396 V ! -215 0 V stroke LT3 ! 1.00 0.00 0.00 C gsave 1795 280 N 0 0 V 0 643 V 214 0 V 0 -643 V 1 PolyFill ! 1795 280 M ! 0 643 V ! 214 0 V ! 0 -643 V stroke LT4 ! 0.00 0.00 0.00 C 1795 280 M ! 0 643 V ! 214 0 V ! 0 -643 V ! -214 0 V stroke LT5 ! 1.00 0.00 0.00 C gsave 2009 280 N 0 0 V 0 904 V 214 0 V 0 -904 V 1 PolyFill ! 2009 280 M ! 0 904 V ! 214 0 V ! 0 -904 V stroke LT6 ! 0.00 0.00 0.00 C 2009 280 M ! 0 904 V ! 214 0 V ! 0 -904 V ! -214 0 V stroke LT7 ! 1.00 0.00 0.00 C gsave 2223 280 N 0 0 V 0 1334 V 214 0 V 0 -1334 V 1 PolyFill ! 2223 280 M ! 0 1334 V ! 214 0 V ! 0 -1334 V stroke LT8 ! 0.00 0.00 0.00 C 2223 280 M ! 0 1334 V ! 214 0 V ! 0 -1334 V ! -214 0 V stroke LT0 ! 1.00 0.00 0.00 C gsave 2437 280 N 0 0 V 0 1822 V 215 0 V 0 -1822 V 1 PolyFill ! 2437 280 M ! 0 1822 V ! 215 0 V ! 0 -1822 V stroke LT1 ! 0.00 0.00 0.00 C 2437 280 M ! 0 1822 V ! 215 0 V ! 0 -1822 V ! -215 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 2652 280 N 0 0 V 0 2320 V 214 0 V 0 -2320 V 1 PolyFill ! 2652 280 M ! 0 2320 V ! 214 0 V ! 0 -2320 V stroke LT3 ! 0.00 0.00 0.00 C 2652 280 M ! 0 2320 V ! 214 0 V ! 0 -2320 V ! -214 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 2866 280 N 0 0 V 0 3016 V 214 0 V 0 -3016 V 1 PolyFill ! 2866 280 M ! 0 3016 V ! 214 0 V ! 0 -3016 V stroke LT5 ! 0.00 0.00 0.00 C 2866 280 M ! 0 3016 V ! 214 0 V ! 0 -3016 V ! -214 0 V stroke LT6 ! 1.00 0.00 0.00 C gsave 3080 280 N 0 0 V 0 3582 V 215 0 V 0 -3582 V 1 PolyFill ! 3080 280 M ! 0 3582 V ! 215 0 V ! 0 -3582 V stroke LT7 ! 0.00 0.00 0.00 C 3080 280 M ! 0 3582 V ! 215 0 V ! 0 -3582 V ! -215 0 V stroke LT8 ! 1.00 0.00 0.00 C gsave 3295 280 N 0 0 V 0 4297 V 214 0 V 0 -4297 V 1 PolyFill ! 3295 280 M ! 0 4297 V ! 214 0 V ! 0 -4297 V stroke LT0 ! 0.00 0.00 0.00 C 3295 280 M ! 0 4297 V ! 214 0 V ! 0 -4297 V ! -214 0 V stroke LT1 ! 1.00 0.00 0.00 C gsave 3509 280 N 0 0 V 0 4582 V 214 0 V 0 -4582 V 1 PolyFill ! 3509 280 M ! 0 4582 V ! 214 0 V ! 0 -4582 V stroke LT2 ! 0.00 0.00 0.00 C 3509 280 M ! 0 4582 V ! 214 0 V ! 0 -4582 V ! -214 0 V stroke LT3 ! 1.00 0.00 0.00 C gsave 3723 280 N 0 0 V 0 4350 V 214 0 V 0 -4350 V 1 PolyFill ! 3723 280 M ! 0 4350 V ! 214 0 V ! 0 -4350 V stroke LT4 ! 0.00 0.00 0.00 C 3723 280 M ! 0 4350 V ! 214 0 V ! 0 -4350 V ! -214 0 V stroke LT5 ! 1.00 0.00 0.00 C gsave 3937 280 N 0 0 V 0 4254 V 215 0 V 0 -4254 V 1 PolyFill ! 3937 280 M ! 0 4254 V ! 215 0 V ! 0 -4254 V stroke LT6 ! 0.00 0.00 0.00 C 3937 280 M ! 0 4254 V ! 215 0 V ! 0 -4254 V ! -215 0 V stroke LT7 ! 1.00 0.00 0.00 C gsave 4152 280 N 0 0 V 0 3891 V 214 0 V 0 -3891 V 1 PolyFill ! 4152 280 M ! 0 3891 V ! 214 0 V ! 0 -3891 V stroke LT8 ! 0.00 0.00 0.00 C 4152 280 M ! 0 3891 V ! 214 0 V ! 0 -3891 V ! -214 0 V stroke LT0 ! 1.00 0.00 0.00 C gsave 4366 280 N 0 0 V 0 3413 V 214 0 V 0 -3413 V 1 PolyFill ! 4366 280 M ! 0 3413 V ! 214 0 V ! 0 -3413 V stroke LT1 ! 0.00 0.00 0.00 C 4366 280 M ! 0 3413 V ! 214 0 V ! 0 -3413 V ! -214 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 4580 280 N 0 0 V 0 2828 V 215 0 V 0 -2828 V 1 PolyFill ! 4580 280 M ! 0 2828 V ! 215 0 V ! 0 -2828 V stroke LT3 ! 0.00 0.00 0.00 C 4580 280 M ! 0 2828 V ! 215 0 V ! 0 -2828 V ! -215 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 4795 280 N 0 0 V 0 2165 V 214 0 V 0 -2165 V 1 PolyFill ! 4795 280 M ! 0 2165 V ! 214 0 V ! 0 -2165 V stroke LT5 ! 0.00 0.00 0.00 C 4795 280 M ! 0 2165 V ! 214 0 V ! 0 -2165 V ! -214 0 V stroke LT6 ! 1.00 0.00 0.00 C gsave 5009 280 N 0 0 V 0 1547 V 214 0 V 0 -1547 V 1 PolyFill ! 5009 280 M ! 0 1547 V ! 214 0 V ! 0 -1547 V stroke LT7 ! 0.00 0.00 0.00 C 5009 280 M ! 0 1547 V ! 214 0 V ! 0 -1547 V ! -214 0 V stroke LT8 ! 1.00 0.00 0.00 C gsave 5223 280 N 0 0 V 0 996 V 214 0 V 0 -996 V 1 PolyFill ! 5223 280 M ! 0 996 V ! 214 0 V ! 0 -996 V stroke LT0 ! 0.00 0.00 0.00 C 5223 280 M ! 0 996 V ! 214 0 V ! 0 -996 V ! -214 0 V stroke LT1 ! 1.00 0.00 0.00 C gsave 5437 280 N 0 0 V 0 715 V 215 0 V 0 -715 V 1 PolyFill ! 5437 280 M ! 0 715 V ! 215 0 V ! 0 -715 V stroke LT2 ! 0.00 0.00 0.00 C 5437 280 M ! 0 715 V ! 215 0 V ! 0 -715 V ! -215 0 V stroke LT3 ! 1.00 0.00 0.00 C gsave 5652 280 N 0 0 V 0 406 V 214 0 V 0 -406 V 1 PolyFill ! 5652 280 M ! 0 406 V ! 214 0 V ! 0 -406 V stroke LT4 ! 0.00 0.00 0.00 C 5652 280 M ! 0 406 V ! 214 0 V ! 0 -406 V ! -214 0 V stroke LT5 ! 1.00 0.00 0.00 C gsave 5866 280 N 0 0 V 0 266 V 214 0 V 0 -266 V 1 PolyFill ! 5866 280 M ! 0 266 V ! 214 0 V ! 0 -266 V stroke LT6 ! 0.00 0.00 0.00 C 5866 280 M ! 0 266 V ! 214 0 V ! 0 -266 V ! -214 0 V stroke LT7 ! 1.00 0.00 0.00 C gsave 6080 280 N 0 0 V 0 102 V 215 0 V 0 -102 V 1 PolyFill ! 6080 280 M ! 0 102 V ! 215 0 V ! 0 -102 V stroke LT8 ! 0.00 0.00 0.00 C 6080 280 M ! 0 102 V ! 215 0 V ! 0 -102 V ! -215 0 V stroke LT0 ! 1.00 0.00 0.00 C gsave 6295 280 N 0 0 V 0 87 V 214 0 V 0 -87 V 1 PolyFill ! 6295 280 M ! 0 87 V ! 214 0 V ! 0 -87 V stroke LT1 ! 0.00 0.00 0.00 C 6295 280 M ! 0 87 V ! 214 0 V ! 0 -87 V ! -214 0 V stroke LT2 ! 1.00 0.00 0.00 C gsave 6509 280 N 0 0 V 0 24 V 214 0 V 0 -24 V 1 PolyFill ! 6509 280 M ! 0 24 V ! 214 0 V ! 0 -24 V stroke LT3 ! 0.00 0.00 0.00 C 6509 280 M ! 0 24 V ! 214 0 V ! 0 -24 V ! -214 0 V stroke LT4 ! 1.00 0.00 0.00 C gsave 6723 280 N 0 0 V 0 19 V 215 0 V 0 -19 V 1 PolyFill ! 6723 280 M ! 0 19 V ! 215 0 V ! 0 -19 V stroke LT5 ! 0.00 0.00 0.00 C 6723 280 M ! 0 19 V ! 215 0 V ! 0 -19 V ! -215 0 V stroke LTb ! 490 4872 N ! 490 280 L ! 6472 0 V 0 4592 V ! -6472 0 V Z stroke 1.000 UP 1.000 UL Binary files octave-2.9.16/doc/interpreter/hist.pdf and octave-2.9.17/doc/interpreter/hist.pdf differ Binary files octave-2.9.16/doc/interpreter/hist.png and octave-2.9.17/doc/interpreter/hist.png differ diff -cNr octave-2.9.16/doc/interpreter/inpolygon.eps octave-2.9.17/doc/interpreter/inpolygon.eps *** octave-2.9.16/doc/interpreter/inpolygon.eps Wed Oct 31 18:09:37 2007 --- octave-2.9.17/doc/interpreter/inpolygon.eps Fri Nov 9 21:00:08 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: inpolygon.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:37 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: inpolygon.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:08 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:37 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:08 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/inpolygon.pdf and octave-2.9.17/doc/interpreter/inpolygon.pdf differ diff -cNr octave-2.9.16/doc/interpreter/install.texi octave-2.9.17/doc/interpreter/install.texi *** octave-2.9.16/doc/interpreter/install.texi Wed Oct 31 18:11:03 2007 --- octave-2.9.17/doc/interpreter/install.texi Sat Nov 10 00:59:56 2007 *************** *** 35,40 **** --- 35,44 ---- under the terms of the GNU General Public License as published by the Free Software Foundation. + @strong{Note:} This file is automatically generated from + @file{doc/interpreter/install.txi} in the Octave sources, so to make + changes to this documenation file, change that source file. + @node Installation @chapter Installing Octave @end ifset *************** *** 468,471 **** --- 472,487 ---- modify Octave's configuration script to automatically determine the proper thing to do. + @item + If Octave is unable to find a header file because it is installed in a + location that is not normally searched by the compiler, you can add the + directory to the include search path by specifying (for example) + @code{CPPFLAGS=-I/some/nonstandard/directory} as an argument to + @code{configure}. Other variables that can be specified this way are + @code{CFLAGS}, @code{CXXFLAGS}, @code{FFLAGS}, and @code{LDFLAGS}. + Passing them as options to the configure script also records them in the + @file{config.status} file. By default, @code{CPPFLAGS} and + @code{LDFLAGS} are empty, @code{CFLAGS} and @code{CXXFLAGS} are set to + @code{"-g -O"} and @code{FFLAGS} is set to @code{"-O"}. + @end itemize diff -cNr octave-2.9.16/doc/interpreter/install.txi octave-2.9.17/doc/interpreter/install.txi *** octave-2.9.16/doc/interpreter/install.txi Wed Oct 31 17:29:24 2007 --- octave-2.9.17/doc/interpreter/install.txi Fri Nov 9 12:37:24 2007 *************** *** 33,38 **** --- 33,42 ---- under the terms of the GNU General Public License as published by the Free Software Foundation. + @strong{Note:} This file is automatically generated from + @file{doc/interpreter/install.txi} in the Octave sources, so to make + changes to this documenation file, change that source file. + @node Installation @chapter Installing Octave @end ifset *************** *** 466,469 **** --- 470,485 ---- modify Octave's configuration script to automatically determine the proper thing to do. + @item + If Octave is unable to find a header file because it is installed in a + location that is not normally searched by the compiler, you can add the + directory to the include search path by specifying (for example) + @code{CPPFLAGS=-I/some/nonstandard/directory} as an argument to + @code{configure}. Other variables that can be specified this way are + @code{CFLAGS}, @code{CXXFLAGS}, @code{FFLAGS}, and @code{LDFLAGS}. + Passing them as options to the configure script also records them in the + @file{config.status} file. By default, @code{CPPFLAGS} and + @code{LDFLAGS} are empty, @code{CFLAGS} and @code{CXXFLAGS} are set to + @code{"-g -O"} and @code{FFLAGS} is set to @code{"-O"}. + @end itemize diff -cNr octave-2.9.16/doc/interpreter/interpderiv1.eps octave-2.9.17/doc/interpreter/interpderiv1.eps *** octave-2.9.16/doc/interpreter/interpderiv1.eps Wed Oct 31 18:09:20 2007 --- octave-2.9.17/doc/interpreter/interpderiv1.eps Fri Nov 9 20:59:52 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpderiv1.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:20 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpderiv1.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:52 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:20 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:52 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/interpderiv1.pdf and octave-2.9.17/doc/interpreter/interpderiv1.pdf differ diff -cNr octave-2.9.16/doc/interpreter/interpderiv2.eps octave-2.9.17/doc/interpreter/interpderiv2.eps *** octave-2.9.16/doc/interpreter/interpderiv2.eps Wed Oct 31 18:09:23 2007 --- octave-2.9.17/doc/interpreter/interpderiv2.eps Fri Nov 9 20:59:54 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpderiv2.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:23 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpderiv2.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:54 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:23 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:54 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/interpderiv2.pdf and octave-2.9.17/doc/interpreter/interpderiv2.pdf differ diff -cNr octave-2.9.16/doc/interpreter/interpft.eps octave-2.9.17/doc/interpreter/interpft.eps *** octave-2.9.16/doc/interpreter/interpft.eps Wed Oct 31 18:09:16 2007 --- octave-2.9.17/doc/interpreter/interpft.eps Fri Nov 9 20:59:47 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpft.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:16 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpft.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:47 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:16 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:47 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/interpft.pdf and octave-2.9.17/doc/interpreter/interpft.pdf differ diff -cNr octave-2.9.16/doc/interpreter/interpn.eps octave-2.9.17/doc/interpreter/interpn.eps *** octave-2.9.16/doc/interpreter/interpn.eps Wed Oct 31 18:09:18 2007 --- octave-2.9.17/doc/interpreter/interpn.eps Fri Nov 9 20:59:50 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpn.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:18 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: interpn.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:50 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:18 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:50 2007) /DOCINFO pdfmark end } ifelse *************** *** 3625,3640 **** 0 -44 V 6299 3579 M 0 -2214 V ! 3245 2800 M ! 0 -2214 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! 3245 2800 M ! 901 3815 L ! 3245 2800 M ! 3054 779 V 3245 586 M -58 25 V stroke --- 3625,3642 ---- 0 -44 V 6299 3579 M 0 -2214 V ! 3245 1694 M ! 0 -1108 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! stroke ! LTa ! 3245 586 M ! 901 1601 L ! stroke ! LTb 3245 586 M -58 25 V stroke *************** *** 3647,3652 **** --- 3649,3660 ---- LTb 959 1576 M -58 25 V + stroke + LTa + 4008 781 M + 2928 1249 L + stroke + LTb 4008 781 M -58 25 V stroke *************** *** 3656,3661 **** --- 3664,3679 ---- 1.000 UL LTb 1.000 UL + LTa + 2533 1945 M + -1 0 V + 356 -154 R + -4 2 V + 304 -132 R + -1 1 V + 4771 976 M + 3218 1648 L + stroke LTb 4771 976 M -57 24 V *************** *** 3666,3671 **** --- 3684,3693 ---- 1.000 UL LTb 1.000 UL + LTa + 5535 1170 M + 3459 2069 L + stroke LTb 5535 1170 M -58 25 V *************** *** 3676,3681 **** --- 3698,3707 ---- 1.000 UL LTb 1.000 UL + LTa + 6299 1365 M + 3955 2380 L + stroke LTb 6299 1365 M -58 25 V *************** *** 3689,3694 **** --- 3715,3726 ---- LTb 4013 2355 M -58 25 V + stroke + LTa + 3245 586 M + 3054 779 V + stroke + LTb 3245 586 M 50 13 V stroke *************** *** 3701,3706 **** --- 3733,3744 ---- LTb 6249 1352 M 50 13 V + stroke + LTa + 2659 840 M + 3054 778 V + stroke + LTb 2659 840 M 50 13 V stroke *************** *** 3713,3718 **** --- 3751,3766 ---- LTb 5663 1606 M 50 12 V + stroke + LTa + 2192 1124 M + 3 1 V + 811 206 R + 2121 541 V + 2073 1094 M + 114 29 V + stroke + LTb 2073 1094 M 50 12 V stroke *************** *** 3725,3730 **** --- 3773,3786 ---- LTb 5077 1859 M 50 13 V + stroke + LTa + 3307 1811 M + 1234 315 V + 1487 1347 M + 325 83 V + stroke + LTb 1487 1347 M 50 13 V stroke *************** *** 3737,3742 **** --- 3793,3806 ---- LTb 4491 2113 M 50 13 V + stroke + LTa + 3685 2311 M + 270 69 V + 901 1601 M + 634 161 V + stroke + LTb 901 1601 M 50 13 V stroke *************** *** 3749,3754 **** --- 3813,3830 ---- LTb 3905 2367 M 50 13 V + stroke + LTa + 901 1702 M + 571 145 V + 3652 127 R + 4061 2434 L + 5473 1823 M + -42 18 V + 868 -375 R + -818 354 V + stroke + LTb 964 1702 M -63 0 V stroke *************** *** 3758,3763 **** --- 3834,3849 ---- 1.000 UL LTb 1.000 UL + LTa + 3912 2972 M + 6 1 V + 2467 2603 M + 15 4 V + 901 2205 M + 278 71 V + 6299 1969 M + -265 114 V + stroke LTb 964 2205 M -63 0 V *************** *** 3767,3778 **** --- 3853,3879 ---- ] -46.7 MRshow 1.000 UL LTb + 1.000 UL + LTa + 3535 3379 M + 3 1 V + 4879 3086 M + -924 400 V + stroke 775 2708 M [ [(Helvetica) 140.0 0.0 true true 0 (1)] ] -46.7 MRshow 1.000 UL LTb 1.000 UL + LTa + 3360 3838 M + 595 152 V + 901 3211 M + 345 88 V + 6299 2975 M + 3955 3990 L + stroke LTb 964 3211 M -63 0 V *************** *** 3783,3788 **** --- 3884,3897 ---- 1.000 UL LTb 1.000 UL + LTa + 2429 4104 M + 1526 389 V + 901 3714 M + 1066 272 V + 6299 3478 M + 3955 4493 L + stroke LTb 964 3714 M -63 0 V Binary files octave-2.9.16/doc/interpreter/interpn.pdf and octave-2.9.17/doc/interpreter/interpn.pdf differ Binary files octave-2.9.16/doc/interpreter/interpn.png and octave-2.9.17/doc/interpreter/interpn.png differ diff -cNr octave-2.9.16/doc/interpreter/io.texi octave-2.9.17/doc/interpreter/io.texi *** octave-2.9.16/doc/interpreter/io.texi Wed Oct 31 18:11:03 2007 --- octave-2.9.17/doc/interpreter/io.texi Sat Nov 10 00:59:56 2007 *************** *** 148,154 **** @group ans = - 3.1416 9.8696 97.409 9488.5 --- 148,153 ---- *************** *** 167,173 **** @group ans = - 3.1416 9.8696 97.409 9488.5 --- 166,171 ---- *************** *** 865,871 **** You can convert the string back into a matrix as follows: @example ! eval(['[',rats(hilb(4)),'];']) @end example The optional second argument defines the maximum length of the string --- 863,870 ---- You can convert the string back into a matrix as follows: @example ! r = rats(hilb(4)); ! x = str2num(r) @end example The optional second argument defines the maximum length of the string *************** *** 1954,1963 **** default, @code{fread} returns a double precision array. The special form @samp{*TYPE} is shorthand for @samp{TYPE=>TYPE}. ! The conversion and repeat counts may be combined. For example, ! @samp{32*single=>single} causes @code{fread} to read blocks of single ! precision floating point values and return an array of single precision ! values instead of the default array of double precision values. The optional argument @var{skip} specifies the number of bytes to skip after each element (or block of elements) is read. If it is not --- 1953,1963 ---- default, @code{fread} returns a double precision array. The special form @samp{*TYPE} is shorthand for @samp{TYPE=>TYPE}. ! The conversion and repeat counts may be combined. For example, the ! specification @samp{32*single=>single} causes @code{fread} to read ! blocks of single precision floating point values and return an array ! of single precision values instead of the default array of double ! precision values. The optional argument @var{skip} specifies the number of bytes to skip after each element (or block of elements) is read. If it is not diff -cNr octave-2.9.16/doc/interpreter/linalg.texi octave-2.9.17/doc/interpreter/linalg.texi *** octave-2.9.16/doc/interpreter/linalg.texi Wed Oct 31 18:11:03 2007 --- octave-2.9.17/doc/interpreter/linalg.texi Sat Nov 10 00:59:56 2007 *************** *** 88,107 **** @deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt}) @deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb}] =} balance (@var{a}, @var{b}, @var{opt}) ! @code{[dd, aa] = balance (a)} returns @code{aa = dd \ a * dd}. ! @code{aa} is a matrix whose row and column norms are roughly equal in ! magnitude, and @code{dd} = @code{p * d}, where @code{p} is a permutation matrix and @code{d} is a diagonal matrix of powers of two. This allows the equilibration to be computed without roundoff. Results of eigenvalue calculation are typically improved by balancing first. ! @code{[cc, dd, aa, bb] = balance (a, b)} returns @code{aa = cc*a*dd} and ! @code{bb = cc*b*dd)}, where @code{aa} and @code{bb} have non-zero elements of approximately the same magnitude and @code{cc} and @code{dd} are permuted diagonal matrices as in @code{dd} for the algebraic eigenvalue problem. ! The eigenvalue balancing option @code{opt} is selected as follows: @table @asis @item @code{"N"}, @code{"n"} --- 88,107 ---- @deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt}) @deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb}] =} balance (@var{a}, @var{b}, @var{opt}) ! Compute @code{aa = dd \ a * dd} in which @code{aa} is a matrix whose ! row and column norms are roughly equal in magnitude, and ! @code{dd} = @code{p * d}, in which @code{p} is a permutation matrix and @code{d} is a diagonal matrix of powers of two. This allows the equilibration to be computed without roundoff. Results of eigenvalue calculation are typically improved by balancing first. ! If four output values are requested, compute @code{aa = cc*a*dd} and ! @code{bb = cc*b*dd)}, in which @code{aa} and @code{bb} have non-zero elements of approximately the same magnitude and @code{cc} and @code{dd} are permuted diagonal matrices as in @code{dd} for the algebraic eigenvalue problem. ! The eigenvalue balancing option @code{opt} may be one of: @table @asis @item @code{"N"}, @code{"n"} diff -cNr octave-2.9.16/doc/interpreter/matrix.texi octave-2.9.17/doc/interpreter/matrix.texi *** octave-2.9.16/doc/interpreter/matrix.texi Wed Oct 31 18:11:03 2007 --- octave-2.9.17/doc/interpreter/matrix.texi Sat Nov 10 00:59:56 2007 *************** *** 934,941 **** available, otherwise from cpu time, wall clock time and the current fraction of a second. ! @code{rand} uses the Mersenne Twister with a period of 2^19937-1 ! (See M. Matsumoto and T. Nishimura, ``Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator'', ACM Trans. on Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998, @url{http://www.math.keio.ac.jp/~matumoto/emt.html}). --- 934,942 ---- available, otherwise from cpu time, wall clock time and the current fraction of a second. ! To compute the psuedo-random sequence, @code{rand} uses the Mersenne ! Twister with a period of 2^19937-1 (See M. Matsumoto and T. Nishimura, ! ``Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator'', ACM Trans. on Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998, @url{http://www.math.keio.ac.jp/~matumoto/emt.html}). *************** *** 943,950 **** several returned values together, otherwise the generator state can be learned after reading 624 consecutive values. ! @code{rand} includes a second random number generator, that was the ! previous generator used in Octave. The new generator is used by default as it is significantly faster than the old generator, and produces random numbers with a significantly longer cycle time. However, in some circumstances it might be desirable to obtain the same random --- 944,951 ---- several returned values together, otherwise the generator state can be learned after reading 624 consecutive values. ! Older versions of Octave used a different random number generator. ! The new generator is used by default as it is significantly faster than the old generator, and produces random numbers with a significantly longer cycle time. However, in some circumstances it might be desirable to obtain the same random *************** *** 1073,1082 **** @end example @item @code{F (n1, n2)} for @code{0 < n1}, @code{0 < n2} @example ! r1 = 2 * randg (n1 / 2) / n1 ## r1 equals 1 if n1 is infinite ! r2 = 2 * randg (n2 / 2) / n2 ## r2 equals 1 if n2 is infinite r = r1 / r2 @end example @item negative @code{binomial (n, p)} for @code{n > 0}, @code{0 < p <= 1} @example --- 1074,1087 ---- @end example @item @code{F (n1, n2)} for @code{0 < n1}, @code{0 < n2} @example ! @group ! ## r1 equals 1 if n1 is infinite ! r1 = 2 * randg (n1 / 2) / n1 ! ## r2 equals 1 if n2 is infinite ! r2 = 2 * randg (n2 / 2) / n2 r = r1 / r2 + @end group @end example @item negative @code{binomial (n, p)} for @code{n > 0}, @code{0 < p <= 1} @example diff -cNr octave-2.9.16/doc/interpreter/mesh.eps octave-2.9.17/doc/interpreter/mesh.eps *** octave-2.9.16/doc/interpreter/mesh.eps Wed Oct 31 18:09:47 2007 --- octave-2.9.17/doc/interpreter/mesh.eps Fri Nov 9 21:00:19 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: mesh.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:47 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: mesh.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:19 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:47 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:19 2007) /DOCINFO pdfmark end } ifelse *************** *** 9487,9502 **** 0 -1449 V 2344 434 R 0 -2214 V ! 3245 2800 M ! 0 -2214 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! 3245 2800 M ! 901 3815 L ! 3245 2800 M ! 3054 779 V 3245 586 M -58 25 V stroke --- 9487,9504 ---- 0 -1449 V 2344 434 R 0 -2214 V ! 3245 954 M ! 0 -368 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! stroke ! LTa ! 3245 586 M ! 901 1601 L ! stroke ! LTb 3245 586 M -58 25 V stroke *************** *** 9509,9514 **** --- 9511,9522 ---- LTb 959 1576 M -58 25 V + stroke + LTa + 3626 684 M + 1283 1698 L + stroke + LTb 3626 684 M -57 25 V stroke *************** *** 9521,9526 **** --- 9529,9542 ---- LTb 1341 1673 M -58 25 V + stroke + LTa + 4008 781 M + -536 232 V + -690 299 R + 1665 1796 L + stroke + LTb 4008 781 M -58 25 V stroke *************** *** 9533,9538 **** --- 9549,9564 ---- LTb 1723 1771 M -58 25 V + stroke + LTa + 2588 1659 M + -4 1 V + -407 177 R + -4 1 V + 4390 878 M + -671 290 V + stroke + LTb 4390 878 M -58 25 V stroke *************** *** 9542,9547 **** --- 9568,9581 ---- 1.000 UL LTb 1.000 UL + LTa + 2783 1837 M + -1 0 V + 582 -252 R + -6 3 V + 4771 976 M + -728 315 V + stroke LTb 4771 976 M -57 24 V *************** *** 9552,9557 **** --- 9586,9597 ---- 1.000 UL LTb 1.000 UL + LTa + 5153 1073 M + -708 306 V + -738 320 R + -4 2 V + stroke LTb 5153 1073 M -58 25 V *************** *** 9562,9567 **** --- 9602,9615 ---- 1.000 UL LTb 1.000 UL + LTa + 5535 1170 M + -813 352 V + -350 152 R + -2 0 V + -227 99 R + -2 1 V + stroke LTb 5535 1170 M -58 25 V *************** *** 9572,9577 **** --- 9620,9631 ---- 1.000 UL LTb 1.000 UL + LTa + 4808 1748 M + -3 1 V + 5917 1267 M + 4915 1701 L + stroke LTb 5917 1267 M -58 25 V *************** *** 9582,9587 **** --- 9636,9647 ---- 1.000 UL LTb 1.000 UL + LTa + 4953 1947 M + -3 2 V + 6299 1365 M + -974 421 V + stroke LTb 6299 1365 M -58 25 V *************** *** 9592,9597 **** --- 9652,9661 ---- 1.000 UL LTb 1.000 UL + LTa + 3245 586 M + 3054 779 V + stroke LTb 3245 586 M 50 13 V *************** *** 9605,9610 **** --- 9669,9680 ---- LTb 6249 1352 M 50 13 V + stroke + LTa + 2952 713 M + 3054 779 V + stroke + LTb 2952 713 M 50 13 V stroke *************** *** 9617,9622 **** --- 9687,9700 ---- LTb 5956 1479 M 50 13 V + stroke + LTa + 3586 1076 M + 2127 542 V + 2659 840 M + 519 132 V + stroke + LTb 2659 840 M 50 13 V stroke *************** *** 9629,9634 **** --- 9707,9722 ---- LTb 5663 1606 M 50 12 V + stroke + LTa + 4803 1588 M + 617 157 V + 4174 1428 M + 7 1 V + 2366 967 M + 599 152 V + stroke + LTb 2366 967 M 50 12 V stroke *************** *** 9641,9646 **** --- 9729,9748 ---- LTb 5370 1733 M 50 12 V + stroke + LTa + 4578 1732 M + 4 1 V + -53 -13 R + 1 0 V + -67 -17 R + 1 0 V + -96 -24 R + 2 0 V + 2073 1094 M + 737 187 V + stroke + LTb 2073 1094 M 50 12 V stroke *************** *** 9653,9658 **** --- 9755,9770 ---- LTb 5077 1859 M 39 10 V + stroke + LTa + 4459 1904 M + 10 2 V + -160 -41 R + 2 1 V + 1780 1220 M + 843 215 V + stroke + LTb 1780 1220 M 50 13 V stroke *************** *** 9662,9667 **** --- 9774,9785 ---- 1.000 UL LTb 1.000 UL + LTa + 1487 1347 M + 919 234 V + 1 1 R + 2 0 V + stroke LTb 1487 1347 M 50 13 V *************** *** 9672,9677 **** --- 9790,9801 ---- 1.000 UL LTb 1.000 UL + LTa + 2262 1746 M + 2 1 V + 1194 1474 M + 1042 266 V + stroke LTb 1194 1474 M 50 13 V *************** *** 9682,9687 **** --- 9806,9823 ---- 1.000 UL LTb 1.000 UL + LTa + 2523 2014 M + 8 2 V + -178 -45 R + 4 1 V + -102 -26 R + 5 1 V + -176 -45 R + 3 1 V + 901 1601 M + 1046 266 V + stroke LTb 901 1601 M 50 13 V *************** *** 9692,9697 **** --- 9828,9847 ---- 1.000 UL LTb 1.000 UL + LTa + 1962 2042 M + 3 0 V + 901 1771 M + 704 180 V + 3158 249 R + -36 16 V + 404 -175 R + -3 1 V + 80 -34 R + -2 0 V + 6299 1535 M + -335 145 V + stroke LTb 964 1771 M -63 0 V *************** *** 9702,9707 **** --- 9852,9871 ---- 1.000 UL LTb 1.000 UL + LTa + 2117 2422 M + 6 2 V + 901 2112 M + 577 147 V + 6299 1876 M + -443 191 V + -319 139 R + -14 6 V + 4118 2819 M + -61 27 V + -80 34 R + -4 2 V + stroke LTb 964 2112 M -63 0 V *************** *** 9712,9717 **** --- 9876,9889 ---- 1.000 UL LTb 1.000 UL + LTa + 3924 3223 M + 31 8 V + 901 2453 M + 2307 587 V + 6299 2217 M + 3955 3231 L + stroke LTb 964 2453 M -63 0 V *************** *** 9722,9727 **** --- 9894,9907 ---- 1.000 UL LTb 1.000 UL + LTa + 3786 3528 M + 169 43 V + 901 2793 M + 2457 626 V + 6299 2558 M + 3955 3571 L + stroke LTb 964 2793 M -63 0 V *************** *** 9732,9737 **** --- 9912,9923 ---- 1.000 UL LTb 1.000 UL + LTa + 901 3134 M + 3054 778 V + 6299 2897 M + 3955 3912 L + stroke LTb 964 3134 M -63 0 V *************** *** 9742,9747 **** --- 9928,9939 ---- 1.000 UL LTb 1.000 UL + LTa + 901 3474 M + 3054 779 V + 6299 3238 M + 3955 4253 L + stroke LTb 964 3474 M -63 0 V *************** *** 9752,9757 **** --- 9944,9955 ---- 1.000 UL LTb 1.000 UL + LTa + 901 3815 M + 3054 779 V + 6299 3579 M + 3955 4594 L + stroke LTb 964 3815 M -63 0 V Binary files octave-2.9.16/doc/interpreter/mesh.pdf and octave-2.9.17/doc/interpreter/mesh.pdf differ Binary files octave-2.9.16/doc/interpreter/mesh.png and octave-2.9.17/doc/interpreter/mesh.png differ diff -cNr octave-2.9.16/doc/interpreter/numbers.texi octave-2.9.17/doc/interpreter/numbers.texi *** octave-2.9.16/doc/interpreter/numbers.texi Wed Oct 31 18:11:03 2007 --- octave-2.9.17/doc/interpreter/numbers.texi Sat Nov 10 00:59:56 2007 *************** *** 815,821 **** @var{n} must be in range [1,log2(bitmax)+1] usually [1,33] @example ! bitshift (eye (3), 1)) @result{} @group 2 0 0 --- 815,821 ---- @var{n} must be in range [1,log2(bitmax)+1] usually [1,33] @example ! bitshift (eye (3), 1) @result{} @group 2 0 0 *************** *** 1014,1020 **** @anchor{doc-islogical} ! @deftypefn {Built-in Functio} {} islogical (@var{x}) Return true if @var{x} is a logical object. @end deftypefn --- 1014,1020 ---- @anchor{doc-islogical} ! @deftypefn {Built-in Function} {} islogical (@var{x}) Return true if @var{x} is a logical object. @end deftypefn Binary files octave-2.9.16/doc/interpreter/octave-a4.pdf and octave-2.9.17/doc/interpreter/octave-a4.pdf differ Binary files octave-2.9.16/doc/interpreter/octave.pdf and octave-2.9.17/doc/interpreter/octave.pdf differ diff -cNr octave-2.9.16/doc/interpreter/optim.texi octave-2.9.17/doc/interpreter/optim.texi *** octave-2.9.16/doc/interpreter/optim.texi Wed Oct 31 18:11:04 2007 --- octave-2.9.17/doc/interpreter/optim.texi Sat Nov 10 00:59:56 2007 *************** *** 171,196 **** following values @table @code @item "F" ! Free (unbounded) variable (the constraint is ignored). @item "U" ! Variable with upper bound (@code{A(i,:)*x <= b(i)}). @item "S" ! Fixed Variable (@code{A(i,:)*x = b(i)}). @item "L" ! Variable with lower bound (@code{A(i,:)*x >= b(i)}). @item "D" ! Double-bounded variable (@code{A(i,:)*x >= -b(i)} @emph{and} ! (@code{A(i,:)*x <= b(i)}). @end table @item vartype A column array containing the types of the variables. @table @code ! @item "F" ! "C" ! Continuous variable. ! "I" ! Integer variable @end table @item sense --- 171,195 ---- following values @table @code @item "F" ! A free (unbounded) constraint (the constraint is ignored). @item "U" ! An inequality constraint with an upper bound (@code{A(i,:)*x <= b(i)}). @item "S" ! An equality constraint (@code{A(i,:)*x = b(i)}). @item "L" ! An inequality with a lower bound (@code{A(i,:)*x >= b(i)}). @item "D" ! An inequality constraint with both upper and lower bounds ! (@code{A(i,:)*x >= -b(i)} @emph{and} (@code{A(i,:)*x <= b(i)}). @end table @item vartype A column array containing the types of the variables. @table @code ! @item "C" ! A continuous variable. ! @item "I" ! An integer variable. @end table @item sense diff -cNr octave-2.9.16/doc/interpreter/plot.eps octave-2.9.17/doc/interpreter/plot.eps *** octave-2.9.16/doc/interpreter/plot.eps Wed Oct 31 18:09:39 2007 --- octave-2.9.17/doc/interpreter/plot.eps Fri Nov 9 21:00:11 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: plot.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:39 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: plot.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:11 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:39 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:11 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/plot.pdf and octave-2.9.17/doc/interpreter/plot.pdf differ diff -cNr octave-2.9.16/doc/interpreter/plot.texi octave-2.9.17/doc/interpreter/plot.texi *** octave-2.9.16/doc/interpreter/plot.texi Wed Oct 31 18:11:04 2007 --- octave-2.9.17/doc/interpreter/plot.texi Sat Nov 10 00:59:56 2007 *************** *** 313,383 **** @end float @anchor{doc-bar} ! @deftypefn {Function File} {@var{h} =} bar (@var{x}, @var{y}, @var{p1}, @var{v1}, @dots{}) ! @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} bar (@dots{}) ! Given two vectors of x-y data, @code{bar} produce a bar graph. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! If two output arguments are specified, the data are generated but ! not plotted. For example, ! ! @example ! bar (x, y); ! @end example ! @noindent ! and ! ! @example ! [xb, yb] = bar (x, y); ! plot (xb, yb); ! @end example ! ! @noindent ! are equivalent. ! @seealso{hbar, plot} @end deftypefn @anchor{doc-barh} ! @deftypefn {Function File} {@var{h} =} barh (@var{x}, @var{y}, @var{style}) ! @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} barh (@dots{}) ! Given two vectors of x-y data, @code{bar} produce a horizontal bar graph. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! If two output arguments are specified, the data are generated but ! not plotted. For example, ! ! @example ! barh (x, y); ! @end example ! ! @noindent ! and ! ! @example ! [xb, yb] = barh (x, y); ! plot (xb, yb); ! @end example - @noindent - are equivalent. @seealso{bar, plot} @end deftypefn --- 313,367 ---- @end float @anchor{doc-bar} ! @deftypefn {Function File} {} bar (@var{x}, @var{y}) ! @deftypefnx {Function File} {} bar (@var{y}) ! @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}) ! @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}, @var{style}) ! @deftypefnx {Function File} {@var{h} =} bar (@dots{}, @var{prop}, @var{val}) ! Produce a bar graph from two vectors of x-y data. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. + The default width of 0.8 for the bars can be changed using @var{w}. + If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! The optional return value @var{h} provides a handle to the patch object. ! Properties of the patch graphics object can be changed using ! @var{prop}, @var{val} pairs. ! @seealso{barh, plot} @end deftypefn @anchor{doc-barh} ! @deftypefn {Function File} {} barh (@var{x}, @var{y}) ! @deftypefnx {Function File} {} barh (@var{y}) ! @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}) ! @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}, @var{style}) ! @deftypefnx {Function File} {@var{h} =} barh (@dots{}, @var{prop}, @var{val}) ! Produce a horizontal bar graph from two vectors of x-y data. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. + The default width of 0.8 for the bars can be changed using @var{w}. + If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! The optional return value @var{h} provides a handle to the patch object. ! Properties of the patch graphics object can be changed using ! @var{prop}, @var{val} pairs. @seealso{bar, plot} @end deftypefn *************** *** 770,775 **** --- 754,860 ---- @end deftypefn + @anchor{doc-pie} + @deftypefn {Function File} {} pie (@var{y}) + @deftypefnx {Function File} {} pie (@var{y}, @var{explode}) + @deftypefnx {Function File} {} pie (@dots{}, @var{labels}) + @deftypefnx {Function File} {} pie (@var{h}, @dots{}); + @deftypefnx {Function File} {@var{h} =} pie (@dots{}); + Produce a pie chart. + + Called with a single vector arrgument, produces a pie chart of the + elements in @var{x}, with the size of the slice determined by percentage + size of the values of @var{x}. + + The variable @var{explode} is a vector of the same length as @var{x} that + if non zero 'explodes' the slice from the pie chart. + + If given @var{labels} is a cell array of strings of the same length as + @var{x}, giving the labels of each of the slices of the pie chart. + + The optional return value @var{h} provides a handle to the patch object. + + @seealso{bar, stem} + @end deftypefn + + + @anchor{doc-quiver} + @deftypefn {Function File} {} quiver (@var{u}, @var{v}) + @deftypefnx {Function File} {} quiver (@var{x}, @var{y}, @var{u}, @var{v}) + @deftypefnx {Function File} {} quiver (@dots{}, @var{s}) + @deftypefnx {Function File} {} quiver (@dots{}, @var{style}) + @deftypefnx {Function File} {} quiver (@dots{}, 'filled') + @deftypefnx {Function File} {} quiver (@var{h}, @dots{}) + @deftypefnx {Function File} {@var{h} =} quiver (@dots{}) + + Plot the @code{(@var{u}, @var{v})} components of a vector field in + an @code{(@var{x}, @var{y})} meshgrid. If the grid is uniform, you can + specify @var{x} and @var{y} as vectors. + + If @var{x} and @var{y} are undefined they are assumed to be + @code{(1:@var{m}, 1:@var{n})} where @code{[@var{m}, @var{n}] = + size(@var{u})}. + + The variable @var{s} is a scalar defining a scaling factor to use for + the arrows of the field relative to the mesh spacing. A value of 0 + disables all scaling. The default value is 1. + + The style to use for the plot can be defined with a line style @var{style} + in a similar manner to the line styles used with the @code{plot} command. + If a marker is specified then markers at the grid points of the vectors are + printed rather than arrows. If the argument 'filled' is given then the + markers as filled. + + The optional return value @var{h} provides a list of handles to the + the parts of the vector field (body, arrow and marker). + + @example + @group + [x, y] = meshgrid (1:2:20); + quiver (x, y, sin (2*pi*x/10), sin (2*pi*y/10)); + @end group + @end example + + @seealso{plot} + @end deftypefn + + + @anchor{doc-pcolor} + @deftypefn {Function File} {} pcolor (@var{x}, @var{y}, @var{c}) + @deftypefnx {Function File} {} pcolor (@var{c}) + Density plot for given matrices @var{x}, and @var{y} from @code{meshgrid} and + a matrix @var{c} corresponding to the @var{x} and @var{y} coordinates of + the mesh. If @var{x} and @var{y} are vectors, then a typical vertex + is (@var{x}(j), @var{y}(i), @var{c}(i,j)). Thus, columns of @var{c} + correspond to different @var{x} values and rows of @var{c} correspond + to different @var{y} values. + @seealso{meshgrid, contour} + @end deftypefn + + + @anchor{doc-area} + @deftypefn {Function File} {} area (@var{x}, @var{y}) + @deftypefnx {Function File} {} area (@var{x}, @var{y}, @var{lvl}) + @deftypefnx {Function File} {} area (@dots{}, @var{prop}, @var{val}, @dots{}) + @deftypefnx {Function File} {} area (@var{y}, @dots{}) + @deftypefnx {Function File} {} area (@var{h}, @dots{}) + @deftypefnx {Function File} {@var{h} =} area (@dots{}) + Area plot of cummulative sum of the columns of @var{y}. This shows the + contributions of a value to a sum, and is functionally similar to + @code{plot (@var{x}, cumsum (@var{y}, 2))}, except that the area under + the curve is shaded. + + If the @var{x} argument is ommitted it is assumed to be given by + @code{1 : rows (@var{y})}. A value @var{lvl} can be defined that determines + where the base level of the shading under the curve should be defined. + + Additional arguments to the @code{area} function are passed to the + @code{patch}. The optional return value @var{h} provides a handle to + the list of patch objects. + @seealso{plot, patch} + @end deftypefn + + The axis function may be used to change the axis limits of an existing plot. *************** *** 944,949 **** --- 1029,1068 ---- @end deftypefn + @anchor{doc-hidden} + @deftypefn {Function File} {} hidden (@var{mode}) + @deftypefnx {Function File} {} hidden () + Manipulation the mesh hidden line removal. Called with no argument + the hidden line removal is toggled. The argument @var{mode} can be either + 'on' or 'off' and the set of the hidden line removal is set accordingly. + @seealso{mesh, meshc, surf} + @end deftypefn + + + @anchor{doc-surf} + @deftypefn {Function File} {} surf (@var{x}, @var{y}, @var{z}) + Plot a surface given matrices @var{x}, and @var{y} from @code{meshgrid} and + a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of + the mesh. If @var{x} and @var{y} are vectors, then a typical vertex + is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, columns of @var{z} + correspond to different @var{x} values and rows of @var{z} correspond + to different @var{y} values. + @seealso{mesh, surface} + @end deftypefn + + + @anchor{doc-surfc} + @deftypefn {Function File} {} surfc (@var{x}, @var{y}, @var{z}) + Plot a surface and contour given matrices @var{x}, and @var{y} from + @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and + @var{y} coordinates of the mesh. If @var{x} and @var{y} are vectors, + then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, + columns of @var{z} correspond to different @var{x} values and rows of + @var{z} correspond to different @var{y} values. + @seealso{meshgrid, surf, contour} + @end deftypefn + + @anchor{doc-meshgrid} @deftypefn {Function File} {[@var{xx}, @var{yy}, @var{zz}] =} meshgrid (@var{x}, @var{y}, @var{z}) @deftypefnx {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}, @var{y}) *************** *** 1050,1055 **** --- 1169,1184 ---- @end deftypefn + @anchor{doc-shading} + @deftypefn {Function File} {} shading (@var{type}) + @deftypefnx {Function File} {} shading (@var{ax}, @dots{}) + Set the shading of surface or patch graphic objects. Valid arguments + for @var{type} are @code{"flat"}, @code{"interp"}, or + @code{"faceted"}. If @var{ax} is given the shading is applied to + axis @var{ax} instead of the current axis. + @end deftypefn + + @node Plot Annotations @subsection Plot Annotations *************** *** 1120,1130 **** Some specific functions are directly available using @var{func}: ! @table @code @item "show" Show legends from the plot @item "hide" ! @itemx off Hide legends from the plot @item "boxon" Draw a box around legends --- 1249,1259 ---- Some specific functions are directly available using @var{func}: ! @table @asis @item "show" Show legends from the plot @item "hide" ! @itemx "off" Hide legends from the plot @item "boxon" Draw a box around legends *************** *** 1228,1235 **** \vskip 10pt \hfil\vbox{\offinterlineskip\hrule \halign{\vrule#&&\qquad\hfil#\hfil\qquad\vrule\cr ! height13pt&1&2&3\cr height12pt&&&&\cr\noalign{\hrule} ! height13pt&4&5&6\cr height12pt&&&&\cr\noalign{\hrule}}} \hfil \vskip 10pt @end tex --- 1357,1364 ---- \vskip 10pt \hfil\vbox{\offinterlineskip\hrule \halign{\vrule#&&\qquad\hfil#\hfil\qquad\vrule\cr ! height13pt&1&2&3\cr height12pt&&&\cr\noalign{\hrule} ! height13pt&4&5&6\cr height12pt&&&\cr\noalign{\hrule}}} \hfil \vskip 10pt @end tex *************** *** 1700,1705 **** --- 1829,1847 ---- @end deftypefn + @anchor{doc-surface} + @deftypefn {Function File} @var{h} = {} surface (@var{x}, @var{y}, @var{z}, @var{c}) + @deftypefnx {Function File} @var{h} = {} surface (@var{x}, @var{y}, @var{z}) + Plot a surface graphic object given matrices @var{x}, and @var{y} from @code{meshgrid} and + a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of + the surface. If @var{x} and @var{y} are vectors, then a typical vertex + is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, columns of @var{z} + correspond to different @var{x} values and rows of @var{z} correspond + to different @var{y} values. + @seealso{surf, mesh, patch, line} + @end deftypefn + + By default, Octave refreshes the plot window when a prompt is printed, or when waiting for input. To force an update at other times, call the @code{drawnow} function. *************** *** 2282,2286 **** --- 2424,2431 ---- If enabled, append @samp{-title "Figure NN"} to the gnuplot command. By default, this feature is enabled if the @code{DISPLAY} environment variable is set when Octave starts. + + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn diff -cNr octave-2.9.16/doc/interpreter/plot.txi octave-2.9.17/doc/interpreter/plot.txi *** octave-2.9.16/doc/interpreter/plot.txi Fri Oct 12 20:52:13 2007 --- octave-2.9.17/doc/interpreter/plot.txi Fri Nov 9 16:20:07 2007 *************** *** 176,181 **** --- 176,189 ---- @DOCSTRING(polar) + @DOCSTRING(pie) + + @DOCSTRING(quiver) + + @DOCSTRING(pcolor) + + @DOCSTRING(area) + The axis function may be used to change the axis limits of an existing plot. *************** *** 237,242 **** --- 245,256 ---- @DOCSTRING(meshc) + @DOCSTRING(hidden) + + @DOCSTRING(surf) + + @DOCSTRING(surfc) + @DOCSTRING(meshgrid) @DOCSTRING(ndgrid) *************** *** 245,250 **** --- 259,266 ---- @DOCSTRING(view) + @DOCSTRING(shading) + @node Plot Annotations @subsection Plot Annotations *************** *** 493,498 **** --- 509,516 ---- @DOCSTRING(patch) + @DOCSTRING(surface) + By default, Octave refreshes the plot window when a prompt is printed, or when waiting for input. To force an update at other times, call the @code{drawnow} function. diff -cNr octave-2.9.16/doc/interpreter/plot3.eps octave-2.9.17/doc/interpreter/plot3.eps *** octave-2.9.16/doc/interpreter/plot3.eps Wed Oct 31 18:09:49 2007 --- octave-2.9.17/doc/interpreter/plot3.eps Fri Nov 9 21:00:22 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: plot3.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:49 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: plot3.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:22 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:49 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:22 2007) /DOCINFO pdfmark end } ifelse *************** *** 503,510 **** }{ /g {stroke pm3dround pm3dGamma exp setgray} bind def } ifelse ! 1.000 UL LTb 901 1601 M 3054 779 V 6299 1365 M --- 503,1773 ---- }{ /g {stroke pm3dround pm3dGamma exp setgray} bind def } ifelse ! 1.000 UP ! 0.500 UL ! LT0 ! 0.00 0.00 1.00 C 3677 1512 M ! 3 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3675 1521 M ! 2 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3674 1530 M ! 1 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3674 1540 M ! 0 -10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3676 1549 M ! -2 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3679 1558 M ! -3 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3683 1567 M ! -4 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3688 1576 M ! -5 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3695 1585 M ! -7 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3703 1594 M ! -8 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3711 1602 M ! -8 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3721 1610 M ! -10 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3731 1617 M ! -10 -7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3742 1624 M ! -11 -7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3753 1630 M ! -11 -6 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3764 1636 M ! -11 -6 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3774 1642 M ! -10 -6 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3631 2122 M ! 43 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3718 2142 M ! -44 -9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3763 2150 M ! -45 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3591 2110 M ! 40 12 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3809 2157 M ! -46 -7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3785 1647 M ! -11 -5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3552 2097 M ! 39 13 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3854 2161 M ! -45 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3795 1651 M ! -10 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3516 2083 M ! 36 14 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3899 2165 M ! -45 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3804 1655 M ! -9 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3482 2067 M ! 34 16 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3943 2166 M ! -44 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3600 2696 M ! 83 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3767 2717 M ! -84 -10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3812 1658 M ! -8 -3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3852 2723 M ! -85 -6 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3451 2051 M ! 31 16 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3520 2681 M ! 80 15 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3936 2726 M ! -84 -3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3985 2166 M ! -42 0 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3819 1661 M ! -7 -3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3442 2665 M ! 78 16 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3424 2034 M ! 27 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4018 2727 M ! -82 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3825 1663 M ! -6 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3368 2645 M ! 74 20 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4025 2165 M ! -40 1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 2016 M ! 24 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3583 3271 M ! 122 12 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3829 3291 M ! -124 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3953 3295 M ! -124 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4099 2725 M ! -81 2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3829 1665 M ! -4 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3463 3254 M ! 120 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4075 3295 M ! -122 0 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3380 1998 M ! 20 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3298 2624 M ! 70 21 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4063 2162 M ! -38 3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3345 3234 M ! 118 20 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3831 1667 M ! -2 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4176 2720 M ! -77 5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4195 3292 M ! -120 3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3364 1979 M ! 16 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3579 3846 M ! 162 12 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3905 3865 M ! -164 -7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3832 1668 M ! -1 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3233 2600 M ! 65 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4067 3867 M ! -162 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3418 3828 M ! 161 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3233 3211 M ! 112 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4097 2158 M ! -34 4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3351 1960 M ! 13 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3830 1669 M ! 2 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4250 2712 M ! -74 8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4227 3864 M ! -160 3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3261 3805 M ! 157 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4310 3284 M ! -115 8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3173 2576 M ! 60 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3826 1670 M ! 4 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3126 3183 M ! 107 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3343 1941 M ! 8 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4129 2152 M ! -32 6 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4383 3855 M ! -156 9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3110 3778 M ! 151 27 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3820 1671 M ! 6 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4318 2702 M ! -68 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3338 1922 M ! 5 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4420 3272 M ! -110 12 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3119 2549 M ! 54 27 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4156 2145 M ! -27 7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3812 1673 M ! 8 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3025 3153 M ! 101 30 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3337 1904 M ! 1 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4533 3840 M ! -150 15 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3802 1674 M ! 10 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2965 3745 M ! 145 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3339 1885 M ! -2 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4382 2689 M ! -64 13 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4179 2138 M ! -23 7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3072 2521 M ! 47 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3790 1675 M ! 12 -1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4524 3256 M ! -104 16 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3345 1867 M ! -6 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2932 3120 M ! 93 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3775 1677 M ! 15 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3355 1850 M ! -10 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4675 3821 M ! -142 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2829 3709 M ! 136 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3758 1679 M ! 17 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4197 2129 M ! -18 9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4439 2675 M ! -57 14 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3032 2491 M ! 40 30 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3367 1833 M ! -12 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3739 1681 M ! 19 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4621 3237 M ! -97 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3382 1816 M ! -15 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2848 3084 M ! 84 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3719 1684 M ! 20 -3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4210 2119 M ! -13 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3400 1801 M ! -18 15 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3697 1688 M ! 22 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2999 2461 M ! 33 30 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3673 1693 M ! 24 -5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3420 1786 M ! -20 15 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4489 2658 M ! -50 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2703 3668 M ! 126 41 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4809 3797 M ! -134 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3648 1698 M ! 25 -5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3442 1773 M ! -22 13 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3622 1704 M ! 26 -6 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3466 1760 M ! -24 13 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4218 2109 M ! -8 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4709 3214 M ! -88 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3597 1711 M ! 25 -7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3491 1748 M ! -25 12 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2773 3046 M ! 75 38 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3570 1719 M ! 27 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3517 1737 M ! -26 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3544 1727 M ! 26 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3544 1727 M ! -27 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2973 2430 M ! 26 31 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4531 2639 M ! -42 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4221 2098 M ! -3 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2587 3623 M ! 116 45 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4932 3769 M ! -123 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2955 2398 M ! 18 32 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2708 3006 M ! 65 40 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4787 3189 M ! -78 25 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4218 2087 M ! 3 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4566 2619 M ! -35 20 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2945 2366 M ! 10 32 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2483 3576 M ! 104 47 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4210 2076 M ! 8 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5043 3736 M ! -111 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2653 2964 M ! 55 42 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2335 4166 M ! 149 52 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4855 3161 M ! -68 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2942 2335 M ! 3 31 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4592 2598 M ! -26 21 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4196 2065 M ! 14 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2391 3525 M ! 92 51 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2946 2304 M ! -4 31 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2609 2921 M ! 44 43 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4176 2054 M ! 20 11 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5142 3700 M ! -99 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4609 2576 M ! -17 22 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4912 3130 M ! -57 31 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2201 4109 M ! 134 57 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2958 2273 M ! -12 31 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4150 2044 M ! 26 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2576 2877 M ! 33 44 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4617 2553 M ! -8 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2314 3472 M ! 77 53 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2977 2243 M ! -19 30 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4120 2034 M ! 30 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4957 3097 M ! -45 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5227 3660 M ! -85 40 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2083 4048 M ! 118 61 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3003 2215 M ! -26 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4084 2025 M ! 36 9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2555 2832 M ! 21 45 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4616 2529 M ! 1 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3035 2187 M ! -32 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4043 2018 M ! 41 7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2250 3417 M ! 64 55 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4989 3063 M ! -32 34 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3073 2161 M ! -38 26 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3997 2011 M ! 46 7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2545 2788 M ! 10 44 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5296 3617 M ! -69 43 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4605 2505 M ! 11 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1981 3984 M ! 102 64 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3947 2006 M ! 50 5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3116 2137 M ! -43 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2202 3361 M ! 48 56 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3893 2002 M ! 54 4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3164 2114 M ! -48 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5009 3027 M ! -20 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2547 2744 M ! -2 44 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4584 2481 M ! 21 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3836 2001 M ! 57 1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3217 2093 M ! -53 21 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3777 2000 M ! 59 1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5350 3571 M ! -54 46 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3273 2074 M ! -56 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3715 2002 M ! 62 -2 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1897 3918 M ! 84 66 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3333 2058 M ! -60 16 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3651 2006 M ! 64 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2560 2700 M ! -13 44 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4554 2458 M ! 30 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3394 2043 M ! -61 15 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2168 3304 M ! 34 57 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3587 2012 M ! 64 -6 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3458 2030 M ! -64 13 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5015 2991 M ! -6 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3522 2020 M ! 65 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3522 2020 M ! -64 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4515 2435 M ! 39 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2584 2657 M ! -24 43 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5388 3524 M ! -38 47 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1832 3849 M ! 65 69 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2150 3246 M ! 18 58 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5008 2954 M ! 7 37 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4467 2414 M ! 48 21 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2619 2616 M ! -35 41 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5409 3475 M ! -21 49 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4410 2394 M ! 57 20 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2148 3189 M ! 2 57 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2663 2577 M ! -44 39 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4987 2917 M ! 21 37 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1785 3780 M ! 47 69 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4345 2375 M ! 65 19 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2718 2540 M ! -55 37 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4954 2881 M ! 33 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2160 3132 M ! -12 57 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5412 3426 M ! -3 49 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4272 2359 M ! 73 16 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2782 2504 M ! -64 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1757 3709 M ! 28 71 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4193 2345 M ! 79 14 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2854 2471 M ! -72 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4907 2845 M ! 47 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2188 3076 M ! -28 56 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4107 2333 M ! 86 12 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2933 2441 M ! -79 30 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5398 3376 M ! 14 50 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4016 2324 M ! 91 9 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3019 2414 M ! -86 27 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1749 3639 M ! 8 70 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4847 2811 M ! 60 34 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2231 3022 M ! -43 54 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3920 2319 M ! 96 5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3110 2390 M ! -91 24 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3821 2316 M ! 99 3 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3206 2369 M ! -96 21 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3719 2316 M ! 102 0 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5367 3326 M ! 31 50 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3306 2351 M ! -100 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3615 2320 M ! 104 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3408 2337 M ! -102 14 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4775 2779 M ! 72 32 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3512 2327 M ! 103 -7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3512 2327 M ! -104 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2287 2970 M ! -56 52 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1760 3569 M ! -11 70 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4691 2749 M ! 84 30 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2357 2921 M ! -70 49 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5318 3277 M ! 49 49 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1791 3500 M ! -31 69 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4596 2721 M ! 95 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2440 2874 M ! -83 47 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5253 3230 M ! 65 47 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4491 2696 M ! 105 25 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2534 2831 M ! -94 43 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1839 3433 M ! -48 67 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4377 2675 M ! 114 21 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2639 2791 M ! -105 40 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5171 3184 M ! 82 46 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4255 2658 M ! 122 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1906 3368 M ! -67 65 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2754 2755 M ! -115 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4126 2644 M ! 129 14 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2877 2723 M ! -123 32 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 5074 3141 M ! 97 43 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3991 2634 M ! 135 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3006 2696 M ! -129 27 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1991 3307 M ! -85 61 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3852 2629 M ! 139 5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3142 2673 M ! -136 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3710 2629 M ! 142 0 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3281 2655 M ! -139 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4962 3101 M ! 112 40 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3567 2633 M ! 143 -4 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3424 2641 M ! -143 14 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3424 2641 M ! 143 -8 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2091 3249 M ! -100 58 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4837 3065 M ! 125 36 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2207 3195 M ! -116 54 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4699 3032 M ! 138 33 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2337 3145 M ! -130 50 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4549 3004 M ! 150 28 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2479 3100 M ! -142 45 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4390 2981 M ! 159 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2632 3060 M ! -153 40 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4223 2963 M ! 167 18 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2795 3026 M ! -163 34 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 4049 2950 M ! 174 13 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 2965 2997 M ! -170 29 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3870 2943 M ! 179 7 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3142 2974 M ! -177 23 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3688 2942 M ! 182 1 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3322 2957 M ! -180 17 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3505 2947 M ! 183 -5 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 3505 2947 M ! -183 10 V ! stroke ! LT0 ! 0.00 0.00 1.00 C 1.000 UL LTb + 6299 1365 M + 3245 586 L + 901 1601 M + 3245 586 L 901 1601 M 3054 779 V 6299 1365 M *************** *** 515,525 **** 0 2214 V 6299 1365 M 0 2214 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! 3245 586 M -58 25 V stroke 3322 531 M --- 1778,1794 ---- 0 2214 V 6299 1365 M 0 2214 V + 3245 586 M + 0 2214 V 901 3815 M 3054 779 V 6299 3579 M 3955 4594 L ! 901 3815 M ! 3245 2800 L ! 3054 779 R ! 3245 2800 L ! 0 -2214 R -58 25 V stroke 3322 531 M *************** *** 758,1094 **** 1.000 UL LTb 1.000 UP - 0.500 UL - LT0 - 0.00 0.00 1.00 C 0.00 0.00 1.00 C 3680 1502 M - -3 9 V - -2 9 V - -1 9 V - 0 10 V - 2 9 V - 3 9 V - 4 9 V - 5 9 V - 7 9 V - 8 9 V - 8 8 V - 10 8 V - 10 7 V - 11 7 V - 11 6 V - 11 6 V - 10 6 V - 11 5 V - 10 4 V - 9 4 V - 8 3 V - 7 3 V - 6 2 V - 4 2 V - 2 2 V - 1 1 V - -2 1 V - -4 1 V - -6 1 V - -8 2 V - -10 1 V - -12 1 V - -15 2 V - -17 2 V - -19 2 V - -20 3 V - -22 4 V - -24 5 V - -25 5 V - -26 6 V - -26 7 V - -27 8 V - -26 8 V - -27 10 V - -26 11 V - -25 12 V - -24 13 V - -22 13 V - -20 15 V - -18 15 V - -15 17 V - -12 17 V - -10 17 V - -6 18 V - -2 19 V - 1 18 V - 5 19 V - 8 19 V - 13 19 V - 16 19 V - 20 18 V - 24 18 V - 27 17 V - 31 16 V - 34 16 V - 36 14 V - 39 13 V - 41 12 V - 43 11 V - 44 9 V - 45 8 V - 46 7 V - 45 4 V - 45 4 V - 44 1 V - 42 0 V - 40 -1 V - 38 -3 V - 34 -4 V - 32 -6 V - 27 -7 V - 23 -7 V - 18 -9 V - 13 -10 V - 8 -10 V - 3 -11 V - -3 -11 V - -8 -11 V - -14 -11 V - -20 -11 V - -26 -10 V - -30 -10 V - -36 -9 V - -41 -7 V - -46 -7 V - -50 -5 V - -54 -4 V - -57 -1 V - -59 -1 V - -62 2 V - -64 4 V - -65 6 V - -65 8 V - -64 10 V - 3393 2042 L - -61 15 V - -60 16 V - -56 19 V - -53 21 V - -48 23 V - -43 24 V - -38 26 V - -32 28 V - -26 28 V - -19 30 V - -12 31 V - -4 31 V - 3 31 V - 10 32 V - 18 32 V - 26 31 V - 33 30 V - 40 30 V - 47 28 V - 54 27 V - 60 25 V - 65 24 V - 70 21 V - 74 20 V - 78 16 V - 81 15 V - 83 11 V - 84 10 V - 85 6 V - 84 3 V - 82 1 V - 81 -2 V - 77 -5 V - 74 -8 V - 68 -10 V - 64 -13 V - 57 -14 V - 50 -17 V - 42 -19 V - 35 -20 V - 26 -21 V - 17 -23 V - 8 -23 V - -1 -24 V - -11 -24 V - -21 -24 V - -30 -23 V - -39 -23 V - -48 -21 V - -57 -20 V - -65 -19 V - -73 -16 V - -79 -14 V - -86 -12 V - -91 -9 V - -96 -5 V - -99 -3 V - -102 0 V - -104 4 V - -104 7 V - -104 10 V - -102 14 V - -100 18 V - -96 21 V - -91 24 V - -86 27 V - -79 30 V - -72 33 V - -64 36 V - -55 37 V - -44 40 V - -35 41 V - -24 43 V - -13 44 V - -2 44 V - 10 44 V - 21 45 V - 33 44 V - 44 43 V - 55 42 V - 65 40 V - 75 38 V - 84 36 V - 93 33 V - 101 30 V - 107 28 V - 112 23 V - 118 20 V - 120 17 V - 123 12 V - 124 8 V - 124 4 V - 122 0 V - 120 -3 V - 115 -8 V - 110 -12 V - 104 -16 V - 97 -19 V - 88 -23 V - 78 -25 V - 68 -28 V - 57 -31 V - 45 -33 V - 32 -34 V - 5009 3027 L - 6 -36 V - -7 -37 V - -21 -37 V - -33 -36 V - -47 -36 V - -60 -34 V - -72 -32 V - -84 -30 V - -95 -28 V - -105 -25 V - -114 -21 V - -122 -17 V - -129 -14 V - -135 -10 V - -139 -5 V - -142 0 V - -144 4 V - -143 8 V - -143 14 V - -139 18 V - -136 23 V - -129 27 V - -123 32 V - -115 36 V - -105 40 V - -94 43 V - -83 47 V - -70 49 V - -56 52 V - -43 54 V - -28 56 V - -12 57 V - 2 57 V - 18 58 V - 34 57 V - 48 56 V - 64 55 V - 77 53 V - 92 51 V - 104 47 V - 116 45 V - 126 41 V - 136 36 V - 145 33 V - 151 27 V - 157 23 V - 161 18 V - 163 12 V - 164 7 V - 162 2 V - 160 -3 V - 156 -9 V - 150 -15 V - 142 -19 V - 134 -24 V - 123 -28 V - 111 -33 V - 99 -36 V - 85 -40 V - 69 -43 V - 54 -46 V - 38 -47 V - 21 -49 V - 3 -49 V - -14 -50 V - -31 -50 V - -49 -49 V - -65 -47 V - -82 -46 V - -97 -43 V - -112 -40 V - -125 -36 V - -138 -33 V - -150 -28 V - -159 -23 V - -167 -18 V - -174 -13 V - -179 -7 V - -182 -1 V - -184 5 V - -183 10 V - -180 17 V - -177 23 V - -170 29 V - -163 34 V - -153 40 V - -142 45 V - -130 50 V - -116 54 V - -100 58 V - -85 61 V - -67 65 V - -48 67 V - -31 69 V - -11 70 V - 8 70 V - 28 71 V - 47 69 V - 65 69 V - 84 66 V - 102 64 V - 118 61 V - 134 57 V - 149 52 V - stroke - 1.000 UL - LTb - 6299 1365 M - 3245 586 L - 901 1601 M - 3245 586 L - 0 2214 V - 901 3815 M - 3245 2800 L - 3054 779 R - 3245 2800 L - 1.000 UP - stroke grestore % colour palette end stroke grestore --- 2027,2032 ---- Binary files octave-2.9.16/doc/interpreter/plot3.pdf and octave-2.9.17/doc/interpreter/plot3.pdf differ Binary files octave-2.9.16/doc/interpreter/plot3.png and octave-2.9.17/doc/interpreter/plot3.png differ diff -cNr octave-2.9.16/doc/interpreter/polar.eps octave-2.9.17/doc/interpreter/polar.eps *** octave-2.9.16/doc/interpreter/polar.eps Wed Oct 31 18:09:45 2007 --- octave-2.9.17/doc/interpreter/polar.eps Fri Nov 9 21:00:17 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: polar.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:45 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: polar.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 21:00:17 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:45 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 21:00:17 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/polar.pdf and octave-2.9.17/doc/interpreter/polar.pdf differ diff -cNr octave-2.9.16/doc/interpreter/set.texi octave-2.9.17/doc/interpreter/set.texi *** octave-2.9.16/doc/interpreter/set.texi Wed Oct 31 18:11:04 2007 --- octave-2.9.17/doc/interpreter/set.texi Sat Nov 10 00:59:57 2007 *************** *** 81,89 **** computes the union of the two sets. @anchor{doc-ismember} ! @deftypefn {Function File} {} ismember (@var{A}, @var{S}) ! Return a matrix the same shape as @var{A} which has 1 if ! @code{A(i,j)} is in @var{S} or 0 if it isn't. @seealso{unique, union, intersection, setxor, setdiff} @end deftypefn --- 81,129 ---- computes the union of the two sets. @anchor{doc-ismember} ! @deftypefn {Function File} {[@var{tf}, @var{a_idx}] =} ismember (@var{A}, @var{S}) ! @deftypefnx {Function File} {[@var{tf}, @var{a_idx}] =} ismember (@var{A}, @var{S}, "rows") ! Return a matrix @var{tf} the same shape as @var{A} which has 1 if ! @code{A(i,j)} is in @var{S} or 0 if it isn't. If a second output argument ! is requested, the indexes into @var{S} of the matching elements are ! also returned. ! ! @example ! @group ! a = [3, 10, 1]; ! s = [0:9]; ! [tf, a_idx] = residue (a, s); ! @result{} tf = [1, 0, 1] ! @result{} a_idx = [4, 0, 2] ! @end group ! @end example ! ! The inputs, @var{A} and @var{S}, may also be cell arrays. ! ! @example ! @group ! a = @{'abc'@}; ! s = @{'abc', 'def'@}; ! [tf, a_idx] = residue (a, s); ! @result{} tf = [1, 0] ! @result{} a_idx = [1, 0] ! @end group ! @end example ! ! With the optional third argument @code{"rows"}, and matrices ! @var{A} and @var{S} with the same number of columns, compare rows in ! @var{A} with the rows in @var{S}. ! ! @example ! @group ! a = [1:3; 5:7; 4:6]; ! s = [0:2; 1:3; 2:4; 3:5; 4:6]; ! [tf, a_idx] = ismember(a, s, 'rows'); ! @result{} tf = logical ([1; 0; 1]) ! @result{} a_idx = [2; 0; 5]; ! @end group ! @end example ! @seealso{unique, union, intersection, setxor, setdiff} @end deftypefn diff -cNr octave-2.9.16/doc/interpreter/sparse.texi octave-2.9.17/doc/interpreter/sparse.texi *** octave-2.9.16/doc/interpreter/sparse.texi Wed Oct 31 18:11:04 2007 --- octave-2.9.17/doc/interpreter/sparse.texi Sat Nov 10 00:59:57 2007 *************** *** 266,275 **** @anchor{doc-spdiags} ! @deftypefn {function File} {[@var{b}, @var{c}] =} spdiags (@var{a}) ! @deftypefnx {function File} {@var{b} =} spdiags (@var{a}, @var{c}) ! @deftypefnx {function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{a}) ! @deftypefnx {function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{m}, @var{n}) A generalization of the function @code{spdiag}. Called with a single input argument, the non-zero diagonals @var{c} of @var{A} are extracted. With two arguments the diagonals to extract are given by the vector --- 266,275 ---- @anchor{doc-spdiags} ! @deftypefn {Function File} {[@var{b}, @var{c}] =} spdiags (@var{a}) ! @deftypefnx {Function File} {@var{b} =} spdiags (@var{a}, @var{c}) ! @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{a}) ! @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{m}, @var{n}) A generalization of the function @code{spdiag}. Called with a single input argument, the non-zero diagonals @var{c} of @var{A} are extracted. With two arguments the diagonals to extract are given by the vector *************** *** 1181,1190 **** Constrained column approximate minimum degree permutation. @code{@var{p} = ccolamd (@var{s})} returns the column approximate minimum degree permutation vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s}, ! @code{@var{s}(:,@var{p})} tends to have sparser LU factors than @var{s}. ! @code{chol (@var{s}(:,@var{p})'*@var{s}(:,@var{p}))} also tends to be ! sparser than @code{chol (@var{s}'*@var{s})}. @code{@var{p} = ccolamd ! (@var{s},1)} optimizes the ordering for @code{lu (@var{s}(:,@var{p}))}. The ordering is followed by a column elimination tree post-ordering. @var{knobs} is an optional one- to five-element input vector, with a default --- 1181,1190 ---- Constrained column approximate minimum degree permutation. @code{@var{p} = ccolamd (@var{s})} returns the column approximate minimum degree permutation vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s}, ! @code{@var{s} (:, @var{p})} tends to have sparser LU factors than @var{s}. ! @code{chol (@var{s} (:, @var{p})' * @var{s} (:, @var{p}))} also tends to be ! sparser than @code{chol (@var{s}' * @var{s})}. @code{@var{p} = ccolamd ! (@var{s}, 1)} optimizes the ordering for @code{lu (@var{s} (:, @var{p}))}. The ordering is followed by a column elimination tree post-ordering. @var{knobs} is an optional one- to five-element input vector, with a default *************** *** 1193,1210 **** @table @code @item @var{knobs}(1) ! if nonzero, the ordering is optimized for @code{lu(S(:,p))}. It will be a ! poor ordering for @code{chol(@var{s}(:,@var{p})'*@var{s}(:,@var{p}))}. This ! is the most important knob for ccolamd. @item @var{knob}(2) ! if @var{s} is m-by-n, rows with more than @code{max(16,@var{knobs}(2)* ! sqrt(n))} entries are ignored. @item @var{knob}(3) ! columns with more than @code{max(16,@var{knobs}(3)*sqrt(min(m,n)))} ! entries are ignored and ordered last in the output permutation (subject ! to the cmember constraints). @item @var{knob}(4) if nonzero, aggressive absorption is performed. --- 1193,1210 ---- @table @code @item @var{knobs}(1) ! if nonzero, the ordering is optimized for @code{lu (S (:, p))}. It will be a ! poor ordering for @code{chol (@var{s} (:, @var{p})' * @var{s} (:, ! @var{p}))}. This is the most important knob for ccolamd. @item @var{knob}(2) ! if @var{s} is m-by-n, rows with more than @code{max (16, @var{knobs} (2) * ! sqrt (n))} entries are ignored. @item @var{knob}(3) ! columns with more than @code{max (16, @var{knobs} (3) * sqrt (min (@var{m}, ! @var{n})))} entries are ignored and ordered last in the output permutation ! (subject to the cmember constraints). @item @var{knob}(4) if nonzero, aggressive absorption is performed. *************** *** 1215,1250 **** @end table @var{cmember} is an optional vector of length n. It defines the constraints ! on the column ordering. If @code{@var{cmember}(j) = @var{c}}, then column j ! is in constraint set @var{c} (@var{c} must be in the range 1 to n). In ! the output permutation @var{p}, all columns in set 1 appear first, followed ! by all columns in set 2, and so on. @code{@var{cmember} = ones(1,n)} if ! not present or empty. @code{ccolamd (@var{s},[],1:n)} returns @code{1:n} ! @code{@var{p} = ccolamd(@var{s})} is about the same as @code{@var{p} = ! colamd(@var{s})}. @var{knobs} and its default values differ. @code{colamd} always does aggressive absorption, and it finds an ordering suitable for ! both @code{lu(@var{s}(:,@var{p}))} and @code{chol(@var{S}(:,@var{p})'* ! @var{s}(:,@var{p}))}; it cannot optimize its ordering for @code{lu(@var{s} ! (:,@var{p}))} to the extent that @code{ccolamd(@var{s},1)} can. @var{stats} is an optional 20-element output vector that provides data about the ordering and the validity of the input matrix @var{s}. Ordering ! statistics are in @code{@var{stats} (1:3)}. @code{@var{stats} (1)} and @code{@var{stats} (2)} are the number of dense or empty rows and columns ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage collections performed on the internal data structure used by CCOLAMD ! (roughly of size @code{2.2 * nnz(@var{s}) + 4 * @var{m} + 7 * @var{n}} integers). ! @code{@var{stats} (4:7)} provide information if CCOLAMD was able to continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if invalid. @code{@var{stats} (5)} is the rightmost column index that is unsorted or contains duplicate entries, or zero if no such column exists. @code{@var{stats} (6)} is the last seen duplicate or out-of-order row index in the column index given by @code{@var{stats} (5)}, or zero if no such row index exists. @code{@var{stats} (7)} is the number of duplicate ! or out-of-order row indices. @code{@var{stats} (8:20)} is always zero in the current version of CCOLAMD (reserved for future use). The authors of the code itself are S. Larimore, T. Davis (Uni of Florida) --- 1215,1252 ---- @end table @var{cmember} is an optional vector of length n. It defines the constraints ! on the column ordering. If @code{@var{cmember} (j) = @var{c}}, then column ! @var{j} is in constraint set @var{c} (@var{c} must be in the range 1 to ! @var{n}). In the output permutation @var{p}, all columns in set 1 appear ! first, followed by all columns in set 2, and so on. @code{@var{cmember} = ! ones(1,n)} if not present or empty. @code{ccolamd (@var{s}, [], 1 : ! @var{n})} returns @code{1 : @var{n}} ! @code{@var{p} = ccolamd (@var{s})} is about the same as @code{@var{p} = ! colamd (@var{s})}. @var{knobs} and its default values differ. @code{colamd} always does aggressive absorption, and it finds an ordering suitable for ! both @code{lu (@var{s} (:, @var{p}))} and @code{chol (@var{S} (:, @var{p})' ! * @var{s} (:, @var{p}))}; it cannot optimize its ordering for ! @code{lu (@var{s} (:, @var{p}))} to the extent that ! @code{ccolamd (@var{s}, 1)} can. @var{stats} is an optional 20-element output vector that provides data about the ordering and the validity of the input matrix @var{s}. Ordering ! statistics are in @code{@var{stats} (1 : 3)}. @code{@var{stats} (1)} and @code{@var{stats} (2)} are the number of dense or empty rows and columns ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage collections performed on the internal data structure used by CCOLAMD ! (roughly of size @code{2.2 * nnz (@var{s}) + 4 * @var{m} + 7 * @var{n}} integers). ! @code{@var{stats} (4 : 7)} provide information if CCOLAMD was able to continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if invalid. @code{@var{stats} (5)} is the rightmost column index that is unsorted or contains duplicate entries, or zero if no such column exists. @code{@var{stats} (6)} is the last seen duplicate or out-of-order row index in the column index given by @code{@var{stats} (5)}, or zero if no such row index exists. @code{@var{stats} (7)} is the number of duplicate ! or out-of-order row indices. @code{@var{stats} (8 : 20)} is always zero in the current version of CCOLAMD (reserved for future use). The authors of the code itself are S. Larimore, T. Davis (Uni of Florida) *************** *** 1567,1574 **** @item If the matrix is not square, or any of the previous solvers flags a singular or near singular matrix, find a minimum norm solution using ! CXSPARSE@footnote{CHOLMOD, UMFPACK and CXSPARSE are written by Tim Davis ! and are available at http://www.cise.ufl.edu/research/sparse/}. @end enumerate The band density is defined as the number of non-zero values in the matrix --- 1569,1577 ---- @item If the matrix is not square, or any of the previous solvers flags a singular or near singular matrix, find a minimum norm solution using ! CXSPARSE@footnote{The CHOLMOD, UMFPACK and CXSPARSE packages were ! written by Tim Davis and are available at ! http://www.cise.ufl.edu/research/sparse/}. @end enumerate The band density is defined as the number of non-zero values in the matrix *************** *** 2632,2638 **** @end ifset @end ifset @end ifset - - @c Local Variables: *** - @c Mode: texinfo *** - @c End: *** --- 2635,2637 ---- diff -cNr octave-2.9.16/doc/interpreter/sparse.txi octave-2.9.17/doc/interpreter/sparse.txi *** octave-2.9.16/doc/interpreter/sparse.txi Fri Oct 12 20:52:13 2007 --- octave-2.9.17/doc/interpreter/sparse.txi Fri Nov 2 12:13:43 2007 *************** *** 792,799 **** @item If the matrix is not square, or any of the previous solvers flags a singular or near singular matrix, find a minimum norm solution using ! CXSPARSE@footnote{CHOLMOD, UMFPACK and CXSPARSE are written by Tim Davis ! and are available at http://www.cise.ufl.edu/research/sparse/}. @end enumerate The band density is defined as the number of non-zero values in the matrix --- 792,800 ---- @item If the matrix is not square, or any of the previous solvers flags a singular or near singular matrix, find a minimum norm solution using ! CXSPARSE@footnote{The CHOLMOD, UMFPACK and CXSPARSE packages were ! written by Tim Davis and are available at ! http://www.cise.ufl.edu/research/sparse/}. @end enumerate The band density is defined as the number of non-zero values in the matrix *************** *** 1137,1143 **** @end ifset @end ifset @end ifset - - @c Local Variables: *** - @c Mode: texinfo *** - @c End: *** --- 1138,1140 ---- diff -cNr octave-2.9.16/doc/interpreter/spchol.eps octave-2.9.17/doc/interpreter/spchol.eps *** octave-2.9.16/doc/interpreter/spchol.eps Wed Oct 31 18:09:11 2007 --- octave-2.9.17/doc/interpreter/spchol.eps Fri Nov 9 20:59:42 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: spchol.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:11 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: spchol.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:42 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:11 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:42 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/spchol.pdf and octave-2.9.17/doc/interpreter/spchol.pdf differ diff -cNr octave-2.9.16/doc/interpreter/spcholperm.eps octave-2.9.17/doc/interpreter/spcholperm.eps *** octave-2.9.16/doc/interpreter/spcholperm.eps Wed Oct 31 18:09:13 2007 --- octave-2.9.17/doc/interpreter/spcholperm.eps Fri Nov 9 20:59:45 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: spcholperm.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:13 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: spcholperm.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:45 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:13 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:45 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/spcholperm.pdf and octave-2.9.17/doc/interpreter/spcholperm.pdf differ diff -cNr octave-2.9.16/doc/interpreter/spmatrix.eps octave-2.9.17/doc/interpreter/spmatrix.eps *** octave-2.9.16/doc/interpreter/spmatrix.eps Wed Oct 31 18:09:08 2007 --- octave-2.9.17/doc/interpreter/spmatrix.eps Fri Nov 9 20:59:40 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: spmatrix.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:08 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: spmatrix.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:40 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:08 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:40 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/spmatrix.pdf and octave-2.9.17/doc/interpreter/spmatrix.pdf differ diff -cNr octave-2.9.16/doc/interpreter/system.texi octave-2.9.17/doc/interpreter/system.texi *** octave-2.9.16/doc/interpreter/system.texi Wed Oct 31 18:11:05 2007 --- octave-2.9.17/doc/interpreter/system.texi Sat Nov 10 00:59:57 2007 *************** *** 193,199 **** @example @group ! mktime (localtime (time ()) @result{} 856163706 @end group @end example --- 193,199 ---- @example @group ! mktime (localtime (time ())) @result{} 856163706 @end group @end example *************** *** 208,214 **** @example @group ! asctime (localtime (time ()) @result{} "Mon Feb 17 01:15:06 1997\n" @end group @end example --- 208,214 ---- @example @group ! asctime (localtime (time ())) @result{} "Mon Feb 17 01:15:06 1997\n" @end group @end example *************** *** 1601,1607 **** be less than zero and @var{msg} will contain a system-dependent error message. The value of @var{status} contains additional system-dependent information about the subprocess that exited. ! @seealso{WNOHANG, WUNTRACED, WCONTINUED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED} @end deftypefn --- 1601,1607 ---- be less than zero and @var{msg} will contain a system-dependent error message. The value of @var{status} contains additional system-dependent information about the subprocess that exited. ! @seealso{WCONTINUED, WCOREDUMP, WEXITSTATUS, WIFCONTINUED, WIFSIGNALED, WIFSTOPPED, WNOHANG, WSTOPSIG, WTERMSIG, WUNTRACED} @end deftypefn diff -cNr octave-2.9.16/doc/interpreter/triplot.eps octave-2.9.17/doc/interpreter/triplot.eps *** octave-2.9.16/doc/interpreter/triplot.eps Wed Oct 31 18:09:28 2007 --- octave-2.9.17/doc/interpreter/triplot.eps Fri Nov 9 20:59:59 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: triplot.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:28 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: triplot.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:59 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:28 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:59 2007) /DOCINFO pdfmark end } ifelse diff -cNr octave-2.9.16/doc/interpreter/triplot.pdf octave-2.9.17/doc/interpreter/triplot.pdf *** octave-2.9.16/doc/interpreter/triplot.pdf Wed Oct 31 18:09:29 2007 --- octave-2.9.17/doc/interpreter/triplot.pdf Fri Nov 9 21:00:00 2007 *************** *** 48,55 **** endobj 2 0 obj <> startxref 1591 --- 69,75 ---- 0000001274 00000 n trailer << /Size 11 /Root 1 0 R /Info 2 0 R ! /ID [(51»~A‚vŽ´¶Ð:Y·)(51»~A‚vŽ´¶Ð:Y·)] >> startxref 1591 diff -cNr octave-2.9.16/doc/interpreter/voronoi.eps octave-2.9.17/doc/interpreter/voronoi.eps *** octave-2.9.16/doc/interpreter/voronoi.eps Wed Oct 31 18:09:25 2007 --- octave-2.9.17/doc/interpreter/voronoi.eps Fri Nov 9 20:59:57 2007 *************** *** 1,7 **** %!PS-Adobe-2.0 EPSF-2.0 %%Title: voronoi.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Wed Oct 31 18:09:25 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments --- 1,7 ---- %!PS-Adobe-2.0 EPSF-2.0 %%Title: voronoi.eps %%Creator: gnuplot 4.2 patchlevel 0 ! %%CreationDate: Fri Nov 9 20:59:57 2007 %%DocumentFonts: (atend) %%BoundingBox: 50 50 410 302 %%EndComments *************** *** 48,54 **** /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Wed Oct 31 18:09:25 2007) /DOCINFO pdfmark end } ifelse --- 48,54 ---- /Author (John W. Eaton,,,) % /Producer (gnuplot) % /Keywords () ! /CreationDate (Fri Nov 9 20:59:57 2007) /DOCINFO pdfmark end } ifelse Binary files octave-2.9.16/doc/interpreter/voronoi.pdf and octave-2.9.17/doc/interpreter/voronoi.pdf differ Binary files octave-2.9.16/doc/liboctave/liboctave.pdf and octave-2.9.17/doc/liboctave/liboctave.pdf differ Binary files octave-2.9.16/doc/refcard/refcard-a4.pdf and octave-2.9.17/doc/refcard/refcard-a4.pdf differ Binary files octave-2.9.16/doc/refcard/refcard-legal.pdf and octave-2.9.17/doc/refcard/refcard-legal.pdf differ Binary files octave-2.9.16/doc/refcard/refcard-letter.pdf and octave-2.9.17/doc/refcard/refcard-letter.pdf differ diff -cNr octave-2.9.16/libcruft/ChangeLog octave-2.9.17/libcruft/ChangeLog *** octave-2.9.16/libcruft/ChangeLog Fri Oct 26 11:52:57 2007 --- octave-2.9.17/libcruft/ChangeLog Thu Nov 1 13:37:21 2007 *************** *** 1,3 **** --- 1,11 ---- + 2007-11-01 John W. Eaton + + * lapack-xtra/xzlange.f: Include complete implementation of ZLANGE + function here. + + * blas-xtra/xzdotu.f: Include complete implementation of ZDOTU + function here. + 2007-10-26 John W. Eaton * lapack/dlals0.f: New file. diff -cNr octave-2.9.16/libcruft/blas-xtra/xzdotu.f octave-2.9.17/libcruft/blas-xtra/xzdotu.f *** octave-2.9.16/libcruft/blas-xtra/xzdotu.f Wed Jul 25 15:23:57 2007 --- octave-2.9.17/libcruft/blas-xtra/xzdotu.f Thu Nov 1 13:37:21 2007 *************** *** 1,6 **** ! subroutine xzdotu (n, zx, incx, zy, incy, retval) ! double complex zdotu, zx(*), zy(*), retval ! integer n, incx, incy ! retval = zdotu (n, zx, incx, zy, incy) return end --- 1,46 ---- ! *** This subroutine includes all of the ZDOTU function instead of simply ! *** wrapping it in a subroutine to avoid possible differences in the way ! *** complex values are returned by various Fortran compilers. For ! *** example, if we simply wrap the function and compile this file with ! *** gfortran and the library that provides ZDOTU is compiled with a ! *** compiler that uses the g77 (f2c-compatible) calling convention for ! *** complex-valued functions, all hell will break loose. ! ! subroutine xzdotu(n,zx,incx,zy,incy,ztemp) ! ! *** double complex function zdotu(n,zx,incx,zy,incy) ! c ! c forms the dot product of two vectors. ! c jack dongarra, 3/11/78. ! c modified 12/3/93, array(1) declarations changed to array(*) ! c ! double complex zx(*),zy(*),ztemp ! integer i,incx,incy,ix,iy,n ! ztemp = (0.0d0,0.0d0) ! zdotu = (0.0d0,0.0d0) ! if(n.le.0)return ! if(incx.eq.1.and.incy.eq.1)go to 20 ! c ! c code for unequal increments or equal increments ! c not equal to 1 ! c ! ix = 1 ! iy = 1 ! if(incx.lt.0)ix = (-n+1)*incx + 1 ! if(incy.lt.0)iy = (-n+1)*incy + 1 ! do 10 i = 1,n ! ztemp = ztemp + zx(ix)*zy(iy) ! ix = ix + incx ! iy = iy + incy ! 10 continue ! zdotu = ztemp ! return ! c ! c code for both increments equal to 1 ! c ! 20 do 30 i = 1,n ! ztemp = ztemp + zx(i)*zy(i) ! 30 continue ! *** zdotu = ztemp return end diff -cNr octave-2.9.16/libcruft/lapack-xtra/xzlange.f octave-2.9.17/libcruft/lapack-xtra/xzlange.f *** octave-2.9.16/libcruft/lapack-xtra/xzlange.f Fri Jun 30 16:55:37 2000 --- octave-2.9.17/libcruft/lapack-xtra/xzlange.f Thu Nov 1 13:37:21 2007 *************** *** 1,8 **** ! subroutine xzlange (norm, m, n, a, lda, work, retval) ! character norm ! integer lda, m, n ! double precision work (*), zlange, retval ! complex*16 a (lda, *) ! retval = zlange (norm, m, n, a, lda, work) ! return ! end --- 1,155 ---- ! *** This subroutine includes all of the ZLANGE function instead of ! *** simply wrapping it in a subroutine to avoid possible differences in ! *** the way complex values are returned by various Fortran compilers. ! *** For example, if we simply wrap the function and compile this file ! *** with gfortran and the library that provides ZLANGE is compiled with ! *** a compiler that uses the g77 (f2c-compatible) calling convention for ! *** complex-valued functions, all hell will break loose. ! ! SUBROUTINE XZLANGE ( NORM, M, N, A, LDA, WORK, VALUE ) ! ! *** DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK ) ! * ! * -- LAPACK auxiliary routine (version 3.1) -- ! * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. ! * November 2006 ! * ! * .. Scalar Arguments .. ! CHARACTER NORM ! INTEGER LDA, M, N ! * .. ! * .. Array Arguments .. ! DOUBLE PRECISION WORK( * ) ! COMPLEX*16 A( LDA, * ) ! * .. ! * ! * Purpose ! * ======= ! * ! * ZLANGE returns the value of the one norm, or the Frobenius norm, or ! * the infinity norm, or the element of largest absolute value of a ! * complex matrix A. ! * ! * Description ! * =========== ! * ! * ZLANGE returns the value ! * ! * ZLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm' ! * ( ! * ( norm1(A), NORM = '1', 'O' or 'o' ! * ( ! * ( normI(A), NORM = 'I' or 'i' ! * ( ! * ( normF(A), NORM = 'F', 'f', 'E' or 'e' ! * ! * where norm1 denotes the one norm of a matrix (maximum column sum), ! * normI denotes the infinity norm of a matrix (maximum row sum) and ! * normF denotes the Frobenius norm of a matrix (square root of sum of ! * squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. ! * ! * Arguments ! * ========= ! * ! * NORM (input) CHARACTER*1 ! * Specifies the value to be returned in ZLANGE as described ! * above. ! * ! * M (input) INTEGER ! * The number of rows of the matrix A. M >= 0. When M = 0, ! * ZLANGE is set to zero. ! * ! * N (input) INTEGER ! * The number of columns of the matrix A. N >= 0. When N = 0, ! * ZLANGE is set to zero. ! * ! * A (input) COMPLEX*16 array, dimension (LDA,N) ! * The m by n matrix A. ! * ! * LDA (input) INTEGER ! * The leading dimension of the array A. LDA >= max(M,1). ! * ! * WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), ! * where LWORK >= M when NORM = 'I'; otherwise, WORK is not ! * referenced. ! * ! * ===================================================================== ! * ! * .. Parameters .. ! DOUBLE PRECISION ONE, ZERO ! PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) ! * .. ! * .. Local Scalars .. ! INTEGER I, J ! DOUBLE PRECISION SCALE, SUM, VALUE ! * .. ! * .. External Functions .. ! LOGICAL LSAME ! EXTERNAL LSAME ! * .. ! * .. External Subroutines .. ! EXTERNAL ZLASSQ ! * .. ! * .. Intrinsic Functions .. ! INTRINSIC ABS, MAX, MIN, SQRT ! * .. ! * .. Executable Statements .. ! * ! IF( MIN( M, N ).EQ.0 ) THEN ! VALUE = ZERO ! ELSE IF( LSAME( NORM, 'M' ) ) THEN ! * ! * Find max(abs(A(i,j))). ! * ! VALUE = ZERO ! DO 20 J = 1, N ! DO 10 I = 1, M ! VALUE = MAX( VALUE, ABS( A( I, J ) ) ) ! 10 CONTINUE ! 20 CONTINUE ! ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN ! * ! * Find norm1(A). ! * ! VALUE = ZERO ! DO 40 J = 1, N ! SUM = ZERO ! DO 30 I = 1, M ! SUM = SUM + ABS( A( I, J ) ) ! 30 CONTINUE ! VALUE = MAX( VALUE, SUM ) ! 40 CONTINUE ! ELSE IF( LSAME( NORM, 'I' ) ) THEN ! * ! * Find normI(A). ! * ! DO 50 I = 1, M ! WORK( I ) = ZERO ! 50 CONTINUE ! DO 70 J = 1, N ! DO 60 I = 1, M ! WORK( I ) = WORK( I ) + ABS( A( I, J ) ) ! 60 CONTINUE ! 70 CONTINUE ! VALUE = ZERO ! DO 80 I = 1, M ! VALUE = MAX( VALUE, WORK( I ) ) ! 80 CONTINUE ! ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN ! * ! * Find normF(A). ! * ! SCALE = ZERO ! SUM = ONE ! DO 90 J = 1, N ! CALL ZLASSQ( M, A( 1, J ), 1, SCALE, SUM ) ! 90 CONTINUE ! VALUE = SCALE*SQRT( SUM ) ! END IF ! * ! *** ZLANGE = VALUE ! RETURN ! * ! * End of ZLANGE ! * ! END diff -cNr octave-2.9.16/liboctave/CMatrix.cc octave-2.9.17/liboctave/CMatrix.cc *** octave-2.9.16/liboctave/CMatrix.cc Tue Oct 30 15:26:32 2007 --- octave-2.9.17/liboctave/CMatrix.cc Wed Nov 7 20:09:44 2007 *************** *** 2498,2507 **** // We compute the size of rwork and iwork because ZGELSD in // older versions of LAPACK does not return them on a query // call. #if defined (HAVE_LOG2) ! double tmp = log2 (minmn) / static_cast (smlsiz+1) + 1; #else ! double tmp = log (minmn) / static_cast (smlsiz+1) / log (2) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) --- 2498,2509 ---- // We compute the size of rwork and iwork because ZGELSD in // older versions of LAPACK does not return them on a query // call. + double dminmn = static_cast (minmn); + double dsmlsizp1 = static_cast (smlsiz+1); #if defined (HAVE_LOG2) ! double tmp = log2 (dminmn) / dsmlsizp1 + 1; #else ! double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) *************** *** 2668,2677 **** // We compute the size of rwork and iwork because ZGELSD in // older versions of LAPACK does not return them on a query // call. #if defined (HAVE_LOG2) ! double tmp = log2 (minmn) / static_cast (smlsiz+1) + 1; #else ! double tmp = log (minmn) / static_cast (smlsiz+1) / log (2) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) --- 2670,2681 ---- // We compute the size of rwork and iwork because ZGELSD in // older versions of LAPACK does not return them on a query // call. + double dminmn = static_cast (minmn); + double dsmlsizp1 = static_cast (smlsiz+1); #if defined (HAVE_LOG2) ! double tmp = log2 (dminmn) / dsmlsizp1 + 1; #else ! double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) diff -cNr octave-2.9.16/liboctave/ChangeLog octave-2.9.17/liboctave/ChangeLog *** octave-2.9.16/liboctave/ChangeLog Tue Oct 30 21:08:15 2007 --- octave-2.9.17/liboctave/ChangeLog Wed Nov 7 20:09:44 2007 *************** *** 1,3 **** --- 1,20 ---- + 2007-11-07 Michael Goffioul + + * dMatrix.cc, CMatrix.cc: Help MSVC compiler to resolve + ambiguities related to math functions (in C++ mode). + + 2007-11-06 David Bateman + + * intNDArray.cc (intNDArray intNDArray::sum (int) const): + New method. + * intNDarray.h (intNDArray sum (int) const): Declare it. + * boolNDArray.cc (boolNDArray boolNDArray::sum (int) const): + New method. + * boolNDarray.cc (boolNDArray sum (int) const): Declare it. + * MArray-def.h (MARRAY_NORM_BODY): Scale frobenius norm by infinity + norm to avoid issues of over- and underflow. From Rolf Fabian + . + 2007-10-30 David Bateman * DASRT-opts.in, LSODE-opts.in: Doc fixes for small book format. diff -cNr octave-2.9.16/liboctave/DASPK-opts.in octave-2.9.17/liboctave/DASPK-opts.in *** octave-2.9.16/liboctave/DASPK-opts.in Fri Oct 12 17:27:14 2007 --- octave-2.9.17/liboctave/DASPK-opts.in Fri Nov 2 12:13:43 2007 *************** *** 133,139 **** tried if the @code{\"compute consistent initial condition\"} option has been set to 1 (default is 5). ! Note that the maximum number of Newton iterations allowed in all is @code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is set to 2. --- 133,139 ---- tried if the @code{\"compute consistent initial condition\"} option has been set to 1 (default is 5). ! Note that the maximum total number of Newton iterations allowed is @code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is set to 2. diff -cNr octave-2.9.16/liboctave/MArray-defs.h octave-2.9.17/liboctave/MArray-defs.h *** octave-2.9.16/liboctave/MArray-defs.h Fri Oct 12 17:27:14 2007 --- octave-2.9.17/liboctave/MArray-defs.h Tue Nov 6 11:26:13 2007 *************** *** 358,370 **** /* Frobenius norm. */ \ retval = 0; \ \ for (octave_idx_type i = 0; i < len; i++) \ { \ ! double d_abs = std::abs (d[i]); \ retval += d_abs * d_abs; \ } \ \ ! retval = ::sqrt (retval); \ } \ else if (p == 2) \ F77_FCN (blas_norm, BLAS_NORM) (len, d, 1, retval); \ --- 358,382 ---- /* Frobenius norm. */ \ retval = 0; \ \ + /* precondition */ \ + double inf_norm = 0.; \ for (octave_idx_type i = 0; i < len; i++) \ { \ ! double d_abs = std::abs (d[i]); \ ! if (d_abs > inf_norm) \ ! inf_norm = d_abs; \ ! } \ ! inf_norm = (inf_norm == octave_Inf || inf_norm == 0. ? 1.0 : \ ! inf_norm); \ ! double scale = 1. / inf_norm; \ ! \ ! for (octave_idx_type i = 0; i < len; i++) \ ! { \ ! double d_abs = std::abs (d[i]) * scale; \ retval += d_abs * d_abs; \ } \ \ ! retval = ::sqrt (retval) * inf_norm; \ } \ else if (p == 2) \ F77_FCN (blas_norm, BLAS_NORM) (len, d, 1, retval); \ diff -cNr octave-2.9.16/liboctave/boolNDArray.cc octave-2.9.17/liboctave/boolNDArray.cc *** octave-2.9.16/liboctave/boolNDArray.cc Fri Oct 12 17:27:15 2007 --- octave-2.9.17/liboctave/boolNDArray.cc Tue Nov 6 19:28:01 2007 *************** *** 57,62 **** --- 57,68 ---- MX_ND_ANY_ALL_REDUCTION (MX_ND_ANY_EVAL (MX_ND_ANY_EXPR), false); } + boolNDArray + boolNDArray::sum (int dim) const + { + MX_ND_REDUCTION (retval(result_idx) |= elem (iter_idx), true, boolNDArray); + } + boolNDArray boolNDArray::concat (const boolNDArray& rb, const Array& ra_idx) { diff -cNr octave-2.9.16/liboctave/boolNDArray.h octave-2.9.17/liboctave/boolNDArray.h *** octave-2.9.16/liboctave/boolNDArray.h Fri Oct 12 17:27:15 2007 --- octave-2.9.17/liboctave/boolNDArray.h Tue Nov 6 19:28:01 2007 *************** *** 66,71 **** --- 66,73 ---- boolNDArray all (int dim = -1) const; boolNDArray any (int dim = -1) const; + boolNDArray sum (int dim = -1) const; + boolNDArray concat (const boolNDArray& rb, const Array& ra_idx); boolNDArray& insert (const boolNDArray& a, octave_idx_type r, octave_idx_type c); diff -cNr octave-2.9.16/liboctave/dMatrix.cc octave-2.9.17/liboctave/dMatrix.cc *** octave-2.9.16/liboctave/dMatrix.cc Tue Oct 30 15:26:33 2007 --- octave-2.9.17/liboctave/dMatrix.cc Wed Nov 7 20:09:44 2007 *************** *** 2108,2117 **** // We compute the size of iwork because DGELSD in older versions // of LAPACK does not return it on a query call. #if defined (HAVE_LOG2) ! double tmp = log2 (minmn) / static_cast (smlsiz+1) + 1; #else ! double tmp = log (minmn) / static_cast (smlsiz+1) / log (2) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) --- 2108,2119 ---- // We compute the size of iwork because DGELSD in older versions // of LAPACK does not return it on a query call. + double dminmn = static_cast (minmn); + double dsmlsizp1 = static_cast (smlsiz+1); #if defined (HAVE_LOG2) ! double tmp = log2 (dminmn) / dsmlsizp1 + 1; #else ! double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) *************** *** 2271,2280 **** // We compute the size of iwork because DGELSD in older versions // of LAPACK does not return it on a query call. #if defined (HAVE_LOG2) ! double tmp = log2 (minmn) / static_cast (smlsiz+1) + 1; #else ! double tmp = log (minmn) / static_cast (smlsiz+1) / log (2) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) --- 2273,2284 ---- // We compute the size of iwork because DGELSD in older versions // of LAPACK does not return it on a query call. + double dminmn = static_cast (minmn); + double dsmlsizp1 = static_cast (smlsiz+1); #if defined (HAVE_LOG2) ! double tmp = log2 (dminmn) / dsmlsizp1 + 1; #else ! double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; #endif octave_idx_type nlvl = static_cast (tmp); if (nlvl < 0) diff -cNr octave-2.9.16/liboctave/intNDArray.cc octave-2.9.17/liboctave/intNDArray.cc *** octave-2.9.16/liboctave/intNDArray.cc Fri Oct 12 17:27:16 2007 --- octave-2.9.17/liboctave/intNDArray.cc Tue Nov 6 19:28:01 2007 *************** *** 222,227 **** --- 222,234 ---- return is; } + template + intNDArray + intNDArray::sum (int dim) const + { + MX_ND_REDUCTION (retval(result_idx) += intNDArray::elem (iter_idx), 0, intNDArray); + } + /* ;;; Local Variables: *** ;;; mode: C++ *** diff -cNr octave-2.9.16/liboctave/intNDArray.h octave-2.9.17/liboctave/intNDArray.h *** octave-2.9.16/liboctave/intNDArray.h Fri Oct 12 17:27:16 2007 --- octave-2.9.17/liboctave/intNDArray.h Tue Nov 6 19:28:01 2007 *************** *** 73,78 **** --- 73,80 ---- boolNDArray all (int dim = -1) const; boolNDArray any (int dim = -1) const; + intNDArray sum (int dim) const; + intNDArray squeeze (void) const { return intNDArray (MArrayN::squeeze ()); } diff -cNr octave-2.9.16/octMakefile.in octave-2.9.17/octMakefile.in *** octave-2.9.16/octMakefile.in Wed Oct 31 16:35:10 2007 --- octave-2.9.17/octMakefile.in Fri Nov 9 12:08:52 2007 *************** *** 75,81 **** @echo "" @echo "Octave successfully built. Now choose from the following:" @echo "" ! @echo " ./run-octave - to run in place" @echo " make check - to run the tests" @echo " make install - to install" @echo "" --- 75,81 ---- @echo "" @echo "Octave successfully built. Now choose from the following:" @echo "" ! @echo " ./run-octave - to run in place to test before installing" @echo " make check - to run the tests" @echo " make install - to install" @echo "" diff -cNr octave-2.9.16/scripts/ChangeLog octave-2.9.17/scripts/ChangeLog *** octave-2.9.16/scripts/ChangeLog Wed Oct 31 13:11:49 2007 --- octave-2.9.17/scripts/ChangeLog Fri Nov 9 16:28:46 2007 *************** *** 1,3 **** --- 1,232 ---- + 2007-11-09 John W. Eaton + + * plot/__go_draw_axes__.m: Correct test for have_data. + Correct logic in setting palette data. + + * audio/wavread.m, control/base/__bodquist__.m, + control/base/dare.m, control/base/dlqr.m, control/hinf/h2norm.m, + control/system/c2d.m, control/system/is_detectable.m, + control/system/is_signal_list.m, control/system/is_stabilizable.m, + control/system/tfout.m, general/isdefinite.m, + linear-algebra/krylov.m, miscellaneous/compare_versions.m, + optimization/glpk.m, path/savepath.m, plot/findobj.m, + plot/shading.m, polynomial/mpoles.m, polynomial/polyint.m, + signal/freqz.m, signal/hurst.m, sparse/spfun.m, sparse/spones.m, + sparse/spstats.m, testfun/assert.m, testfun/fail.m, + testfun/test.m: Use specific end keywords. + + * plot/surfc.m, plot/meshc.m: Don't change view if hold is on. + + 2007-11-09 Kai Habel + + * plot/mesh.m, plot/pcolor.m, plot/surf.m, plot/surface.m: + Don't change view if hold is on. + + 2007-11-09 David Bateman + + * plot/hidden.m: New function. + * plot/Makefile.in (SOURCES): Add it here. + * plot/meshc.m, plot/mesh.m: Set facecolor to White for hidden + line removal. + * plot/__go_draw_axes__.m: If facecolor is white flag hidden line + removal and if it is "none" don't do hidden line removal. + + * plot/legend.m: Also allow labels for surface and patch types. + * plot/__bar__.m: Split into separate patch pbjects to allow + setting of the legend. + * plot/__go_draw_axes__.m: Set titlespec from keylabel for patch + objects as well. + + * plot/area.m, plot/__area__.m: New functions + * plot/Makefile.in (SOURCES): Add them to the list of files. + + * plot/patch.m: Correctly handle case of axis handle as first arg. + + 2007-11-09 Joseph P. Skudlarek + + * sparse/spdiags.m: Tweak documentation entries to match other uses. + + 2007-11-08 John W. Eaton + + * control/base/dcgain.m, control/base/dre.m, + control/base/impulse.m, control/base/step.m, + control/system/dmr2d.m, control/system/ord2.m, + control/system/sys2ss.m, control/system/sysdimensions.m, + control/system/sysgetsignals.m, control/system/sysout.m, + control/system/tfout.m, control/system/ugain.m, + control/system/zpout.m, control/util/strappend.m: + Don't fail with usage message if nargout is too large. + + * control/hinf/h2syn.m, control/hinf/hinf_ctr.m, + control/hinf/hinfnorm.m, control/hinf/hinfsyn.m, + control/hinf/hinfsyn_chk.m, control/hinf/is_dgkf.m, + control/hinf/wgt1o.m, control/obsolete/dezero.m, + control/obsolete/dlqg.m, control/obsolete/minfo.m, + control/obsolete/packsys.m, control/obsolete/qzval.m, + control/obsolete/rotg.m, control/obsolete/series.m, + control/obsolete/swapcols.m, control/obsolete/swaprows.m, + control/obsolete/syschnames.m, control/obsolete/unpacksys.m, + control/system/__syschnamesl__.m, + control/system/__syscont_disc__.m, + control/system/__sysdefioname__.m, control/system/__sysgroupn__.m, + control/system/__tf2sysl__.m, control/system/__zp2ssg2__.m, + control/system/abcddim.m, control/system/buildssic.m, + control/system/c2d.m, control/system/cellidx.m, + control/system/d2c.m, control/system/dmr2d.m, + control/system/fir2sys.m, control/system/is_abcd.m, + control/system/is_controllable.m, control/system/is_detectable.m, + control/system/is_digital.m, control/system/is_observable.m, + control/system/is_stabilizable.m, control/system/is_stable.m, + control/system/jet707.m, control/system/listidx.m, + control/system/parallel.m, control/system/ss.m, + control/system/ss2sys.m, control/system/ss2zp.m, + control/system/starp.m, control/system/sys2ss.m, + control/system/sys2tf.m, control/system/sys2zp.m, + control/system/sysadd.m, control/system/sysappend.m, + control/system/sysconnect.m, control/system/syscont.m, + control/system/sysdimensions.m, control/system/sysdisc.m, + control/system/sysdup.m, control/system/sysgetsignals.m, + control/system/sysgroup.m, control/system/sysmin.m, + control/system/sysmult.m, control/system/sysout.m, + control/system/sysprune.m, control/system/sysreorder.m, + control/system/sysscale.m, control/system/syssetsignals.m, + control/system/syssub.m, control/system/sysupdate.m, + control/system/tf.m, control/system/tf2ss.m, + control/system/tf2sys.m, control/system/tfout.m, + control/system/zp.m, control/system/zp2ss.m, + control/system/zp2sys.m, control/system/zp2tf.m, + control/system/zpout.m, control/util/__outlist__.m, + control/util/__zgpbal__.m, control/util/axis2dlim.m, + control/util/prompt.m, control/util/sortcom.m, + control/util/zgfmul.m, control/util/zgfslv.m, + control/util/zginit.m, control/util/zgreduce.m, + control/util/zgrownorm.m, control/util/zgscal.m: Style fixes. + + 2007-11-08 David Bateman + + * plot/quiver.m: Fix arrowheads. + + 2007-11-07 Ben Abbott + + * set/ismember.m: Call cell_ismember to handle cellstr args. + Handle "rows" argument. New tests. + (cell_ismember): New function. + + 2007-11-07 John W. Eaton + + * control/base/__bodquist__.m, control/base/__freqresp__.m, + control/base/__stepimp__.m, control/base/are.m, + control/base/ctrb.m, control/base/damp.m, control/base/dare.m, + control/base/dcgain.m, control/base/dgram.m, control/base/dlqr.m, + control/base/dre.m, control/base/impulse.m, control/base/lqe.m, + control/base/lqg.m, control/base/lqr.m, control/base/lsim.m, + control/base/ltifr.m, control/base/nichols.m, + control/base/nyquist.m, control/base/obsv.m, control/base/place.m, + control/base/rlocus.m, control/base/step.m, control/base/tzero.m: + Style fixes. + + 2007-11-07 Muthiah Annamalai + + * control/base/bode_bounds.m, control/base/dgram.m, + control/base/dlyap.m, control/base/freqchkw.m, + control/base/gram.m, control/base/place.m, + control/hinf/hinf_ctr.m, control/hinf/hinfsyn_chk.m, + control/hinf/hinfsyn_ric.m, control/system/is_sample.m, + control/system/is_signal_list.m, control/system/ss2tf.m, + control/system/sys2fir.m, control/system/sysgettsam.m, + control/system/sysgettype.m, control/system/sysreorder.m, + control/system/tf2sys.m, control/system/zp2tf.m, + control/util/axis2dlim.m, control/util/swap.m, + control/util/zgfmul.m, control/util/zgfslv.m, + control/util/zginit.m, control/util/zgreduce.m, + control/util/zgrownorm.m, control/util/zgscal.m, + control/util/zgsgiv.m, control/util/zgshsr.m, general/isa.m, + geometry/inpolygon.m, linear-algebra/housh.m, + miscellaneous/compare_versions.m, miscellaneous/inputname.m, + miscellaneous/run.m, quaternion/qconj.m, + quaternion/qcoordinate_plot.m, quaternion/qderiv.m, + quaternion/qderivmat.m, quaternion/qinv.m, quaternion/qmult.m, + quaternion/qtrans.m, quaternion/qtransvmat.m, signal/fractdiff.m, + signal/freqz_plot.m, signal/periodogram.m, signal/rectangle_lw.m, + signal/rectangle_sw.m, signal/sinc.m, signal/triangle_lw.m, + signal/triangle_sw.m, signal/yulewalker.m, sparse/colperm.m, + sparse/etreeplot.m, sparse/nonzeros.m, sparse/spalloc.m, + sparse/spones.m, sparse/spy.m, specfun/isprime.m, + statistics/distributions/empirical_cdf.m, + statistics/distributions/empirical_inv.m, + statistics/distributions/empirical_pdf.m, + statistics/models/logistic_regression_derivatives.m, + statistics/models/logistic_regression_likelihood.m: Check nargin. + + 2007-11-07 David Bateman + + * general/gradient.m: Correctly convert deltax and deltay scalar + values are scalars to vectors. + + * plot/__go_draw_axes__.m: Fix surfaces for gnuplot 4.0 and for + the meshc.m function. + * plot/meshc.m: Also use the surface function. + + * plot/meshc.m, plot/quiver.m, plot/surfc.m, : New files. + * plot/Makefile.in (SOURCES): Add them to the list. + Also add pcolor.m, shading.m, surf.m, and surface.m to the list. + + 2007-11-07 Michael Zeising + + * audio/wavwrite.m, audio/wavwrite.m: Correct sample scaling. + + 2007-11-07 John W. Eaton + + * plot/__go_draw_axes__.m: Also set have_data to false if any of + the data limits are infinite. + (get_data_limits): Don't do anything if xdat or tx are empty. + (get_axis_limits): Don't do anything if min_val or max_val are + infinite. + + 2007-11-06 David Bateman + + * plot/hist.m: Pass any additional arguments to bar for + treatment. Create a default x value that is always a vector. + + 2007-11-06 Thomas Treichl + + * pkg/pkg.m.m: Check for environment variables CC, CXX, AR, RANLIB + when calling ./configure and add quotes to preserve spaces. + + 2007-11-06 Kai Habel + + * plot/pcolor.m, plot/shading.m, plot/surf.m, plot/surface.m: + New files. + * plot/mesh.m: Call surface to do the real work. + * plot/__go_draw_axes__.m: Use pm3d mode to handle new surface + properties. + + * image/colormap.m: Also return current colormap if nargout and + nargin are both 0. + + 2007-11-05 Michael Goffioul + + * startup/inputrc: Delete key bindings starting with \340 code. + + 2007-11-05 David Bateman + + * linear-algebra/__norm__.m: Scale frobenius norm by infinity norm + to avoid issues of over- and underflow. From Rolf Fabian + . + + 2007-11-02 Olli Saarela + + * time/asctime.m, general/structfun.m: Fix broken @examples in + help texts. + + 2007-11-02 Kai Habel + + * plot/bar.m, plot/barh.m: Doc fix. + + 2007-10-31 John W. Eaton + + * plot/__go_draw_axes__.m: Call undo_string_escapes on obj.keylabel. + 2007-10-31 Michael goffioul * plot/subplot.m: Ignore legend objects when parsing existing axes diff -cNr octave-2.9.16/scripts/DOCSTRINGS octave-2.9.17/scripts/DOCSTRINGS *** octave-2.9.16/scripts/DOCSTRINGS Wed Oct 31 18:08:45 2007 --- octave-2.9.17/scripts/DOCSTRINGS Fri Nov 9 20:59:14 2007 *************** *** 3115,3121 **** System outputs: (1) airspeed and (2) pitch angle. ! @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight Control), Springer, 1994. @seealso{ord2} @end deftypefn listidx --- 3115,3122 ---- System outputs: (1) airspeed and (2) pitch angle. ! @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight ! Control), Springer, 1994. @seealso{ord2} @end deftypefn listidx *************** *** 7116,7122 **** @group s.name1 = "John Smith"; s.name2 = "Jill Jones"; ! structfun (@{x@} regexp (x, '(\w+)$', 'matches')@{1@}, s, 'UniformOutput', false) @end group @end example --- 7117,7123 ---- @group s.name1 = "John Smith"; s.name2 = "Jill Jones"; ! structfun (@@(x) regexp (x, '(\w+)$', 'matches')@{1@}, s, 'UniformOutput', false) @end group @end example *************** *** 9267,9292 **** following values @table @code @item "F" ! Free (unbounded) variable (the constraint is ignored). @item "U" ! Variable with upper bound (@code{A(i,:)*x <= b(i)}). @item "S" ! Fixed Variable (@code{A(i,:)*x = b(i)}). @item "L" ! Variable with lower bound (@code{A(i,:)*x >= b(i)}). @item "D" ! Double-bounded variable (@code{A(i,:)*x >= -b(i)} @emph{and} ! (@code{A(i,:)*x <= b(i)}). @end table @item vartype A column array containing the types of the variables. @table @code ! @item "F" ! "C" ! Continuous variable. ! "I" ! Integer variable @end table @item sense --- 9268,9292 ---- following values @table @code @item "F" ! A free (unbounded) constraint (the constraint is ignored). @item "U" ! An inequality constraint with an upper bound (@code{A(i,:)*x <= b(i)}). @item "S" ! An equality constraint (@code{A(i,:)*x = b(i)}). @item "L" ! An inequality with a lower bound (@code{A(i,:)*x >= b(i)}). @item "D" ! An inequality constraint with both upper and lower bounds ! (@code{A(i,:)*x >= -b(i)} @emph{and} (@code{A(i,:)*x <= b(i)}). @end table @item vartype A column array containing the types of the variables. @table @code ! @item "C" ! A continuous variable. ! @item "I" ! An integer variable. @end table @item sense *************** *** 9985,9990 **** --- 9985,9992 ---- the other options are ignored. @end table @end deftypefn + __area__ + Undocumented internal function. __axes_limits__ Undocumented internal function. __axis_label__ *************** *** 10053,10058 **** --- 10055,10082 ---- of the first (nearest) one. @seealso{get, set} @end deftypefn + area + -*- texinfo -*- + @deftypefn {Function File} {} area (@var{x}, @var{y}) + @deftypefnx {Function File} {} area (@var{x}, @var{y}, @var{lvl}) + @deftypefnx {Function File} {} area (@dots{}, @var{prop}, @var{val}, @dots{}) + @deftypefnx {Function File} {} area (@var{y}, @dots{}) + @deftypefnx {Function File} {} area (@var{h}, @dots{}) + @deftypefnx {Function File} {@var{h} =} area (@dots{}) + Area plot of cummulative sum of the columns of @var{y}. This shows the + contributions of a value to a sum, and is functionally similar to + @code{plot (@var{x}, cumsum (@var{y}, 2))}, except that the area under + the curve is shaded. + + If the @var{x} argument is ommitted it is assumed to be given by + @code{1 : rows (@var{y})}. A value @var{lvl} can be defined that determines + where the base level of the shading under the curve should be defined. + + Additional arguments to the @code{area} function are passed to the + @code{patch}. The optional return value @var{h} provides a handle to + the list of patch objects. + @seealso{plot, patch} + @end deftypefn axes -*- texinfo -*- @deftypefn {Function File} {} axes () *************** *** 10156,10225 **** @end deftypefn bar -*- texinfo -*- ! @deftypefn {Function File} {@var{h} =} bar (@var{x}, @var{y}, @var{p1}, @var{v1}, @dots{}) ! @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} bar (@dots{}) ! Given two vectors of x-y data, @code{bar} produce a bar graph. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! If two output arguments are specified, the data are generated but ! not plotted. For example, ! ! @example ! bar (x, y); ! @end example ! ! @noindent ! and ! ! @example ! [xb, yb] = bar (x, y); ! plot (xb, yb); ! @end example ! @noindent ! are equivalent. ! @seealso{hbar, plot} @end deftypefn barh -*- texinfo -*- ! @deftypefn {Function File} {@var{h} =} barh (@var{x}, @var{y}, @var{style}) ! @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} barh (@dots{}) ! Given two vectors of x-y data, @code{bar} produce a horizontal bar graph. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! If two output arguments are specified, the data are generated but ! not plotted. For example, ! ! @example ! barh (x, y); ! @end example - @noindent - and - - @example - [xb, yb] = barh (x, y); - plot (xb, yb); - @end example - - @noindent - are equivalent. @seealso{bar, plot} @end deftypefn box --- 10180,10233 ---- @end deftypefn bar -*- texinfo -*- ! @deftypefn {Function File} {} bar (@var{x}, @var{y}) ! @deftypefnx {Function File} {} bar (@var{y}) ! @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}) ! @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}, @var{style}) ! @deftypefnx {Function File} {@var{h} =} bar (@dots{}, @var{prop}, @var{val}) ! Produce a bar graph from two vectors of x-y data. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. + The default width of 0.8 for the bars can be changed using @var{w}. + If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! The optional return value @var{h} provides a handle to the patch object. ! Properties of the patch graphics object can be changed using ! @var{prop}, @var{val} pairs. ! @seealso{barh, plot} @end deftypefn barh -*- texinfo -*- ! @deftypefn {Function File} {} barh (@var{x}, @var{y}) ! @deftypefnx {Function File} {} barh (@var{y}) ! @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}) ! @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}, @var{style}) ! @deftypefnx {Function File} {@var{h} =} barh (@dots{}, @var{prop}, @var{val}) ! Produce a horizontal bar graph from two vectors of x-y data. If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements. + The default width of 0.8 for the bars can be changed using @var{w}. + If @var{y} is a matrix, then each column of @var{y} is taken to be a separate bar graph plotted on the same graph. By default the columns are plotted side-by-side. This behavior can be changed by the @var{style} argument, which can take the values @code{"grouped"} (the default), or @code{"stacked"}. ! The optional return value @var{h} provides a handle to the patch object. ! Properties of the patch graphics object can be changed using ! @var{prop}, @var{val} pairs. @seealso{bar, plot} @end deftypefn box *************** *** 10588,10593 **** --- 10596,10610 ---- the minor grid. @seealso{plot} @end deftypefn + hidden + -*- texinfo -*- + @deftypefn {Function File} {} hidden (@var{mode}) + @deftypefnx {Function File} {} hidden () + Manipulation the mesh hidden line removal. Called with no argument + the hidden line removal is toggled. The argument @var{mode} can be either + 'on' or 'off' and the set of the hidden line removal is set accordingly. + @seealso{mesh, meshc, surf} + @end deftypefn hist -*- texinfo -*- @deftypefn {Function File} {} hist (@var{y}, @var{x}, @var{norm}) *************** *** 10685,10695 **** Some specific functions are directly available using @var{func}: ! @table @code @item "show" Show legends from the plot @item "hide" ! @itemx off Hide legends from the plot @item "boxon" Draw a box around legends --- 10702,10712 ---- Some specific functions are directly available using @var{func}: ! @table @asis @item "show" Show legends from the plot @item "hide" ! @itemx "off" Hide legends from the plot @item "boxon" Draw a box around legends *************** *** 10820,10825 **** --- 10837,10854 ---- scalar value referring to the current colormap, or string value (for example, "r" or "red"). @end deftypefn + pcolor + -*- texinfo -*- + @deftypefn {Function File} {} pcolor (@var{x}, @var{y}, @var{c}) + @deftypefnx {Function File} {} pcolor (@var{c}) + Density plot for given matrices @var{x}, and @var{y} from @code{meshgrid} and + a matrix @var{c} corresponding to the @var{x} and @var{y} coordinates of + the mesh. If @var{x} and @var{y} are vectors, then a typical vertex + is (@var{x}(j), @var{y}(i), @var{c}(i,j)). Thus, columns of @var{c} + correspond to different @var{x} values and rows of @var{c} correspond + to different @var{y} values. + @seealso{meshgrid, contour} + @end deftypefn peaks -*- texinfo -*- @deftypefn {Function File} {} peaks () *************** *** 10853,10858 **** --- 10882,10910 ---- @var{y} values can be specified separately. @seealso{mesh} @end deftypefn + pie + -*- texinfo -*- + @deftypefn {Function File} {} pie (@var{y}) + @deftypefnx {Function File} {} pie (@var{y}, @var{explode}) + @deftypefnx {Function File} {} pie (@dots{}, @var{labels}) + @deftypefnx {Function File} {} pie (@var{h}, @dots{}); + @deftypefnx {Function File} {@var{h} =} pie (@dots{}); + Produce a pie chart. + + Called with a single vector arrgument, produces a pie chart of the + elements in @var{x}, with the size of the slice determined by percentage + size of the values of @var{x}. + + The variable @var{explode} is a vector of the same length as @var{x} that + if non zero 'explodes' the slice from the pie chart. + + If given @var{labels} is a cell array of strings of the same length as + @var{x}, giving the labels of each of the slices of the pie chart. + + The optional return value @var{h} provides a handle to the patch object. + + @seealso{bar, stem} + @end deftypefn plot -*- texinfo -*- @deftypefn {Function File} {} plot (@var{y}) *************** *** 11180,11185 **** --- 11232,11277 ---- The filename and options can be given in any order. @end deftypefn + quiver + -*- texinfo -*- + @deftypefn {Function File} {} quiver (@var{u}, @var{v}) + @deftypefnx {Function File} {} quiver (@var{x}, @var{y}, @var{u}, @var{v}) + @deftypefnx {Function File} {} quiver (@dots{}, @var{s}) + @deftypefnx {Function File} {} quiver (@dots{}, @var{style}) + @deftypefnx {Function File} {} quiver (@dots{}, 'filled') + @deftypefnx {Function File} {} quiver (@var{h}, @dots{}) + @deftypefnx {Function File} {@var{h} =} quiver (@dots{}) + + Plot the @code{(@var{u}, @var{v})} components of a vector field in + an @code{(@var{x}, @var{y})} meshgrid. If the grid is uniform, you can + specify @var{x} and @var{y} as vectors. + + If @var{x} and @var{y} are undefined they are assumed to be + @code{(1:@var{m}, 1:@var{n})} where @code{[@var{m}, @var{n}] = + size(@var{u})}. + + The variable @var{s} is a scalar defining a scaling factor to use for + the arrows of the field relative to the mesh spacing. A value of 0 + disables all scaling. The default value is 1. + + The style to use for the plot can be defined with a line style @var{style} + in a similar manner to the line styles used with the @code{plot} command. + If a marker is specified then markers at the grid points of the vectors are + printed rather than arrows. If the argument 'filled' is given then the + markers as filled. + + The optional return value @var{h} provides a list of handles to the + the parts of the vector field (body, arrow and marker). + + @example + @group + [x, y] = meshgrid (1:2:20); + quiver (x, y, sin (2*pi*x/10), sin (2*pi*y/10)); + @end group + @end example + + @seealso{plot} + @end deftypefn replot -*- texinfo -*- @deftypefn {Function File} {} replot () *************** *** 11237,11242 **** --- 11329,11343 ---- additional information. @seealso{errorbar, loglogerr semilogxerr} @end deftypefn + shading + -*- texinfo -*- + @deftypefn {Function File} {} shading (@var{type}) + @deftypefnx {Function File} {} shading (@var{ax}, @dots{}) + Set the shading of surface or patch graphic objects. Valid arguments + for @var{type} are @code{"flat"}, @code{"interp"}, or + @code{"faceted"}. If @var{ax} is given the shading is applied to + axis @var{ax} instead of the current axis. + @end deftypefn shg -*- texinfo -*- @deftypefn {Function File} {} shg *************** *** 11381,11388 **** \vskip 10pt \hfil\vbox{\offinterlineskip\hrule \halign{\vrule#&&\qquad\hfil#\hfil\qquad\vrule\cr ! height13pt&1&2&3\cr height12pt&&&&\cr\noalign{\hrule} ! height13pt&4&5&6\cr height12pt&&&&\cr\noalign{\hrule}}} \hfil \vskip 10pt @end tex --- 11482,11489 ---- \vskip 10pt \hfil\vbox{\offinterlineskip\hrule \halign{\vrule#&&\qquad\hfil#\hfil\qquad\vrule\cr ! height13pt&1&2&3\cr height12pt&&&\cr\noalign{\hrule} ! height13pt&4&5&6\cr height12pt&&&\cr\noalign{\hrule}}} \hfil \vskip 10pt @end tex *************** *** 11403,11408 **** --- 11504,11543 ---- @end ifinfo @seealso{plot} @end deftypefn + surf + -*- texinfo -*- + @deftypefn {Function File} {} surf (@var{x}, @var{y}, @var{z}) + Plot a surface given matrices @var{x}, and @var{y} from @code{meshgrid} and + a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of + the mesh. If @var{x} and @var{y} are vectors, then a typical vertex + is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, columns of @var{z} + correspond to different @var{x} values and rows of @var{z} correspond + to different @var{y} values. + @seealso{mesh, surface} + @end deftypefn + surface + -*- texinfo -*- + @deftypefn {Function File} @var{h} = {} surface (@var{x}, @var{y}, @var{z}, @var{c}) + @deftypefnx {Function File} @var{h} = {} surface (@var{x}, @var{y}, @var{z}) + Plot a surface graphic object given matrices @var{x}, and @var{y} from @code{meshgrid} and + a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of + the surface. If @var{x} and @var{y} are vectors, then a typical vertex + is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, columns of @var{z} + correspond to different @var{x} values and rows of @var{z} correspond + to different @var{y} values. + @seealso{surf, mesh, patch, line} + @end deftypefn + surfc + -*- texinfo -*- + @deftypefn {Function File} {} surfc (@var{x}, @var{y}, @var{z}) + Plot a surface and contour given matrices @var{x}, and @var{y} from + @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and + @var{y} coordinates of the mesh. If @var{x} and @var{y} are vectors, + then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, + columns of @var{z} correspond to different @var{x} values and rows of + @var{z} correspond to different @var{y} values. + @seealso{meshgrid, surf, contour} + @end deftypefn text -*- texinfo -*- @deftypefn {Function File} {@var{h} =} text (@var{x}, @var{y}, @var{label}) *************** *** 12301,12309 **** @seealso{unique, union, setxor, setdiff, ismember} ismember -*- texinfo -*- ! @deftypefn {Function File} {} ismember (@var{A}, @var{S}) ! Return a matrix the same shape as @var{A} which has 1 if ! @code{A(i,j)} is in @var{S} or 0 if it isn't. @seealso{unique, union, intersection, setxor, setdiff} @end deftypefn setdiff --- 12436,12484 ---- @seealso{unique, union, setxor, setdiff, ismember} ismember -*- texinfo -*- ! @deftypefn {Function File} {[@var{tf}, @var{a_idx}] =} ismember (@var{A}, @var{S}) ! @deftypefnx {Function File} {[@var{tf}, @var{a_idx}] =} ismember (@var{A}, @var{S}, "rows") ! Return a matrix @var{tf} the same shape as @var{A} which has 1 if ! @code{A(i,j)} is in @var{S} or 0 if it isn't. If a second output argument ! is requested, the indexes into @var{S} of the matching elements are ! also returned. ! ! @example ! @group ! a = [3, 10, 1]; ! s = [0:9]; ! [tf, a_idx] = residue (a, s); ! @result{} tf = [1, 0, 1] ! @result{} a_idx = [4, 0, 2] ! @end group ! @end example ! ! The inputs, @var{A} and @var{S}, may also be cell arrays. ! ! @example ! @group ! a = @{'abc'@}; ! s = @{'abc', 'def'@}; ! [tf, a_idx] = residue (a, s); ! @result{} tf = [1, 0] ! @result{} a_idx = [1, 0] ! @end group ! @end example ! ! With the optional third argument @code{"rows"}, and matrices ! @var{A} and @var{S} with the same number of columns, compare rows in ! @var{A} with the rows in @var{S}. ! ! @example ! @group ! a = [1:3; 5:7; 4:6]; ! s = [0:2; 1:3; 2:4; 3:5; 4:6]; ! [tf, a_idx] = ismember(a, s, 'rows'); ! @result{} tf = logical ([1; 0; 1]) ! @result{} a_idx = [2; 0; 5]; ! @end group ! @end example ! @seealso{unique, union, intersection, setxor, setdiff} @end deftypefn setdiff *************** *** 13311,13320 **** @end deftypefn spdiags -*- texinfo -*- ! @deftypefn {function File} {[@var{b}, @var{c}] =} spdiags (@var{a}) ! @deftypefnx {function File} {@var{b} =} spdiags (@var{a}, @var{c}) ! @deftypefnx {function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{a}) ! @deftypefnx {function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{m}, @var{n}) A generalization of the function @code{spdiag}. Called with a single input argument, the non-zero diagonals @var{c} of @var{A} are extracted. With two arguments the diagonals to extract are given by the vector --- 13486,13495 ---- @end deftypefn spdiags -*- texinfo -*- ! @deftypefn {Function File} {[@var{b}, @var{c}] =} spdiags (@var{a}) ! @deftypefnx {Function File} {@var{b} =} spdiags (@var{a}, @var{c}) ! @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{a}) ! @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{m}, @var{n}) A generalization of the function @code{spdiag}. Called with a single input argument, the non-zero diagonals @var{c} of @var{A} are extracted. With two arguments the diagonals to extract are given by the vector *************** *** 16891,16897 **** @example @group ! asctime (localtime (time ()) @result{} "Mon Feb 17 01:15:06 1997\n" @end group @end example --- 17066,17072 ---- @example @group ! asctime (localtime (time ())) @result{} "Mon Feb 17 01:15:06 1997\n" @end group @end example diff -cNr octave-2.9.16/scripts/audio/wavread.m octave-2.9.17/scripts/audio/wavread.m *** octave-2.9.16/scripts/audio/wavread.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/audio/wavread.m Fri Nov 9 14:34:17 2007 *************** *** 38,44 **** ## @seealso{wavwrite} ## @end deftypefn ! ## Author: Michael Zeising ## Created: 06 December 2005 function [y, samples_per_sec, bits_per_sample] = wavread (filename, param) --- 38,44 ---- ## @seealso{wavwrite} ## @end deftypefn ! ## Author: Michael Zeising ## Created: 06 December 2005 function [y, samples_per_sec, bits_per_sample] = wavread (filename, param) *************** *** 115,121 **** fclose (fid); error ("wavread: file contains no data chunk"); endif ! end ## data chunk size ck_size = fread (fid, 1, "uint32", 0, BYTEORDER); --- 115,121 ---- fclose (fid); error ("wavread: file contains no data chunk"); endif ! endwhile ## data chunk size ck_size = fread (fid, 1, "uint32", 0, BYTEORDER); *************** *** 190,207 **** yi = reshape (yi, 3, rows(yi)/3)'; yi(yi(:,3) >= 128, 3) -= 256; yi = yi * [1; 256; 65536]; ! end if (format_tag == FORMAT_PCM) ## normalize samples switch (bits_per_sample) case 8 ! yi = (yi - 127.5)/127.5; case 16 ! yi /= 32768; case 24 ! yi /= 8388608; case 32 ! yi /= 2147483648; endswitch endif --- 190,208 ---- yi = reshape (yi, 3, rows(yi)/3)'; yi(yi(:,3) >= 128, 3) -= 256; yi = yi * [1; 256; 65536]; ! endif ! if (format_tag == FORMAT_PCM) ## normalize samples switch (bits_per_sample) case 8 ! yi = (yi - 128)/127; case 16 ! yi /= 32767; case 24 ! yi /= 8388607; case 32 ! yi /= 2147483647; endswitch endif diff -cNr octave-2.9.16/scripts/audio/wavwrite.m octave-2.9.17/scripts/audio/wavwrite.m *** octave-2.9.16/scripts/audio/wavwrite.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/audio/wavwrite.m Wed Nov 7 13:48:00 2007 *************** *** 27,33 **** ## @seealso{wavread} ## @end deftypefn ! ## Author: Michael Zeising ## Created: 06 December 2005 function wavwrite (y, varargin) --- 27,33 ---- ## @seealso{wavread} ## @end deftypefn ! ## Author: Michael Zeising ## Created: 06 December 2005 function wavwrite (y, varargin) *************** *** 147,157 **** ## scale samples switch (bits_per_sample) case 8 ! yi = round (yi*128 + 128); case 16 ! yi = round (yi*32768); case 32 ! yi = round (yi*2147483648); endswitch ## write to file --- 147,157 ---- ## scale samples switch (bits_per_sample) case 8 ! yi = round (yi*127 + 128); case 16 ! yi = round (yi*32767); case 32 ! yi = round (yi*2147483647); endswitch ## write to file diff -cNr octave-2.9.16/scripts/control/base/__bodquist__.m octave-2.9.17/scripts/control/base/__bodquist__.m *** octave-2.9.16/scripts/control/base/__bodquist__.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/__bodquist__.m Fri Nov 9 14:34:17 2007 *************** *** 61,96 **** endif ## check each argument to see if it's in the correct form ! if (!isstruct(sys)) ! error("sys must be a system data structure"); endif ## let __freqresp__ determine w if it's not already given ! USEW = freqchkw(w); ## get initial dimensions (revised below if sysprune is called) ! [nn,nz,mm,pp ] = sysdimensions(sys); ## check for an output vector and to see whether it`s correct ! if (!isempty(outputs)) ! if (isempty(inputs)) inputs = 1:mm; # use all inputs ! warning([rname,": outputs specified but not inputs"]); ! elseif(is_signal_list(inputs) | ischar(inputs)) ! inputs = sysidx(sys,"in",inputs); endif ! if(is_signal_list(outputs) | ischar(outputs)) ! outputs = sysidx(sys,"out",outputs); ! end ! sys = sysprune(sys,outputs,inputs); ! [nn,nz,mm,pp ] = sysdimensions(sys); endif ## for speed in computation, convert local copy of ## SISO state space systems to zero-pole form ! if( is_siso(sys) & strcmp( sysgettype(sys), "ss") ) ! [zer,pol,k,tsam,inname,outname] = sys2zp(sys); ! sys = zp(zer,pol,k,tsam,inname,outname); endif ## get system frequency response --- 61,96 ---- endif ## check each argument to see if it's in the correct form ! if (! isstruct (sys)) ! error ("sys must be a system data structure"); endif ## let __freqresp__ determine w if it's not already given ! USEW = freqchkw (w); ## get initial dimensions (revised below if sysprune is called) ! [nn, nz, mm, pp] = sysdimensions (sys); ## check for an output vector and to see whether it`s correct ! if (! isempty (outputs)) ! if (isempty (inputs)) inputs = 1:mm; # use all inputs ! warning ("%s: outputs specified but not inputs", rname); ! elseif (is_signal_list (inputs) || ischar (inputs)) ! inputs = sysidx (sys, "in", inputs); endif ! if (is_signal_list (outputs) || ischar (outputs)) ! outputs = sysidx (sys, "out", outputs); ! endif ! sys = sysprune (sys, outputs, inputs); ! [nn, nz, mm, pp] = sysdimensions (sys); endif ## for speed in computation, convert local copy of ## SISO state space systems to zero-pole form ! if (is_siso (sys) && strcmp (sysgettype (sys), "ss")) ! [zer, pol, k, tsam, inname, outname] = sys2zp (sys); ! sys = zp (zer, pol, k, tsam, inname, outname); endif ## get system frequency response *************** *** 98,143 **** phase = arg(f)*180.0/pi; ! if(!USEW) ## smooth plots pcnt = 5; # max number of refinement steps dphase = 5; # desired max change in phase dmag = 0.2; # desired max change in magnitude ! while(pcnt) ! pd = abs(diff(phase)); # phase variation ! pdbig = find(pd > dphase); ! ! lp = length(f); lp1 = lp-1; # relative variation ! fd = abs(diff(f)); ! fm = max(abs([f(1:lp1); f(2:lp)])); ! fdbig = find(fd > fm/10); ! bigpts = union(fdbig, pdbig); ! if(isempty(bigpts) ) pcnt = 0; else pcnt = pcnt - 1; wnew = []; ! crossover_points = find ( phase(1:lp1).*phase(2:lp) < 0); ! pd(crossover_points) = abs(359.99+dphase - pd(crossover_points)); ! np_pts = max(3,ceil(pd/dphase)+2); # phase points ! nm_pts = max(3,ceil(log(fd./fm)/log(dmag))+2); # magnitude points ! npts = min(5,max(np_pts, nm_pts)); ! ! w1 = log10(w(1:lp1)); ! w2 = log10(w(2:lp)); ! for ii=bigpts ! if(npts(ii)) ! wtmp = logspace(w1(ii),w2(ii),npts(ii)); wseg(ii,1:(npts(ii)-2)) = wtmp(2:(npts(ii)-1)); endif endfor wnew = vec(wseg)'; # make a row vector ! wnew = wnew(find(wnew != 0)); ! wnew = sort(wnew); ! wnew = create_set(wnew); ! if(isempty(wnew)) # all small crossovers pcnt = 0; else ## get new freq resp points, combine with old, and sort. --- 98,146 ---- phase = arg(f)*180.0/pi; ! if (! USEW) ## smooth plots pcnt = 5; # max number of refinement steps dphase = 5; # desired max change in phase dmag = 0.2; # desired max change in magnitude ! while (pcnt) ! pd = abs (diff (phase)); # phase variation ! pdbig = find (pd > dphase); ! ! ## relative variation ! lp = length (f); ! lp1 = lp-1; ! ! fd = abs (diff (f)); ! fm = max (abs ([f(1:lp1); f(2:lp)])); ! fdbig = find (fd > fm/10); ! bigpts = union (fdbig, pdbig); ! if (isempty (bigpts)) pcnt = 0; else pcnt = pcnt - 1; wnew = []; ! crossover_points = find (phase(1:lp1).*phase(2:lp) < 0); ! pd(crossover_points) = abs (359.99+dphase - pd(crossover_points)); ! np_pts = max (3, ceil(pd/dphase)+2); # phase points ! nm_pts = max (3, ceil(log(fd./fm)/log(dmag))+2); # magnitude points ! npts = min (5, max(np_pts, nm_pts)); ! ! w1 = log10 (w(1:lp1)); ! w2 = log10 (w(2:lp)); ! for ii = bigpts ! if (npts(ii)) ! wtmp = logspace (w1(ii), w2(ii), npts(ii)); wseg(ii,1:(npts(ii)-2)) = wtmp(2:(npts(ii)-1)); endif endfor wnew = vec(wseg)'; # make a row vector ! wnew = wnew(find (wnew != 0)); ! wnew = sort (wnew); ! wnew = create_set (wnew); ! if (isempty (wnew)) # all small crossovers pcnt = 0; else ## get new freq resp points, combine with old, and sort. *************** *** 153,164 **** endif ## ensure unique frequency values ! [w,idx] = sort(w); f = f(idx); ! w_diff = diff(w); ! w_dup = find(w_diff == 0); ! w_idx = complement(w_dup,1:length(w)); w = w(w_idx); f = f(w_idx); --- 156,167 ---- endif ## ensure unique frequency values ! [w, idx] = sort (w); f = f(idx); ! w_diff = diff (w); ! w_dup = find (w_diff == 0); ! w_idx = complement (w_dup, 1:length(w)); w = w(w_idx); f = f(w_idx); diff -cNr octave-2.9.16/scripts/control/base/__freqresp__.m octave-2.9.17/scripts/control/base/__freqresp__.m *** octave-2.9.16/scripts/control/base/__freqresp__.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/__freqresp__.m Wed Nov 7 22:44:14 2007 *************** *** 50,131 **** ## SYS_INTERNAL accesses members of system data structure ## Check Args ! if ((nargin < 2) || (nargin > 4)) print_usage (); ! elseif (USEW & (nargin < 3) ) error ("USEW = 1 but w was not passed."); ! elseif (USEW & isempty(w)) ! warning("USEW = 1 but w is empty; setting USEW=0"); USEW = 0; endif ! DIGITAL = is_digital(sys); ## compute default w if needed ! if(!USEW) ! if(is_siso(sys)) ! sys = sysupdate(sys,"zp"); ! [zer,pol] = sys2zp(sys); else ! zer = tzero(sys); ! pol = eig(sys2ss(sys)); endif ## get default frequency range ! [wmin,wmax] = bode_bounds(zer,pol,DIGITAL,sysgettsam(sys)); ! w = logspace(wmin,wmax,50); else ! w = reshape(w,1,length(w)); # make sure it's a row vector endif ## now get complex values of s or z ! if(DIGITAL) ! jw = exp(i*w*sysgettsam(sys)); else jw = i*w; endif ! [nn,nz,mm,pp] = sysdimensions(sys); ## now compute the frequency response - divide by zero yields a warning ! if (strcmp(sysgettype(sys),"zp")) ## zero-pole form (preferred) ! [zer,pol,sysk] = sys2zp(sys); ! ff = ones(size(jw)); ! l1 = min(length(zer)*(1-isempty(zer)),length(pol)*(1-isempty(pol))); ! for ii=1:l1 ! ff = ff .* (jw - zer(ii)) ./ (jw - pol(ii)); endfor ## require proper transfer function, so now just get poles. ! for ii=(l1+1):length(pol) ff = ff ./ (jw - pol(ii)); endfor ff = ff*sysk; ! ! elseif (strcmp(sysgettype(sys),"tf")) ## transfer function form ! [num,den] = sys2tf(sys); ! ff = polyval(num,jw)./polyval(den,jw); elseif (mm==pp) ## The system is square; do state-space form bode plot ! [sysa,sysb,sysc,sysd,tsam,sysn,sysnz] = sys2ss(sys); n = sysn + sysnz; ! for ii=1:length(jw); ! ff(ii) = det(sysc*((jw(ii).*eye(n)-sysa)\sysb)+sysd); ! endfor; else ## Must be state space... bode ! [sysa,sysb,sysc,sysd,tsam,sysn,sysnz] = sys2ss(sys); n = sysn + sysnz; ! for ii=1:length(jw); ! ff(ii) = norm(sysc*((jw(ii)*eye(n)-sysa)\sysb)+sysd); endfor - endif ! w = reshape(w,1,length(w)); ! ff = reshape(ff,1,length(ff)); endfunction --- 50,129 ---- ## SYS_INTERNAL accesses members of system data structure ## Check Args ! if (nargin < 2 || nargin > 4) print_usage (); ! elseif (USEW && nargin < 3) error ("USEW = 1 but w was not passed."); ! elseif (USEW && isempty (w)) ! warning ("USEW = 1 but w is empty; setting USEW=0"); USEW = 0; endif ! DIGITAL = is_digital (sys); ## compute default w if needed ! if (! USEW) ! if (is_siso (sys)) ! sys = sysupdate (sys, "zp"); ! [zer, pol] = sys2zp (sys); else ! zer = tzero (sys); ! pol = eig (sys2ss (sys)); endif ## get default frequency range ! [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, sysgettsam (sys)); ! w = logspace (wmin, wmax, 50); else ! w = reshape (w, 1, length (w)); # make sure it's a row vector endif ## now get complex values of s or z ! if (DIGITAL) ! jw = exp (i*w*sysgettsam(sys)); else jw = i*w; endif ! [nn, nz, mm, pp] = sysdimensions (sys); ## now compute the frequency response - divide by zero yields a warning ! if (strcmp (sysgettype (sys), "zp")) ## zero-pole form (preferred) ! [zer, pol, sysk] = sys2zp (sys); ! ff = ones (size (jw)); ! l1 = min (length(zer)*(1-isempty(zer)), length(pol)*(1-isempty(pol))); ! for ii = 1:l1 ! ff = ff .* (jw - zer(ii)) ./ (jw - pol(ii)); endfor ## require proper transfer function, so now just get poles. ! for ii = (l1+1):length(pol) ff = ff ./ (jw - pol(ii)); endfor ff = ff*sysk; ! elseif (strcmp (sysgettype (sys), "tf")) ## transfer function form ! [num, den] = sys2tf (sys); ! ff = polyval (num, jw) ./ polyval (den, jw); elseif (mm==pp) ## The system is square; do state-space form bode plot ! [sysa, sysb, sysc, sysd, tsam, sysn, sysnz] = sys2ss (sys); n = sysn + sysnz; ! for ii = 1:length(jw); ! ff(ii) = det (sysc*((jw(ii).*eye(n)-sysa)\sysb)+sysd); ! endfor else ## Must be state space... bode ! [sysa, sysb, sysc, sysd, tsam, sysn, sysnz] = sys2ss (sys); n = sysn + sysnz; ! for ii = 1:length(jw); ! ff(ii) = norm (sysc*((jw(ii)*eye(n)-sysa)\sysb)+sysd); endfor endif ! w = reshape (w, 1, length (w)); ! ff = reshape (ff, 1, length (ff)); endfunction diff -cNr octave-2.9.16/scripts/control/base/__stepimp__.m octave-2.9.17/scripts/control/base/__stepimp__.m *** octave-2.9.16/scripts/control/base/__stepimp__.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/__stepimp__.m Wed Nov 7 22:44:14 2007 *************** *** 269,273 **** y = []; t = []; endif ! ## printf("##STEPIMP-DEBUG: gratulations, successfull completion.\n"); endfunction --- 269,273 ---- y = []; t = []; endif ! endfunction diff -cNr octave-2.9.16/scripts/control/base/are.m octave-2.9.17/scripts/control/base/are.m *** octave-2.9.16/scripts/control/base/are.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/are.m Wed Nov 7 22:44:14 2007 *************** *** 70,79 **** if (nargin == 3 || nargin == 4) if (nargin == 4) ! if (! (strcmp (opt, "N") || strcmp (opt, "P") ... ! || strcmp (opt, "S") || strcmp (opt, "B") ... ! || strcmp (opt, "n") || strcmp (opt, "p") ... ! || strcmp (opt, "s") || strcmp (opt, "b"))) warning ("are: opt has an invalid value; setting to B"); opt = "B"; endif --- 70,80 ---- if (nargin == 3 || nargin == 4) if (nargin == 4) ! if (! (ischar (opt) ! && (strcmp (opt, "N") || strcmp (opt, "P") ! || strcmp (opt, "S") || strcmp (opt, "B") ! || strcmp (opt, "n") || strcmp (opt, "p") ! || strcmp (opt, "s") || strcmp (opt, "b")))) warning ("are: opt has an invalid value; setting to B"); opt = "B"; endif diff -cNr octave-2.9.16/scripts/control/base/bode_bounds.m octave-2.9.17/scripts/control/base/bode_bounds.m *** octave-2.9.16/scripts/control/base/bode_bounds.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/bode_bounds.m Thu Nov 8 15:26:32 2007 *************** *** 36,67 **** function [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, tsam) ## make sure zer,pol are row vectors ! if(!isempty(pol)) pol = reshape(pol,1,length(pol)); endif ! if(!isempty(zer)) zer = reshape(zer,1,length(zer)); endif ## check for natural frequencies away from omega = 0 if (DIGITAL) ## The 2nd conditions prevents log(0) in the next log command ! iiz = find(abs(zer - 1) > norm(zer) * eps && abs(zer) > norm(zer) * eps); ! iip = find(abs(pol - 1) > norm(pol) * eps && abs(pol) > norm(pol) * eps); ## avoid dividing empty matrices, it would work but looks nasty ! if (!isempty(iiz)) czer = log(zer(iiz))/tsam; ! else czer = []; endif ! ! if (!isempty(iip)) cpol = log(pol(iip))/tsam; ! else cpol = []; endif ! else ## continuous ! iip = find((abs(pol)) > (norm(pol) * eps)); ! iiz = find((abs(zer)) > (norm(zer) * eps)); ! if(!isempty(zer)) czer = zer(iiz); ! else czer = []; endif ! if(!isempty(pol)) cpol = pol(iip); ! else cpol = []; endif endif if (isempty (iip) && isempty (iiz)) --- 36,86 ---- function [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, tsam) + if (nargin != 4) + print_usage (); + endif + ## make sure zer,pol are row vectors ! if (! isempty (pol)) ! pol = reshape (pol, 1, length (pol)); ! endif ! if (! isempty (zer)) ! zer = reshape (zer, 1, length (zer)); ! endif ## check for natural frequencies away from omega = 0 if (DIGITAL) ## The 2nd conditions prevents log(0) in the next log command ! iiz = find (abs(zer-1) > norm(zer)*eps && abs(zer) > norm(zer)*eps); ! iip = find (abs(pol-1) > norm(pol)*eps && abs(pol) > norm(pol)*eps); ## avoid dividing empty matrices, it would work but looks nasty ! if (! isempty (iiz)) ! czer = log (zer(iiz))/tsam; ! else ! czer = []; ! endif ! ! if (! isempty (iip)) ! cpol = log (pol(iip))/tsam; ! else ! cpol = []; ! endif else ## continuous ! iip = find (abs(pol) > norm(pol)*eps); ! iiz = find (abs(zer) > norm(zer)*eps); ! if (! isempty (zer)) ! czer = zer(iiz); ! else ! czer = []; ! endif ! if (! isempty (pol)) ! cpol = pol(iip); ! else ! cpol = []; ! endif endif if (isempty (iip) && isempty (iiz)) *************** *** 69,76 **** wmin = -1; wmax = 3; else ! wmin = floor(log10(min(abs([cpol,czer])))); ! wmax = ceil(log10(max(abs([cpol,czer])))); endif ## expand to show the entirety of the "interesting" portion of the plot --- 88,95 ---- wmin = -1; wmax = 3; else ! wmin = floor (log10 (min (abs ([cpol, czer])))); ! wmax = ceil (log10 (max (abs ([cpol, czer])))); endif ## expand to show the entirety of the "interesting" portion of the plot *************** *** 78,83 **** wmax++; ## run digital frequency all the way to pi ! if (DIGITAL) wmax = log10(pi/tsam); endif endfunction --- 97,104 ---- wmax++; ## run digital frequency all the way to pi ! if (DIGITAL) ! wmax = log10 (pi/tsam); ! endif endfunction diff -cNr octave-2.9.16/scripts/control/base/ctrb.m octave-2.9.17/scripts/control/base/ctrb.m *** octave-2.9.16/scripts/control/base/ctrb.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/ctrb.m Wed Nov 7 22:44:14 2007 *************** *** 47,69 **** if (nargin == 2) a = sys; ! elseif (nargin == 1 && isstruct(sys)) ! sysupdate(sys,"ss"); ! [a,b] = sys2ss(sys); else print_usage (); endif ! if (!is_abcd(a,b)) Qs = []; else ## no need to check dimensions, we trust is_abcd(). ! [na, ma] = size(a); ## using imb avoids name conflict with the "mb" function ! [inb, imb] = size(b); ! Qs = zeros(na, ma*imb); for i = 1:na ! Qs(:, (i-1)*imb+1:i*imb) = b; b = a * b; endfor endif --- 47,69 ---- if (nargin == 2) a = sys; ! elseif (nargin == 1 && isstruct (sys)) ! sysupdate (sys, "ss"); ! [a, b] = sys2ss (sys); else print_usage (); endif ! if (! is_abcd (a, b)) Qs = []; else ## no need to check dimensions, we trust is_abcd(). ! [na, ma] = size (a); ## using imb avoids name conflict with the "mb" function ! [inb, imb] = size (b); ! Qs = zeros (na, ma*imb); for i = 1:na ! Qs(:,(i-1)*imb+1:i*imb) = b; b = a * b; endfor endif diff -cNr octave-2.9.16/scripts/control/base/damp.m octave-2.9.17/scripts/control/base/damp.m *** octave-2.9.16/scripts/control/base/damp.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/damp.m Wed Nov 7 22:44:14 2007 *************** *** 35,85 **** ## assume a continuous system DIGITAL = 0; ! if(nargin < 1 || nargin > 2) print_usage (); endif ! if(isstruct(p)) if (nargin != 1) error("damp: when p is a system, tsamp parameter is not allowed."); endif ! [aa, b, c, d, t_samp] = sys2ss(p); ! DIGITAL = is_digital(p); else aa = p; if (nargin == 2) ! DIGITAL = 1; ! t_samp = tsam; endif endif ! if (!issquare(aa)) ! error("damp: Matrix p is not square.") endif if (DIGITAL && t_samp <= 0.0) ! error("damp: Sampling time tsam must not be <= 0.") endif ## all checks done. ! e = eig(aa); ! [n, m] = size(aa); if (DIGITAL) ! printf(" (discrete system with sampling time %f)\n", t_samp); endif ! printf("............... Eigenvalue ........... Damping Frequency\n"); ! printf("--------[re]---------[im]--------[abs]----------------------[Hz]\n"); for i = 1:n pole = e(i); cpole = pole; if (DIGITAL) ! cpole = log(pole) / t_samp; endif ! d0 = -cos(atan2(imag(cpole), real(cpole))); ! f0 = 0.5 / pi * abs(cpole); ! if (abs(imag(cpole)) < eps) ! printf("%12f --- %12f %10f %12f\n", ! real(pole), abs(pole), d0, f0); else ! printf("%12f %12f %12f %10f %12f\n", ! real(pole), imag(pole), abs(pole), d0, f0); endif endfor --- 35,87 ---- ## assume a continuous system DIGITAL = 0; ! ! if (nargin < 1 || nargin > 2) print_usage (); endif ! ! if (isstruct (p)) if (nargin != 1) error("damp: when p is a system, tsamp parameter is not allowed."); endif ! [aa, b, c, d, t_samp] = sys2ss (p); ! DIGITAL = is_digital (p); else aa = p; if (nargin == 2) ! DIGITAL = 1; ! t_samp = tsam; endif endif ! if (! issquare (aa)) ! error ("damp: Matrix p is not square.") endif if (DIGITAL && t_samp <= 0.0) ! error ("damp: Sampling time tsam must not be <= 0.") endif ## all checks done. ! e = eig (aa); ! [n, m] = size (aa); if (DIGITAL) ! printf (" (discrete system with sampling time %f)\n", t_samp); endif ! printf ("............... Eigenvalue ........... Damping Frequency\n"); ! printf ("--------[re]---------[im]--------[abs]----------------------[Hz]\n"); for i = 1:n pole = e(i); cpole = pole; if (DIGITAL) ! cpole = log (pole) / t_samp; endif ! d0 = -cos (atan2 (imag (cpole), real (cpole))); ! f0 = 0.5 / pi * abs (cpole); ! if (abs (imag (cpole)) < eps) ! printf ("%12f --- %12f %10f %12f\n", ! real (pole), abs (pole), d0, f0); else ! printf ("%12f %12f %12f %10f %12f\n", ! real (pole), imag (pole), abs (pole), d0, f0); endif endfor diff -cNr octave-2.9.16/scripts/control/base/dare.m octave-2.9.17/scripts/control/base/dare.m *** octave-2.9.16/scripts/control/base/dare.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/dare.m Fri Nov 9 14:34:17 2007 *************** *** 78,86 **** function x = dare (a, b, q, r, opt) ! if (nargin == 4 | nargin == 5) if (nargin == 5) ! if (opt != "N" || opt != "P" || opt != "S" || opt != "B") warning ("dare: opt has an invalid value -- setting to B"); opt = "B"; endif --- 78,88 ---- function x = dare (a, b, q, r, opt) ! if (nargin == 4 || nargin == 5) if (nargin == 5) ! if (! (ischar (opt) ! && (strcmp (opt, "N") || strcmp (opt, "P") ! || strcmp (opt, "S") || strcmp (opt, "B")))) warning ("dare: opt has an invalid value -- setting to B"); opt = "B"; endif *************** *** 88,109 **** opt = "B"; endif - if ((p = issquare (q)) == 0) q = q'*q; endif ##Checking positive definiteness ! if (isdefinite(r)<=0) ! error("dare: r not positive definite"); ! end ! if (isdefinite(q)<0) ! error("dare: q not positive semidefinite"); ! end ! ## Check r dimensions. ! [n,m] = size(b); if ((m1 = issquare (r)) == 0) error ("dare: r is not square"); elseif (m1 != m) --- 90,109 ---- opt = "B"; endif if ((p = issquare (q)) == 0) q = q'*q; endif ##Checking positive definiteness ! if (isdefinite (r) <= 0) ! error ("dare: r not positive definite"); ! endif ! if (isdefinite (q) < 0) ! error ("dare: q not positive semidefinite"); ! endif ## Check r dimensions. ! [n, m] = size (b); if ((m1 = issquare (r)) == 0) error ("dare: r is not square"); elseif (m1 != m) *************** *** 112,119 **** s1 = [a, zeros(n) ; -q, eye(n)]; s2 = [eye(n), (b/r)*b' ; zeros(n), a']; ! [c,d,s1,s2] = balance(s1,s2,opt); ! [aa,bb,u,lam] = qz(s1,s2,"S"); u = d*u; n1 = n+1; n2 = 2*n; --- 112,122 ---- s1 = [a, zeros(n) ; -q, eye(n)]; s2 = [eye(n), (b/r)*b' ; zeros(n), a']; ! ! [c, d, s1, s2] = balance (s1, s2, opt); ! ! [aa, bb, u, lam] = qz (s1, s2, "S"); ! u = d*u; n1 = n+1; n2 = 2*n; diff -cNr octave-2.9.16/scripts/control/base/dcgain.m octave-2.9.17/scripts/control/base/dcgain.m *** octave-2.9.16/scripts/control/base/dcgain.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/dcgain.m Thu Nov 8 11:25:44 2007 *************** *** 30,55 **** function gm = dcgain (sys, tol) ! if((nargin < 1) || (nargin > 2) || (nargout > 1)) print_usage (); endif ! if(!isstruct(sys)) ! error("dcgain: first argument is not a system data structure.") endif ! sys = sysupdate(sys, "ss"); ! [aa,bb,cc,dd] = sys2ss(sys); ! if (is_digital(sys)) aa = aa - eye(size(aa)); endif ! if (nargin == 1) tol = 1.0e-10; endif ! r = rank(aa, tol); ! if (r < rows(aa)) gm = []; else gm = -cc / aa * bb + dd; endif ! if(!is_stable(sys)) ! [nn,nz,mm,pp] = sysdimensions(sys); ! warning("dcgain: unstable system; dimensions [nc=%d,nz=%d,mm=%d,pp=%d]", ... ! nn,nz,mm,pp); endif endfunction --- 30,59 ---- function gm = dcgain (sys, tol) ! if (nargin < 1 || nargin > 2) print_usage (); endif ! if (! isstruct (sys)) ! error ("dcgain: first argument is not a system data structure.") endif ! sys = sysupdate (sys, "ss"); ! [aa, bb, cc, dd] = sys2ss (sys); ! if (is_digital (sys)) ! aa = aa - eye (size (aa)); ! endif ! if (nargin == 1) ! tol = 1.0e-10; ! endif ! r = rank (aa, tol); ! if (r < rows (aa)) gm = []; else gm = -cc / aa * bb + dd; endif ! if (! is_stable (sys)) ! [nn, nz, mm, pp] = sysdimensions (sys); ! warning ("dcgain: unstable system; dimensions: nc=%d, nz=%d, mm=%d, pp=%d", ! nn, nz, mm, pp); endif endfunction diff -cNr octave-2.9.16/scripts/control/base/dgram.m octave-2.9.17/scripts/control/base/dgram.m *** octave-2.9.16/scripts/control/base/dgram.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/dgram.m Wed Nov 7 22:44:15 2007 *************** *** 61,66 **** --- 61,70 ---- function m = dgram (a, b) + if (nargin != 2) + print_usage (); + endif + ## let dlyap do the error checking... m = dlyap (a, b*b'); diff -cNr octave-2.9.16/scripts/control/base/dlqr.m octave-2.9.17/scripts/control/base/dlqr.m *** octave-2.9.16/scripts/control/base/dlqr.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/dlqr.m Fri Nov 9 14:34:17 2007 *************** *** 128,150 **** qo = q; endif ! ## Checking stabilizability and detectability (dimensions are checked inside these calls) tol = 200*eps; ! if (is_stabilizable (ao, b,tol,1) == 0) error ("dlqr: (a,b) not stabilizable"); endif ! dflag = is_detectable (ao, qo, tol,1); ! if ( dflag == 0) warning ("dlqr: (a,q) not detectable"); ! elseif ( dflag == -1) ! error("dlqr: (a,q) has non minimal modes near unit circle"); ! end ## Compute the Riccati solution p = dare (ao, b, qo, r); k = (r+b'*p*b)\(b'*p*a + s'); e = eig (a - b*k); - endfunction - --- 128,149 ---- qo = q; endif ! ## Checking stabilizability and detectability (dimensions are checked ! ## inside these calls). tol = 200*eps; ! if (is_stabilizable (ao, b, tol, 1) == 0) error ("dlqr: (a,b) not stabilizable"); endif ! dflag = is_detectable (ao, qo, tol, 1); ! if (dflag == 0) warning ("dlqr: (a,q) not detectable"); ! elseif (dflag == -1) ! error ("dlqr: (a,q) has non minimal modes near unit circle"); ! endif ## Compute the Riccati solution p = dare (ao, b, qo, r); k = (r+b'*p*b)\(b'*p*a + s'); e = eig (a - b*k); endfunction diff -cNr octave-2.9.16/scripts/control/base/dlyap.m octave-2.9.17/scripts/control/base/dlyap.m *** octave-2.9.16/scripts/control/base/dlyap.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/dlyap.m Wed Nov 7 21:29:23 2007 *************** *** 90,95 **** --- 90,99 ---- function x = dlyap (a, b) + if (nargin != 2) + print_usage (); + endif + if ((n = issquare (a)) == 0) warning ("dlyap: a must be square"); endif *************** *** 129,147 **** blksiz = 1; endif ! Ajj = kron (s (j:j1, j:j1), s) - eye (blksiz*n); ! rhs = reshape (b (:, j:j1), blksiz*n, 1); if (j1 < n) ! rhs2 = s*(x (:, (j1+1):n) * s (j:j1, (j1+1):n)'); rhs = rhs + reshape (rhs2, blksiz*n, 1); endif v = - Ajj\rhs; ! x (:, j) = v (1:n); ! if(blksiz == 2) x (:, j1) = v ((n+1):blksiz*n); endif --- 133,151 ---- blksiz = 1; endif ! Ajj = kron (s(j:j1,j:j1), s) - eye (blksiz*n); ! rhs = reshape (b (:,j:j1), blksiz*n, 1); if (j1 < n) ! rhs2 = s*(x(:,(j1+1):n) * s(j:j1,(j1+1):n)'); rhs = rhs + reshape (rhs2, blksiz*n, 1); endif v = - Ajj\rhs; ! x(:,j) = v (1:n); ! if (blksiz == 2) x (:, j1) = v ((n+1):blksiz*n); endif diff -cNr octave-2.9.16/scripts/control/base/dre.m octave-2.9.17/scripts/control/base/dre.m *** octave-2.9.16/scripts/control/base/dre.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/dre.m Thu Nov 8 11:25:44 2007 *************** *** 97,168 **** function [tvals, Plist] = dre (sys, Q, R, Qf, t0, tf, Ptol, maxits) ! if(nargin < 6 | nargin > 8 | nargout != 2) print_usage (); ! elseif(!isstruct(sys)) ! error("sys must be a system data structure") ! elseif(is_digital(sys)) ! error("sys must be a continuous time system") ! elseif(!ismatrix(Q) | !ismatrix(R) | !ismatrix(Qf)) ! error("Q, R, and Qf must be matrices."); ! elseif(!isscalar(t0) | !isscalar(tf)) ! error("t0 and tf must be scalars") ! elseif(t0 >= tf) error("t0=%e >= tf=%e",t0,tf); ! elseif(nargin == 6) Ptol = 0.1; ! elseif(!isscalar(Ptol)) error("Ptol must be a scalar"); ! elseif(Ptol <= 0) error("Ptol must be positive"); endif ! if(nargin < 8) maxits = 10; ! elseif(!isscalar(maxits)) error("maxits must be a scalar"); ! elseif(maxits <= 0) error("maxits must be positive"); endif ! maxits = ceil(maxits); ! [aa,bb] = sys2ss(sys); ! nn = sysdimensions(sys,"cst"); ! mm = sysdimensions(sys,"in"); ! pp = sysdimensions(sys,"out"); ! ! if(size(Q) != [nn, nn]) ! error("Q(%dx%d); sys has %d states",rows(Q),columns(Q),nn); ! elseif(size(Qf) != [nn, nn]) ! error("Qf(%dx%d); sys has %d states",rows(Qf),columns(Qf),nn); ! elseif(size(R) != [mm, mm]) ! error("R(%dx%d); sys has %d inputs",rows(R),columns(R),mm); endif ## construct Hamiltonian matrix H = [aa , -(bb/R)*bb' ; -Q, -aa']; ## select time step to avoid numerical overflow ! fast_eig = max(abs(eig(H))); ! tc = log(10)/fast_eig; ! nst = ceil((tf-t0)/tc); ! tvals = -linspace(-tf,-t0,nst); ! Plist = list(Qf); ! In = eye(nn); n1 = nn+1; n2 = nn+nn; done = 0; ! while(!done) done = 1; # assume this pass will do the job ## sort time values in reverse order ! tvals = -sort(-tvals); ! tvlen = length(tvals); maxerr = 0; ## compute new values of P(t); recompute old values just in case ! for ii=2:tvlen ! uv_i_minus_1 = [ In ; Plist{ii-1} ]; delta_t = tvals(ii-1) - tvals(ii); ! uv = expm(-H*delta_t)*uv_i_minus_1; Qi = uv(n1:n2,1:nn)/uv(1:nn,1:nn); Plist(ii) = (Qi+Qi')/2; ## check error ! Perr = norm(Plist{ii} - Plist{ii-1})/norm(Plist{ii}); ! maxerr = max(maxerr,Perr); ! if(Perr > Ptol) ! new_t = mean(tvals([ii,ii-1])); tvals = [tvals, new_t]; done = 0; endif --- 97,175 ---- function [tvals, Plist] = dre (sys, Q, R, Qf, t0, tf, Ptol, maxits) ! if (nargin < 6 || nargin > 8) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be a system data structure") ! elseif (is_digital (sys)) ! error ("sys must be a continuous time system") ! elseif (! ismatrix (Q) || ! ismatrix (R) || ! ismatrix (Qf)) ! error ("Q, R, and Qf must be matrices"); ! elseif (! isscalar (t0) || ! isscalar (tf)) ! error ("t0 and tf must be scalars") ! elseif (t0 >= tf) ! error ("t0=%e >= tf=%e", t0, tf); ! elseif (nargin < 7) ! Ptol = 0.1; ! elseif (! isscalar (Ptol)) ! error ("Ptol must be a scalar"); ! elseif (Ptol <= 0) ! error ("Ptol must be positive"); endif ! if (nargin < 8) ! maxits = 10; ! elseif (! isscalar (maxits)) ! error ("maxits must be a scalar"); ! elseif (maxits <= 0) ! error ("maxits must be positive"); endif ! maxits = ceil (maxits); ! [aa, bb] = sys2ss (sys); ! nn = sysdimensions (sys, "cst"); ! mm = sysdimensions (sys, "in"); ! pp = sysdimensions (sys, "out"); ! ! if (size (Q) != [nn, nn]) ! error ("Q(%dx%d); sys has %d states", rows (Q), columns (Q), nn); ! elseif (size (Qf) != [nn, nn]) ! error ("Qf(%dx%d); sys has %d states", rows (Qf), columns (Qf), nn); ! elseif (size (R) != [mm, mm]) ! error ("R(%dx%d); sys has %d inputs", rows (R), columns (R), mm); endif ## construct Hamiltonian matrix H = [aa , -(bb/R)*bb' ; -Q, -aa']; ## select time step to avoid numerical overflow ! fast_eig = max (abs (eig (H))); ! tc = log (10) / fast_eig; ! nst = ceil ((tf-t0)/tc); ! tvals = -linspace (-tf, -t0, nst); ! Plist = list (Qf); ! In = eye (nn); n1 = nn+1; n2 = nn+nn; done = 0; ! while (! done) done = 1; # assume this pass will do the job ## sort time values in reverse order ! tvals = -sort (-tvals); ! tvlen = length (tvals); maxerr = 0; ## compute new values of P(t); recompute old values just in case ! for ii = 2:tvlen ! uv_i_minus_1 = [In; Plist{ii-1}]; delta_t = tvals(ii-1) - tvals(ii); ! uv = expm (-H*delta_t)*uv_i_minus_1; Qi = uv(n1:n2,1:nn)/uv(1:nn,1:nn); Plist(ii) = (Qi+Qi')/2; ## check error ! Perr = norm (Plist{ii} - Plist{ii-1})/norm(Plist{ii}); ! maxerr = max (maxerr,Perr); ! if (Perr > Ptol) ! new_t = mean (tvals([ii,ii-1])); tvals = [tvals, new_t]; done = 0; endif *************** *** 170,180 **** ## check number of iterations maxits = maxits - 1; ! done = done+(maxits==0); endwhile ! if(maxerr > Ptol) ! warning("dre: \n\texiting with%4d points, max rel chg. =%e, Ptol=%e\n", ... ! tvlen,maxerr,Ptol); tvals = tvals(1:length(Plist)); endif --- 177,187 ---- ## check number of iterations maxits = maxits - 1; ! done = done + (maxits == 0); endwhile ! if (maxerr > Ptol) ! warning ("dre: exiting with %d points, max rel chg. = %e, Ptol = %e", ! tvlen, maxerr, Ptol); tvals = tvals(1:length(Plist)); endif diff -cNr octave-2.9.16/scripts/control/base/freqchkw.m octave-2.9.17/scripts/control/base/freqchkw.m *** octave-2.9.16/scripts/control/base/freqchkw.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/freqchkw.m Wed Nov 7 21:29:23 2007 *************** *** 29,34 **** --- 29,38 ---- function USEW = freqchkw (w) + if (nargin != 1) + print_usage (); + endif + if (isempty (w)) USEW = 0; elseif (! isvector (w)) diff -cNr octave-2.9.16/scripts/control/base/gram.m octave-2.9.17/scripts/control/base/gram.m *** octave-2.9.16/scripts/control/base/gram.m Fri Oct 12 17:27:17 2007 --- octave-2.9.17/scripts/control/base/gram.m Wed Nov 7 21:29:23 2007 *************** *** 29,34 **** --- 29,38 ---- function m = gram (a, b) + if (nargin != 2) + print_usage (); + endif + ## Let lyap do the error checking... m = lyap (a, b*b'); diff -cNr octave-2.9.16/scripts/control/base/impulse.m octave-2.9.17/scripts/control/base/impulse.m *** octave-2.9.16/scripts/control/base/impulse.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/impulse.m Thu Nov 8 11:25:44 2007 *************** *** 56,66 **** function [y, t] = impulse (sys, inp, tstop, n) ! if ((nargin < 1) || (nargin > 4)) ! print_usage (); ! endif ! ! if (nargout > 2) print_usage (); endif --- 56,62 ---- function [y, t] = impulse (sys, inp, tstop, n) ! if (nargin < 1 || nargin > 4) print_usage (); endif diff -cNr octave-2.9.16/scripts/control/base/lqe.m octave-2.9.17/scripts/control/base/lqe.m *** octave-2.9.16/scripts/control/base/lqe.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/lqe.m Wed Nov 7 22:44:15 2007 *************** *** 92,98 **** function [k, p, e] = lqe (a, g, c, sigw, sigv, zz) ! if ( (nargin != 5) && (nargin != 6)) error ("lqe: invalid number of arguments"); endif --- 92,98 ---- function [k, p, e] = lqe (a, g, c, sigw, sigv, zz) ! if (nargin != 5 && nargin != 6) error ("lqe: invalid number of arguments"); endif diff -cNr octave-2.9.16/scripts/control/base/lqg.m octave-2.9.17/scripts/control/base/lqg.m *** octave-2.9.16/scripts/control/base/lqg.m Mon Oct 15 11:30:04 2007 --- octave-2.9.17/scripts/control/base/lqg.m Wed Nov 7 22:44:15 2007 *************** *** 70,158 **** function [K, Q1, P1, Ee, Er] = lqg (sys, Sigw, Sigv, Q, R, input_list) ! if ( (nargin < 5) | (nargin > 6)) print_usage (); ! ! elseif(!isstruct(sys) ) ! error("sys must be in system data structure"); endif ! DIG = is_digital(sys); ! [A,B,C,D,tsam,n,nz,stname,inname,outname] = sys2ss(sys); ! [n,nz,nin,nout] = sysdimensions(sys); ! if(nargin == 5) ## construct default input_list input_list = (columns(Sigw)+1):nin; endif ! if( !(n+nz) ) ! error(["lqg: 0 states in system"]); ! elseif(nin != columns(Sigw)+ columns(R)) ! error(["lqg: sys has ",num2str(nin)," inputs, dim(Sigw)=", ... ! num2str(columns(Sigw)),", dim(u)=",num2str(columns(R))]) ! ! elseif(nout != columns(Sigv)) ! error(["lqg: sys has ",num2str(nout)," outputs, dim(Sigv)=", ... ! num2str(columns(Sigv)),")"]) endif ## check for names of signals ! if(is_signal_list(input_list) | ischar(input_list)) ! input_list = sysidx(sys,"in",input_list); endif ! if(length(input_list) != columns(R)) ! error(["lqg: length(input_list)=",num2str(length(input_list)), ... ! ", columns(R)=", num2str(columns(R))]); endif ! varname = {"Sigw","Sigv","Q","R"}; ! for kk=1:length(varname); ! eval(sprintf("chk = issquare(%s);",varname{kk})); ! if(! chk ) error("lqg: %s is not square",varname{kk}); endif ! endfor ## permute (if need be) ! if(nargin == 6) ! all_inputs = sysreorder(nin,input_list); B = B(:,all_inputs); ! inname = inname(all_inputs); endif ## put parameters into correct variables ! m1 = columns(Sigw); m2 = m1+1; G = B(:,1:m1); B = B(:,m2:nin); ## now we can just do the design; call dlqr and dlqe, since all matrices ## are not given in Cholesky factor form (as in h2syn case) ! if(DIG) ! [Ks, P1, Er] = dlqr(A,B,Q,R); ! [Ke, Q1, jnk, Ee] = dlqe(A,G,C,Sigw,Sigv); else ! [Ks, P1, Er] = lqr(A,B,Q,R); ! [Ke, Q1, Ee] = lqe(A,G,C,Sigw,Sigv); endif Ac = A - Ke*C - B*Ks; Bc = Ke; Cc = -Ks; ! Dc = zeros(rows(Cc),columns(Bc)); ## fix state names ! stname1 = strappend(stname,"_e"); ## fix controller output names ! outname1 = strappend(inname(m2:nin),"_K"); ## fix controller input names ! inname1 = strappend(outname,"_K"); ! if(DIG) ! K = ss(Ac,Bc,Cc,Dc,tsam,n,nz,stname1,inname1,outname1,1:rows(Cc)); else ! K = ss(Ac,Bc,Cc,Dc,tsam,n,nz,stname,inname1,outname1); endif endfunction --- 70,167 ---- function [K, Q1, P1, Ee, Er] = lqg (sys, Sigw, Sigv, Q, R, input_list) ! if (nargin < 5 || nargin > 6) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be in system data structure"); endif ! DIG = is_digital (sys); ! [A, B, C, D, tsam, n, nz, stname, inname, outname] = sys2ss (sys); ! [n, nz, nin, nout] = sysdimensions (sys); ! if (nargin == 5) ## construct default input_list input_list = (columns(Sigw)+1):nin; endif ! if (! (n+nz)) ! error("lqg: 0 states in system"); ! ! elseif (nin != columns (Sigw) + columns (R)) ! error ("lqg: sys has %d inputs, dim(Sigw)=%d, dim(u)=%d", ! nin, columns (Sigw), columns (R)); ! elseif (nout != columns (Sigv)) ! error ("lqg: sys has %d outputs, dim(Sigv)=%d", nout, columns (Sigv)); endif ## check for names of signals ! if (is_signal_list (input_list) || ischar (input_list)) ! input_list = sysidx (sys, "in", input_list); endif ! if (length (input_list) != columns (R)) ! error ("lqg: length(input_list)=%d, columns(R)=%d", ! length (input_list), columns (R)); endif ! if (! issquare (Sigw)) ! error ("lqg: Sigw is not square"); ! endif ! ! if (! issquare (Sigv)) ! error ("lqg: Sigv is not square"); ! endif ! ! if (! issquare (Q)) ! error ("lqg: Q is not square"); ! endif ! ! if (! issquare (R)) ! error ("lqg: Q is not square"); ! endif ## permute (if need be) ! if (nargin == 6) ! all_inputs = sysreorder (nin, input_list); B = B(:,all_inputs); ! inname = inname (all_inputs); endif ## put parameters into correct variables ! m1 = columns (Sigw); m2 = m1+1; G = B(:,1:m1); B = B(:,m2:nin); ## now we can just do the design; call dlqr and dlqe, since all matrices ## are not given in Cholesky factor form (as in h2syn case) ! if (DIG) ! [Ks, P1, Er] = dlqr (A, B, Q, R); ! [Ke, Q1, jnk, Ee] = dlqe (A, G, C, Sigw, Sigv); else ! [Ks, P1, Er] = lqr (A, B, Q, R); ! [Ke, Q1, Ee] = lqe (A, G, C, Sigw, Sigv); endif Ac = A - Ke*C - B*Ks; Bc = Ke; Cc = -Ks; ! Dc = zeros (rows (Cc), columns (Bc)); ## fix state names ! stname1 = strappend (stname, "_e"); ## fix controller output names ! outname1 = strappend (inname(m2:nin), "_K"); ## fix controller input names ! inname1 = strappend (outname, "_K"); ! if (DIG) ! K = ss (Ac, Bc, Cc, Dc, tsam, n, nz, stname1, inname1, outname1, ! 1:rows(Cc)); else ! K = ss (Ac, Bc, Cc, Dc, tsam, n, nz, stname, inname1, outname1); endif endfunction diff -cNr octave-2.9.16/scripts/control/base/lqr.m octave-2.9.17/scripts/control/base/lqr.m *** octave-2.9.16/scripts/control/base/lqr.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/lqr.m Wed Nov 7 22:44:15 2007 *************** *** 119,125 **** ## disp("lqr: entry"); ! if ((nargin != 4) && (nargin != 5)) error ("lqr: invalid number of arguments"); endif --- 119,125 ---- ## disp("lqr: entry"); ! if (nargin != 4 && nargin != 5) error ("lqr: invalid number of arguments"); endif *************** *** 135,153 **** endif ## Check q. ! if ( ((n1 = issquare (q)) == 0) || (n1 != n)) error ("lqr: q must be square and conformal with a"); endif ## Check r. ! if ( ((m1 = issquare(r)) == 0) || (m1 != m)) error ("lqr: r must be square and conformal with column dimension of b"); endif ## Check if n is there. if (nargin == 5) [n1, m1] = size (s); ! if ( (n1 != n) || (m1 != m)) error ("lqr: z must be identically dimensioned with b"); endif --- 135,153 ---- endif ## Check q. ! if ((n1 = issquare (q)) == 0 || n1 != n) error ("lqr: q must be square and conformal with a"); endif ## Check r. ! if ((m1 = issquare(r)) == 0 || m1 != m) error ("lqr: r must be square and conformal with column dimension of b"); endif ## Check if n is there. if (nargin == 5) [n1, m1] = size (s); ! if (n1 != n || m1 != m) error ("lqr: z must be identically dimensioned with b"); endif *************** *** 162,168 **** ## Check that q, (r) are symmetric, positive (semi)definite ! if (issymmetric (q) && issymmetric (r) ... && all (eig (q) >= 0) && all (eig (r) > 0)) p = are (ao, (b/r)*b', qo); k = r\(b'*p + s'); --- 162,168 ---- ## Check that q, (r) are symmetric, positive (semi)definite ! if (issymmetric (q) && issymmetric (r) && all (eig (q) >= 0) && all (eig (r) > 0)) p = are (ao, (b/r)*b', qo); k = r\(b'*p + s'); *************** *** 171,175 **** error ("lqr: q (r) must be symmetric positive (semi) definite"); endif - ## disp("lqr: exit"); endfunction --- 171,174 ---- diff -cNr octave-2.9.16/scripts/control/base/lsim.m octave-2.9.17/scripts/control/base/lsim.m *** octave-2.9.16/scripts/control/base/lsim.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/lsim.m Thu Nov 8 15:26:32 2007 *************** *** 40,77 **** function [y, x] = lsim (sys, u, t, x0) ! if((nargin < 3)||(nargin > 4)) print_usage (); endif ! if(!isstruct(sys)) ! error("sys must be in system data structure"); endif ! sys = sysupdate(sys,"ss"); ! [ncstates, ndstates, nin, nout] = sysdimensions(sys); ! [a,b,c,d] = sys2ss(sys); ! if (nargin == 3) x0 = zeros(columns(a),1); endif ! if(rows(u) ~= length(t)) ! error("lsim: There should be an input value (row) for each time instant"); endif ! if(columns(u) ~= columns(d)) ! error("lsim: U and d should have the same number of inputs"); endif ! if(columns(x0) > 1) ! error("lsim: Initial condition vector should have only one column"); endif ! if(rows(x0) > rows(a)) ! error("lsim: Initial condition vector is too large"); endif Ts = 0; t(2)-t(1); u=u'; ! n = max(size(t)); for ii = 1:(n-1) --- 40,79 ---- function [y, x] = lsim (sys, u, t, x0) ! if (nargin < 3 || nargin > 4) print_usage (); endif ! if (! isstruct (sys)) ! error ("sys must be in system data structure"); endif ! sys = sysupdate (sys,"ss"); ! [ncstates, ndstates, nin, nout] = sysdimensions (sys); ! [a, b, c, d] = sys2ss (sys); ! if (nargin == 3) ! x0 = zeros (columns (a), 1); ! endif ! if (rows (u) != length (t)) ! error ("lsim: There should be an input value (row) for each time instant"); endif ! if (columns (u) != columns (d)) ! error ("lsim: U and d should have the same number of inputs"); endif ! if (columns (x0) > 1) ! error ("lsim: Initial condition vector should have only one column"); endif ! if (rows (x0) > rows (a)) ! error ("lsim: Initial condition vector is too large"); endif Ts = 0; t(2)-t(1); u=u'; ! n = max (size (t)); for ii = 1:(n-1) *************** *** 81,88 **** if (abs (t(ii+1) - t(ii) - Ts) > 10 * eps) Ts = t(ii+1) - t(ii); ## [F,G] = c2d(a,b,Ts); ! dsys = c2d(sys, Ts); ! [F,G] = sys2ss(dsys); endif x(:,ii) = x0; --- 83,90 ---- if (abs (t(ii+1) - t(ii) - Ts) > 10 * eps) Ts = t(ii+1) - t(ii); ## [F,G] = c2d(a,b,Ts); ! dsys = c2d (sys, Ts); ! [F, G] = sys2ss (dsys); endif x(:,ii) = x0; *************** *** 93,101 **** x(:,n) = x0; y = c*x + d*u; ! if(nargout == 0) ! plot(t,y); ! y=[]; ! x=[]; endif endfunction --- 95,104 ---- x(:,n) = x0; y = c*x + d*u; ! if (nargout == 0) ! plot (t, y); ! y = []; ! x = []; endif + endfunction diff -cNr octave-2.9.16/scripts/control/base/ltifr.m octave-2.9.17/scripts/control/base/ltifr.m *** octave-2.9.16/scripts/control/base/ltifr.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/ltifr.m Wed Nov 7 22:44:15 2007 *************** *** 59,111 **** function out = ltifr (a, b, w) ! if ((nargin < 2) || (nargin > 3)) error("incorrect number of input arguments"); endif if (nargin == 2) sys = a; w = b; ! if(!isstruct(sys)) ! error("two arguments: 1st must be a system data structure"); endif ! if (!isvector(w)) ! error("w must be a vector"); endif ! [nn,nz,mm,pp] = sysdimensions(sys); ! if(mm != 1) error("sys has %d > 1 inputs",mm); endif ! [a,b] = sys2ss(sys); else ! if (columns(a) != rows(b)), ! error("ltifr: A(%dx%d), B(%dx%d) not compatibly dimensioned", ... ! rows(a), columns(a), rows(b), columns(b)); endif ! if(columns(b) != 1) ! error("ltifr: b(%dx%d) must be a single column vector", ... ! rows(b),columns(b)); endif ! if (!issquare(a)) ! error("ltifr: A(%dx$d) must be square.",rows(a),columns(a)) endif endif ! if (!isvector(w)) ! error("w must be a vector"); endif ! ey = eye(size(a)); ! lw = length(w); ! out = ones(columns(a),lw); ! for ii=1:lw, out(:,ii) = (w(ii)*ey-a)\b; endfor endfunction --- 59,114 ---- function out = ltifr (a, b, w) ! if (nargin < 2 || nargin > 3) error("incorrect number of input arguments"); endif if (nargin == 2) sys = a; w = b; ! if(! isstruct (sys)) ! error ("two arguments: 1st must be a system data structure"); endif ! if (! isvector (w)) ! error ("w must be a vector"); endif ! [nn, nz, mm, pp] = sysdimensions (sys); ! if (mm != 1) ! error("sys has %d > 1 inputs", mm); ! endif ! [a, b] = sys2ss (sys); else ! if (columns (a) != rows (b)), ! error ("ltifr: A(%dx%d), B(%dx%d) not compatibly dimensioned", ! rows (a), columns(a), rows(b), columns(b)); endif ! if (columns (b) != 1) ! error ("ltifr: b(%dx%d) must be a single column vector", ! rows(b), columns(b)); endif ! if (! issquare (a)) ! error ("ltifr: A(%dx$d) must be square", rows(a), columns(a)) endif endif ! if (! isvector (w)) ! error ("w must be a vector"); endif ! ey = eye (size (a)); ! lw = length (w); ! out = ones (columns (a), lw); ! for ii = 1:lw, out(:,ii) = (w(ii)*ey-a)\b; endfor + endfunction diff -cNr octave-2.9.16/scripts/control/base/nichols.m octave-2.9.17/scripts/control/base/nichols.m *** octave-2.9.16/scripts/control/base/nichols.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/nichols.m Wed Nov 7 22:44:15 2007 *************** *** 100,106 **** [f, w, sys] = __bodquist__ (sys, w, outputs, inputs, "nichols"); ! [stname,inname,outname] = sysgetsignals (sys); systsam = sysgettsam (sys); ## Get the magnitude and phase of f. --- 100,106 ---- [f, w, sys] = __bodquist__ (sys, w, outputs, inputs, "nichols"); ! [stname, inname, outname] = sysgetsignals (sys); systsam = sysgettsam (sys); ## Get the magnitude and phase of f. diff -cNr octave-2.9.16/scripts/control/base/nyquist.m octave-2.9.17/scripts/control/base/nyquist.m *** octave-2.9.16/scripts/control/base/nyquist.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/nyquist.m Wed Nov 7 22:44:15 2007 *************** *** 168,174 **** th = atan2 (real (df), imag (df)) * 180 / pi; ## get angle at fmax ! if (fi == length(f)) fi = fi-1; endif thm = th(fi); --- 168,174 ---- th = atan2 (real (df), imag (df)) * 180 / pi; ## get angle at fmax ! if (fi == length (f)) fi = fi-1; endif thm = th(fi); diff -cNr octave-2.9.16/scripts/control/base/obsv.m octave-2.9.17/scripts/control/base/obsv.m *** octave-2.9.16/scripts/control/base/obsv.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/obsv.m Wed Nov 7 22:44:15 2007 *************** *** 54,72 **** if (nargin == 2) a = sys; elseif (nargin == 1 && isstruct(sys)) ! sysupdate(sys,"ss"); ! [a,b,c] = sys2ss(sys); else print_usage (); endif ! if (!is_abcd(a,c')) Qb = []; else ## no need to check dimensions, we trust is_abcd(). ! [na, ma] = size(a); ! [nc, mc] = size(c); ! Qb = zeros(na*nc, ma); for i = 1:na Qb((i-1)*nc+1:i*nc, :) = c; c = c * a; --- 54,72 ---- if (nargin == 2) a = sys; elseif (nargin == 1 && isstruct(sys)) ! sysupdate (sys, "ss"); ! [a, b, c] = sys2ss (sys); else print_usage (); endif ! if (! is_abcd (a, c')) Qb = []; else ## no need to check dimensions, we trust is_abcd(). ! [na, ma] = size (a); ! [nc, mc] = size (c); ! Qb = zeros (na*nc, ma); for i = 1:na Qb((i-1)*nc+1:i*nc, :) = c; c = c * a; diff -cNr octave-2.9.16/scripts/control/base/place.m octave-2.9.17/scripts/control/base/place.m *** octave-2.9.16/scripts/control/base/place.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/place.m Wed Nov 7 22:44:15 2007 *************** *** 45,122 **** function K = place (sys, P) ## check arguments ! if(!isstruct(sys)) ! error("sys must be in system data structure format (see ss)"); endif ! sys = sysupdate(sys,"ss"); # make sure it has state space form up to date ! if(!is_controllable(sys)) ! error("sys is not controllable."); ! elseif( min(size(P)) != 1) ! error("P must be a vector") else ! P = reshape(P,length(P),1); # make P a column vector endif ## system must be purely continuous or discrete ! is_digital(sys); ! [n,nz,m,p] = sysdimensions(sys); nx = n+nz; # already checked that it's not a mixed system. ! if(m != 1) ! error(["sys has ", num2str(m)," inputs; need only 1"]); endif ## takes the A and B matrix from the system representation ! [A,B]=sys2ss(sys); ! sp = length(P); ! if(nx == 0) ! error("place: A matrix is empty (0x0)"); ! elseif(nx != length(P)) ! error(["A=(",num2str(nx),"x",num2str(nx),", P has ", num2str(length(P)), ... ! "entries."]) endif ## arguments appear to be compatible; let's give it a try! ## The second step is the calculation of the characteristic polynomial ofA ! PC=poly(A); ## Third step: Calculate the transformation matrix T that transforms the state ## equation in the controllable canonical form. ## first we must calculate the controllability matrix M: ! M=B; ! AA=A; for n = 2:nx ! M(:,n)=AA*B; ! AA=AA*A; endfor ## second, construct the matrix W ! PCO=PC(nx:-1:1); ! PC1=PCO; # Matrix to shift and create W row by row for n = 1:nx W(n,:) = PC1; ! PC1=[PCO(n+1:nx),zeros(1,n)]; endfor ! T=M*W; ## finaly the matrix K is calculated ! PD = poly(P); # The desired characteristic polynomial PD = PD(nx+1:-1:2); PC = PC(nx+1:-1:2); K = (PD-PC)/T; ## Check if the eigenvalues of (A-BK) are the same specified in P ! Pcalc = eig(A-B*K); ! Pcalc = sortcom(Pcalc); ! P = sortcom(P); ! if(max( (abs(Pcalc)-abs(P))./abs(P) ) > 0.1) ! disp("Place: Pole placed at more than 10% relative error from specified"); endif endfunction --- 45,125 ---- function K = place (sys, P) + if (nargin != 2) + print_usage (); + endif + ## check arguments ! if (! isstruct (sys)) ! error ("sys must be in system data structure format (see ss)"); endif ! sys = sysupdate (sys, "ss"); # make sure it has state space form up to date ! if (! is_controllable (sys)) ! error ("sys is not controllable"); ! elseif (min (size (P)) != 1) ! error ("P must be a vector") else ! P = P(:); # make P a column vector endif ## system must be purely continuous or discrete ! is_digital (sys); ! [n, nz, m, p] = sysdimensions (sys); nx = n+nz; # already checked that it's not a mixed system. ! if (m != 1) ! error ("sys has %d inputs; need only 1", m); endif ## takes the A and B matrix from the system representation ! [A, B] = sys2ss (sys); ! sp = length (P); ! if (nx == 0) ! error ("place: A matrix is empty (0x0)"); ! elseif (nx != length (P)) ! error ("A=(%dx%d), P has %d entries", nx, nx, length (P)) endif ## arguments appear to be compatible; let's give it a try! ## The second step is the calculation of the characteristic polynomial ofA ! PC = poly (A); ## Third step: Calculate the transformation matrix T that transforms the state ## equation in the controllable canonical form. ## first we must calculate the controllability matrix M: ! M = B; ! AA = A; for n = 2:nx ! M(:,n) = AA*B; ! AA = AA*A; endfor ## second, construct the matrix W ! PCO = PC(nx:-1:1); ! PC1 = PCO; # Matrix to shift and create W row by row for n = 1:nx W(n,:) = PC1; ! PC1 = [PCO(n+1:nx), zeros(1,n)]; endfor ! T = M*W; ## finaly the matrix K is calculated ! PD = poly (P); # The desired characteristic polynomial PD = PD(nx+1:-1:2); PC = PC(nx+1:-1:2); K = (PD-PC)/T; ## Check if the eigenvalues of (A-BK) are the same specified in P ! Pcalc = eig (A-B*K); ! Pcalc = sortcom (Pcalc); ! P = sortcom (P); ! if (max ((abs(Pcalc)-abs(P))./abs(P) ) > 0.1) ! warning ("place: Pole placed at more than 10% relative error from specified"); endif endfunction diff -cNr octave-2.9.16/scripts/control/base/rlocus.m octave-2.9.17/scripts/control/base/rlocus.m *** octave-2.9.16/scripts/control/base/rlocus.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/rlocus.m Wed Nov 7 22:44:15 2007 *************** *** 66,87 **** endif ## Convert the input to a transfer function if necessary ! [num,den] = sys2tf(sys); # extract numerator/denom polyomials ! lnum = length(num); ! lden = length(den); ! # equalize length of num, den polynomials ! if(lden < 2) ! error("system has no poles"); ! elseif(lnum < lden) num = [zeros(1,lden-lnum), num]; # so that derivative is shortened by one endif ! olpol = roots(den); ! olzer = roots(num); ! nas = lden -lnum; # number of asymptotes maxk = 0; ! if(nas > 0) ! cas = ( sum(olpol) - sum(olzer) )/nas; angles = (2*[1:nas]-1)*pi/nas; # printf("rlocus: there are %d asymptotes centered at %f\n", nas, cas); else --- 66,87 ---- endif ## Convert the input to a transfer function if necessary ! [num, den] = sys2tf (sys); # extract numerator/denom polyomials ! lnum = length (num); ! lden = length (den); ! ## equalize length of num, den polynomials ! if (lden < 2) ! error ("system has no poles"); ! elseif (lnum < lden) num = [zeros(1,lden-lnum), num]; # so that derivative is shortened by one endif ! olpol = roots (den); ! olzer = roots (num); ! nas = lden - lnum; # number of asymptotes maxk = 0; ! if (nas > 0) ! cas = (sum (olpol) - sum (olzer)) / nas; angles = (2*[1:nas]-1)*pi/nas; # printf("rlocus: there are %d asymptotes centered at %f\n", nas, cas); else *************** *** 91,123 **** # compute real axis break points and corresponding gains ! dnum=polyderiv(num); ! dden=polyderiv(den); ! brkp = conv(den, dnum) - conv(num, dden); ! real_ax_pts = roots(brkp); ! real_ax_pts = real_ax_pts(find(imag(real_ax_pts) == 0)); ! k_break = -polyval(den,real_ax_pts) ./ polyval(num, real_ax_pts); ! idx = find(k_break >= 0); k_break = k_break(idx); real_ax_pts = real_ax_pts(idx); ! if(!isempty(k_break)) ! maxk = max(max(k_break),maxk); endif ! if(nas == 0) ! maxk = max(1, 2*maxk); % get at least some root locus else ! # get distance from breakpoints, poles, and zeros to center of asymptotes ! dmax = 3*max(abs( [vec(olzer); vec(olpol); vec(real_ax_pts)] - cas )); ! if(dmax == 0) dmax = 1; endif # get gain for dmax along each asymptote, adjust maxk if necessary ! svals = cas + dmax*exp(j*angles); ! kvals = -polyval(den,svals) ./ polyval(num, svals); ! maxk = max(maxk, max(real(kvals))); ! end ## check for input arguments: if (nargin > 2) --- 91,123 ---- # compute real axis break points and corresponding gains ! dnum = polyderiv (num); ! dden = polyderiv (den); ! brkp = conv (den, dnum) - conv (num, dden); ! real_ax_pts = roots (brkp); ! real_ax_pts = real_ax_pts(find (imag (real_ax_pts) == 0)); ! k_break = -polyval (den, real_ax_pts) ./ polyval (num, real_ax_pts); ! idx = find (k_break >= 0); k_break = k_break(idx); real_ax_pts = real_ax_pts(idx); ! if (! isempty (k_break)) ! maxk = max (max (k_break), maxk); endif ! if (nas == 0) ! maxk = max (1, 2*maxk); # get at least some root locus else ! ## get distance from breakpoints, poles, and zeros to center of asymptotes ! dmax = 3*max (abs ([vec(olzer); vec(olpol); vec(real_ax_pts)] - cas)); ! if (dmax == 0) dmax = 1; endif # get gain for dmax along each asymptote, adjust maxk if necessary ! svals = cas + dmax * exp (j*angles); ! kvals = -polyval (den, svals) ./ polyval (num, svals); ! maxk = max (maxk, max (real (kvals))); ! endif ## check for input arguments: if (nargin > 2) *************** *** 129,136 **** maxk = max_k; endif if (nargin > 1) ! if(increment <= 0) ! error("increment must be positive"); else ngain = (maxk-mink)/increment; endif --- 129,136 ---- maxk = max_k; endif if (nargin > 1) ! if (increment <= 0) ! error ("increment must be positive"); else ngain = (maxk-mink)/increment; endif *************** *** 139,186 **** endif ## vector of gains ! ngain = max(30,ngain); ! gvec = linspace(mink,maxk,ngain); ! if(length(k_break)) ! gvec = sort([gvec, vec(k_break)']); endif ## Find the open loop zeros and the initial poles ! rlzer = roots(num); ## update num to be the same length as den ! lnum = length(num); ! if(lnum < lden) num = [zeros(1,lden - lnum),num]; endif ## compute preliminary pole sets ! nroots = lden-1; ! for ii=1:ngain gain = gvec(ii); ! rlpol(1:nroots,ii) = vec(sortcom(roots(den + gain*num))); endfor ## set smoothing tolerance ! smtolx = 0.01*( max(max(real(rlpol))) - min(min(real(rlpol)))); ! smtoly = 0.01*( max(max(imag(rlpol))) - min(min(imag(rlpol)))); ! smtol = max(smtolx, smtoly); ! rlpol = sort_roots(rlpol,smtolx, smtoly); % sort according to nearest-neighbor ! done=(nargin == 4); # perform a smoothness check ! while((!done) & ngain < 1000) done = 1 ; # assume done ! dp = abs(diff(rlpol'))'; ! maxdp = max(dp); ## search for poles whose neighbors are distant ! if(lden == 2) ! idx = find(dp > smtol); else ! idx = find(maxdp > smtol); endif ! for ii=1:length(idx) i1 = idx(ii); g1 = gvec(i1); p1 = rlpol(:,i1); --- 139,187 ---- endif ## vector of gains ! ngain = max (30, ngain); ! gvec = linspace (mink, maxk, ngain); ! if (length (k_break)) ! gvec = sort ([gvec, vec(k_break)']); endif ## Find the open loop zeros and the initial poles ! rlzer = roots (num); ## update num to be the same length as den ! lnum = length (num); ! if (lnum < lden) num = [zeros(1,lden - lnum),num]; endif ## compute preliminary pole sets ! nroots = lden - 1; ! for ii = 1:ngain gain = gvec(ii); ! rlpol(1:nroots,ii) = vec(sortcom (roots (den + gain*num))); endfor ## set smoothing tolerance ! smtolx = 0.01*(max (max (real (rlpol))) - min (min (real (rlpol)))); ! smtoly = 0.01*(max (max (imag (rlpol))) - min (min (imag (rlpol)))); ! smtol = max (smtolx, smtoly); ! ## sort according to nearest-neighbor ! rlpol = sort_roots (rlpol, smtolx, smtoly); ! done = (nargin == 4); # perform a smoothness check ! while (! done && ngain < 1000) done = 1 ; # assume done ! dp = abs (diff (rlpol'))'; ! maxdp = max (dp); ## search for poles whose neighbors are distant ! if (lden == 2) ! idx = find (dp > smtol); else ! idx = find (maxdp > smtol); endif ! for ii = 1:length(idx) i1 = idx(ii); g1 = gvec(i1); p1 = rlpol(:,i1); *************** *** 190,228 **** p2 = rlpol(:,i2); ## isolate poles in p1, p2 ! if( max(abs(p2-p1)) > smtol) ! newg = linspace(g1,g2,5); newg = newg(2:4); ! gvec = [gvec,newg]; done = 0; # need to process new gains endif endfor ## process new gain values ! ngain1 = length(gvec); ! for ii=(ngain+1):ngain1 gain = gvec(ii); ! rlpol(1:nroots,ii) = vec(sortcom(roots(den + gain*num))); endfor ! [gvec,idx] = sort(gvec); rlpol = rlpol(:,idx); ! ngain = length(gvec); ! rlpol = sort_roots(rlpol,smtolx, smtoly); % sort according to nearest-neighbor endwhile rldata = rlpol; ## Plot the data ! if(nargout == 0) rlpolv = vec(rlpol); ! axdata = [real(rlpolv),imag(rlpolv); real(olzer), imag(olzer)]; ! axlim = axis2dlim(axdata); rldata = [real(rlpolv), imag(rlpolv) ]; ! [stn,inname,outname] = sysgetsignals(sys); ## build plot command args pole by pole ! n_rlpol = rows(rlpol); nelts = n_rlpol+1; if (! isempty (rlzer)) nelts++; --- 191,230 ---- p2 = rlpol(:,i2); ## isolate poles in p1, p2 ! if (max (abs (p2-p1)) > smtol) ! newg = linspace (g1, g2, 5); newg = newg(2:4); ! gvec = [gvec,newg]; done = 0; # need to process new gains endif endfor ## process new gain values ! ngain1 = length (gvec); ! for ii = (ngain+1):ngain1 gain = gvec(ii); ! rlpol(1:nroots,ii) = vec(sortcom (roots (den + gain*num))); endfor ! [gvec, idx] = sort (gvec); rlpol = rlpol(:,idx); ! ngain = length (gvec); ! ## sort according to nearest-neighbor ! rlpol = sort_roots (rlpol, smtolx, smtoly); endwhile rldata = rlpol; ## Plot the data ! if (nargout == 0) rlpolv = vec(rlpol); ! axdata = [real(rlpolv), imag(rlpolv); real(olzer), imag(olzer)]; ! axlim = axis2dlim (axdata); rldata = [real(rlpolv), imag(rlpolv) ]; ! [stn, inname, outname] = sysgetsignals (sys); ## build plot command args pole by pole ! n_rlpol = rows (rlpol); nelts = n_rlpol+1; if (! isempty (rlzer)) nelts++; *************** *** 236,242 **** kk = 0; # asymptotes first if (n_A > 0) ! len_A = 2*max(abs(axlim)); sigma_A = (sum(olpol) - sum(olzer))/n_A; for i_A=0:n_A-1 phi_A = pi*(2*i_A + 1)/n_A; --- 238,244 ---- kk = 0; # asymptotes first if (n_A > 0) ! len_A = 2*max (abs (axlim)); sigma_A = (sum(olpol) - sum(olzer))/n_A; for i_A=0:n_A-1 phi_A = pi*(2*i_A + 1)/n_A; *************** *** 250,256 **** endfor endif # locus next ! for ii=1:rows(rlpol) args{1,++kk} = real (rlpol (ii,:)); args{2,kk} = imag (rlpol (ii,:)); if (ii == 1) --- 252,258 ---- endfor endif # locus next ! for ii = 1:rows(rlpol) args{1,++kk} = real (rlpol (ii,:)); args{2,kk} = imag (rlpol (ii,:)); if (ii == 1) *************** *** 260,281 **** endif endfor # poles and zeros last ! args{1,++kk} = real(olpol); ! args{2,kk} = imag(olpol); args{3,kk} = "rx;open loop poles;"; ! if (! isempty(rlzer)) ! args{1,++kk} = real(rlzer); ! args{2,kk} = imag(rlzer); args{3,kk} = "go;zeros;"; endif set (gcf,"visible","off"); hplt = plot (args{:}); set (hplt(kk--), "markersize", 2); ! if (! isempty(rlzer)) ! set(hplt(kk--), "markersize", 2); endif ! for ii=1:rows(rlpol) set (hplt(kk--), "linewidth", 2); endfor legend ("boxon", 2); --- 262,283 ---- endif endfor # poles and zeros last ! args{1,++kk} = real (olpol); ! args{2,kk} = imag (olpol); args{3,kk} = "rx;open loop poles;"; ! if (! isempty (rlzer)) ! args{1,++kk} = real (rlzer); ! args{2,kk} = imag (rlzer); args{3,kk} = "go;zeros;"; endif set (gcf,"visible","off"); hplt = plot (args{:}); set (hplt(kk--), "markersize", 2); ! if (! isempty (rlzer)) ! set (hplt(kk--), "markersize", 2); endif ! for ii = 1:rows(rlpol) set (hplt(kk--), "linewidth", 2); endfor legend ("boxon", 2); *************** *** 284,325 **** xlabel (sprintf ("Root locus from %s to %s, gain=[%f,%f]: Real axis", inname{1}, outname{1}, gvec(1), gvec(ngain))); ylabel ("Imag. axis"); ! set (gcf,"visible","on"); rldata = []; endif endfunction function rlpol = sort_roots (rlpol,tolx, toly) # no point sorting of you've only got one pole! ! if(rows(rlpol) == 1) ! return endif # reorder entries in each column of rlpol to be by their nearest-neighbors ! dp = diff(rlpol')'; ! drp = max(real(dp)); ! dip = max(imag(dp)); ! idx = find( drp > tolx | dip > toly ); ! if(isempty(idx) ) ! return endif ! [np,ng] = size(rlpol); # num poles, num gains for jj = idx vals = rlpol(:,[jj,jj+1]); jdx = (jj+1):ng; ! for ii=1:rows(rlpol-1) rdx = ii:np; ! dval = abs(rlpol(rdx,jj+1)-rlpol(ii,jj)); ! mindist = min(dval); ! sidx = min( find ( dval == mindist)) + ii - 1; ! if( sidx != ii) ! c1 = norm(diff(vals')); ! [vals(ii,2), vals(sidx,2)] = swap( vals(ii,2), vals(sidx,2)); ! c2 = norm(diff(vals')); ! if(c1 > c2 ) ! # perform the swap ! [rlpol(ii,jdx), rlpol(sidx,jdx)] = swap( rlpol(ii,jdx), rlpol(sidx,jdx)); vals = rlpol(:,[jj,jj+1]); endif endif --- 286,327 ---- xlabel (sprintf ("Root locus from %s to %s, gain=[%f,%f]: Real axis", inname{1}, outname{1}, gvec(1), gvec(ngain))); ylabel ("Imag. axis"); ! set (gcf (), "visible","on"); rldata = []; endif endfunction function rlpol = sort_roots (rlpol,tolx, toly) # no point sorting of you've only got one pole! ! if (rows (rlpol) == 1) ! return; endif # reorder entries in each column of rlpol to be by their nearest-neighbors ! dp = diff (rlpol')'; ! drp = max (real (dp)); ! dip = max (imag (dp)); ! idx = find (drp > tolx | dip > toly); ! if (isempty (idx)) ! return; endif ! [np, ng] = size (rlpol); # num poles, num gains for jj = idx vals = rlpol(:,[jj,jj+1]); jdx = (jj+1):ng; ! for ii = 1:rows(rlpol-1) rdx = ii:np; ! dval = abs (rlpol(rdx,jj+1)-rlpol(ii,jj)); ! mindist = min (dval); ! sidx = min (find (dval == mindist)) + ii - 1; ! if (sidx != ii) ! c1 = norm (diff(vals')); ! [vals(ii,2), vals(sidx,2)] = swap (vals(ii,2), vals(sidx,2)); ! c2 = norm (diff (vals')); ! if (c1 > c2) ! ## perform the swap ! [rlpol(ii,jdx), rlpol(sidx,jdx)] = swap (rlpol(ii,jdx), rlpol(sidx,jdx)); vals = rlpol(:,[jj,jj+1]); endif endif diff -cNr octave-2.9.16/scripts/control/base/step.m octave-2.9.17/scripts/control/base/step.m *** octave-2.9.16/scripts/control/base/step.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/step.m Thu Nov 8 11:25:44 2007 *************** *** 57,67 **** function [y, t] = step (sys, inp, tstop, n) ! if ((nargin < 1) || (nargin > 4)) ! print_usage (); ! endif ! ! if (nargout > 2) print_usage (); endif --- 57,63 ---- function [y, t] = step (sys, inp, tstop, n) ! if (nargin < 1 || nargin > 4) print_usage (); endif diff -cNr octave-2.9.16/scripts/control/base/tzero.m octave-2.9.17/scripts/control/base/tzero.m *** octave-2.9.16/scripts/control/base/tzero.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/base/tzero.m Wed Nov 7 22:44:15 2007 *************** *** 70,92 **** function [zer, gain] = tzero (A, B, C, D) ## get A,B,C,D and Asys variables, regardless of initial form ! if(nargin == 4) ! Asys = ss(A,B,C,D); ! elseif( (nargin == 1) && (! isstruct(A))) ! print_usage (); ! elseif(nargin != 1) print_usage (); else Asys = A; ! [A,B,C,D] = sys2ss(Asys); endif Ao = Asys; # save for leading coefficient ! siso = is_siso(Asys); ! digital = is_digital(Asys); # check if it's mixed or not ## see if it's a gain block ! if(isempty(A)) zer = []; gain = D; return; --- 70,92 ---- function [zer, gain] = tzero (A, B, C, D) ## get A,B,C,D and Asys variables, regardless of initial form ! if (nargin == 4) ! Asys = ss (A, B, C, D); ! elseif (nargin == 1 && ! isstruct (A)) ! error ("tzero: expecting argument to be system structure"); ! elseif (nargin != 1) print_usage (); else Asys = A; ! [A, B, C, D] = sys2ss (Asys); endif Ao = Asys; # save for leading coefficient ! siso = is_siso (Asys); ! digital = is_digital (Asys); # check if it's mixed or not ## see if it's a gain block ! if (isempty (A)) zer = []; gain = D; return; *************** *** 95,138 **** ## First, balance the system via the zero computation generalized eigenvalue ## problem balancing method (Hodel and Tiller, Linear Alg. Appl., 1992) ! Asys = __zgpbal__ (Asys); [A,B,C,D] = sys2ss(Asys); # balance coefficients meps = 2*eps*norm ([A, B; C, D], "fro"); ! Asys = zgreduce(Asys,meps); [A, B, C, D] = sys2ss(Asys); # ENVD algorithm ! if(!isempty(A)) ## repeat with dual system ! Asys = ss(A', C', B', D'); Asys = zgreduce(Asys,meps); ## transform back ! [A,B,C,D] = sys2ss(Asys); Asys = ss(A', C', B', D'); endif zer = []; # assume none ! [A,B,C,D] = sys2ss(Asys); ! if( !isempty(C) ) ! [W,r,Pi] = qr([C, D]'); ! [nonz,ztmp] = zgrownorm(r,meps); ! if(nonz) ## We can now solve the generalized eigenvalue problem. ! [pp,mm] = size(D); ! nn = rows(A); Afm = [A , B ; C, D] * W'; Bfm = [eye(nn), zeros(nn,mm); zeros(pp,nn+mm)]*W'; jdx = (mm+1):(mm+nn); Af = Afm(1:nn,jdx); Bf = Bfm(1:nn,jdx); ! zer = qz(Af,Bf); endif endif ! mz = length(zer); ! [A,B,C,D] = sys2ss(Ao); # recover original system ## compute leading coefficient ! if ( (nargout == 2) && siso) ! n = rows(A); ! if ( mz == n) gain = D; ! elseif ( mz < n ) gain = C*(A^(n-1-mz))*B; endif else --- 95,144 ---- ## First, balance the system via the zero computation generalized eigenvalue ## problem balancing method (Hodel and Tiller, Linear Alg. Appl., 1992) ! ## balance coefficients ! Asys = __zgpbal__ (Asys); ! [A, B, C, D] = sys2ss (Asys); meps = 2*eps*norm ([A, B; C, D], "fro"); ! ## ENVD algorithm ! Asys = zgreduce (Asys, meps); ! [A, B, C, D] = sys2ss (Asys); ! if (! isempty (A)) ## repeat with dual system ! Asys = ss (A', C', B', D'); ! Asys = zgreduce (Asys, meps); ## transform back ! [A, B, C, D] = sys2ss (Asys); ! Asys = ss (A', C', B', D'); endif zer = []; # assume none ! [A, B, C, D] = sys2ss (Asys); ! if (! isempty (C)) ! [W, r, Pi] = qr ([C, D]'); ! [nonz, ztmp] = zgrownorm (r, meps); ! if (nonz) ## We can now solve the generalized eigenvalue problem. ! [pp, mm] = size (D); ! nn = rows (A); Afm = [A , B ; C, D] * W'; Bfm = [eye(nn), zeros(nn,mm); zeros(pp,nn+mm)]*W'; jdx = (mm+1):(mm+nn); Af = Afm(1:nn,jdx); Bf = Bfm(1:nn,jdx); ! zer = qz (Af, Bf); endif endif ! mz = length (zer); ! [A, B, C, D] = sys2ss (Ao); # recover original system ## compute leading coefficient ! if (nargout == 2 && siso) ! n = rows (A); ! if (mz == n) gain = D; ! elseif (mz < n) gain = C*(A^(n-1-mz))*B; endif else diff -cNr octave-2.9.16/scripts/control/hinf/h2norm.m octave-2.9.17/scripts/control/hinf/h2norm.m *** octave-2.9.16/scripts/control/hinf/h2norm.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/h2norm.m Fri Nov 9 14:34:17 2007 *************** *** 53,59 **** print_usage (); elseif (! isstruct (sys)) error ("Sys must be in system data structure"); ! end dflg = is_digital (sys); if (! is_stable (sys)) --- 53,59 ---- print_usage (); elseif (! isstruct (sys)) error ("Sys must be in system data structure"); ! endif dflg = is_digital (sys); if (! is_stable (sys)) diff -cNr octave-2.9.16/scripts/control/hinf/h2syn.m octave-2.9.17/scripts/control/hinf/h2syn.m *** octave-2.9.16/scripts/control/hinf/h2syn.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/h2syn.m Thu Nov 8 10:55:02 2007 *************** *** 79,121 **** function [K, gain, Kc, Kf, Pc, Pf] = h2syn (Asys, nu, ny, tol) ! if ((nargin < 3) | (nargin > 4)) print_usage (); ! elseif(nargin == 3 ) ! [chkdgkf,dgs] = is_dgkf(Asys,nu,ny); ! elseif(nargin == 4) ! [chkdgkf,dgs] = is_dgkf(Asys,nu,ny,tol); endif ! if (!chkdgkf ) ! disp("h2syn: system does not meet required assumptions") ! help is_dgkf ! error("h2syn: exit"); endif ## extract dgs information ! nw = dgs.nw; nu = dgs.nu; ! A = dgs.A; Bw = dgs.Bw; Bu = dgs.Bu; ! Cz = dgs.Cz; Dzw = dgs.Dzw; Dzu = dgs.Dzu; nz = dgs.nz; ! Cy = dgs.Cy; Dyw = dgs.Dyw; Dyu = dgs.Dyu; ny = dgs.ny; d22nz = dgs.Dyu_nz; dflg = dgs.dflg; ! if(norm(Dzw,Inf) > norm([Dzw, Dzu ; Dyw, Dyu],Inf)*1e-12) ! warning("h2syn: Dzw nonzero; feedforward not implemented") Dzw D = [Dzw, Dzu ; Dyw, Dyu] endif ## recover i/o transformations ! Ru = dgs.Ru; Ry = dgs.Ry; ! [ncstates, ndstates, nout, nin] = sysdimensions(Asys); ! Atsam = sysgettsam(Asys); ! [Ast, Ain, Aout] = sysgetsignals(Asys); ! ! if(dgs.dflg == 0) ! Pc = are(A,Bu*Bu',Cz'*Cz); # solve control, filtering ARE's ! Pf = are(A',Cy'*Cy,Bw*Bw'); F2 = -Bu'*Pc; # calculate feedback gains L2 = -Pf*Cy'; --- 79,137 ---- function [K, gain, Kc, Kf, Pc, Pf] = h2syn (Asys, nu, ny, tol) ! if (nargin < 3 || nargin > 4) print_usage (); ! elseif (nargin == 3) ! [chkdgkf, dgs] = is_dgkf (Asys, nu, ny); ! elseif (nargin == 4) ! [chkdgkf, dgs] = is_dgkf (Asys, nu, ny, tol); endif ! if (! chkdgkf) ! error ("h2syn: system does not meet required assumptions") endif ## extract dgs information ! nw = dgs.nw; ! nu = dgs.nu; ! nz = dgs.nz; ! ny = dgs.ny; ! ! A = dgs.A; ! ! Bw = dgs.Bw; ! Bu = dgs.Bu; ! ! Cz = dgs.Cz; ! Cy = dgs.Cy; ! ! Dzw = dgs.Dzw; ! Dzu = dgs.Dzu; ! ! Dyw = dgs.Dyw; ! Dyu = dgs.Dyu; ! d22nz = dgs.Dyu_nz; + dflg = dgs.dflg; ! if (norm (Dzw, Inf) > norm ([Dzw, Dzu; Dyw, Dyu], Inf)*1e-12) ! warning ("h2syn: Dzw nonzero; feedforward not implemented") Dzw D = [Dzw, Dzu ; Dyw, Dyu] endif ## recover i/o transformations ! Ru = dgs.Ru; ! Ry = dgs.Ry; ! ! [ncstates, ndstates, nout, nin] = sysdimensions (Asys); ! Atsam = sysgettsam (Asys); ! [Ast, Ain, Aout] = sysgetsignals (Asys); ! ! if (dgs.dflg == 0) ! Pc = are (A, Bu*Bu', Cz'*Cz); # solve control, filtering ARE's ! Pf = are(A', Cy'*Cy, Bw*Bw'); F2 = -Bu'*Pc; # calculate feedback gains L2 = -Pf*Cy'; *************** *** 126,186 **** else ## discrete time solution ! error("h2syn: discrete-time case not yet implemented") ! Pc = dare(A,Bu*Bu',Cz'*Cz); ! Pf = dare(A',Cy'*Cy,Bw*Bw'); endif nn = ncstates + ndstates; ! In = eye(nn); KA = A + Bu*F2 + L2*Cy; ! Kc1 = ss(AF2,Bw,CzF2,zeros(nz,nw)); ! Kf1 = ss(AL2,BwL2,F2,zeros(nu,nw)); ! g1 = h2norm(Kc1); ! g2 = h2norm(Kf1); ## compute optimal closed loop gain ! gain = sqrt ( g1*g1 + g2*g2 ); ! if(nargout) ! Kst = strappend(Ast,"_K"); ! Kin = strappend(Aout((nout-ny+1):(nout)),"_K"); ! Kout = strappend(Ain((nin-nu+1):(nin)),"_K"); ## compute systems for return ! K = ss(KA,-L2/Ru,Ry\F2,zeros(nu,ny),Atsam,ncstates,ndstates,Kst,Kin,Kout); endif if (nargout > 2) ## system full information control state names ! stname2 = strappend(Ast,"_FI"); ## system full information control input names ! inname2 = strappend(Ast,"_FI_in"); ## system full information control output names ! outname2 = strappend(Aout(1:(nout-ny)),"_FI_out"); nz = rows (Cz); nw = columns (Bw); ! Kc = ss(AF2, In, CzF2, zeros(nz,nn), Atsam, ... ! ncstates, ndstates, stname2, inname2, outname2); endif if (nargout >3) ## fix system state estimator state names ! stname3 = strappend(Ast,"_Kf"); ## fix system state estimator input names ! inname3 = strappend(Ast,"_Kf_noise"); ## fix system state estimator output names ! outname3 = strappend(Ast,"_est"); ! Kf = ss(AL2, BwL2, In, zeros(nn,nw),Atsam, ... ! ncstates, ndstates, stname3, inname3,outname3); endif endfunction --- 142,203 ---- else ## discrete time solution ! error ("h2syn: discrete-time case not yet implemented") ! Pc = dare (A, Bu*Bu', Cz'*Cz); ! Pf = dare (A', Cy'*Cy, Bw*Bw'); endif nn = ncstates + ndstates; ! In = eye (nn); KA = A + Bu*F2 + L2*Cy; ! Kc1 = ss (AF2, Bw, CzF2, zeros (nz, nw)); ! Kf1 = ss (AL2, BwL2, F2, zeros (nu, nw)); ! g1 = h2norm (Kc1); ! g2 = h2norm (Kf1); ## compute optimal closed loop gain ! gain = sqrt (g1*g1 + g2*g2); ! if (nargout) ! Kst = strappend (Ast, "_K"); ! Kin = strappend (Aout((nout-ny+1):(nout)), "_K"); ! Kout = strappend (Ain((nin-nu+1):(nin)), "_K"); ## compute systems for return ! K = ss (KA, -L2/Ru, Ry\F2, zeros(nu,ny), Atsam, ncstates, ! ndstates, Kst, Kin, Kout); endif if (nargout > 2) ## system full information control state names ! stname2 = strappend (Ast, "_FI"); ## system full information control input names ! inname2 = strappend (Ast, "_FI_in"); ## system full information control output names ! outname2 = strappend (Aout(1:(nout-ny)), "_FI_out"); nz = rows (Cz); nw = columns (Bw); ! Kc = ss (AF2, In, CzF2, zeros(nz,nn), Atsam, ! ncstates, ndstates, stname2, inname2, outname2); endif if (nargout >3) ## fix system state estimator state names ! stname3 = strappend (Ast, "_Kf"); ## fix system state estimator input names ! inname3 = strappend (Ast, "_Kf_noise"); ## fix system state estimator output names ! outname3 = strappend (Ast, "_est"); ! Kf = ss (AL2, BwL2, In, zeros(nn,nw),Atsam, ! ncstates, ndstates, stname3, inname3, outname3); endif endfunction diff -cNr octave-2.9.16/scripts/control/hinf/hinf_ctr.m octave-2.9.17/scripts/control/hinf/hinf_ctr.m *** octave-2.9.16/scripts/control/hinf/hinf_ctr.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/hinf_ctr.m Thu Nov 8 15:26:32 2007 *************** *** 57,62 **** --- 57,66 ---- function K = hinf_ctr (dgs, F, H, Z, g) + if (nargin != 5) + print_usage (); + endif + nw = dgs.nw; nu = dgs.nu; nz = dgs.nz; *************** *** 78,84 **** nout = nz + ny; nin = nw + nu; ! nstates = size(A, 1); F11 = F(1:(nw-ny),:); F12 = F((nw-ny+1):nw,:); --- 82,88 ---- nout = nz + ny; nin = nw + nu; ! nstates = size (A, 1); F11 = F(1:(nw-ny),:); F12 = F((nw-ny+1):nw,:); *************** *** 94,126 **** D1122 = D11((nz-nu+1):nz,(nw-ny+1):nw); ## D11ik may be the empty matrix, don't calculate with empty matrices ! [nd1111,md1111] = size(D1111); ! md1112 = length(D1112); ! md1121 = length(D1121); ! if ((nd1111 == 0) || (md1112 == 0)) d11hat = -D1122; else ! xx = inv(g*g*eye(nz-nu) - D1111*D1111'); d11hat = -D1121*D1111'*xx*D1112 - D1122; endif if (md1112 == 0) ! d21hat = eye(ny); elseif (nd1111 == 0) ! d21hat = chol(eye(ny) - D1112'*D1112/g/g); else ! xx = inv(g*g*eye(nz-nu) - D1111*D1111'); ! xx = eye(ny) - D1112'*xx*D1112; ! d21hat = chol(xx); endif if (md1121 == 0) ! d12hat = eye(nu); elseif (md1111 == 0) ! d12hat = chol(eye(nu) - D1121*D1121'/g/g)'; else ! xx = inv(g*g*eye(nw-ny) - D1111'*D1111); ! xx = eye(nu)-D1121*xx*D1121'; ! d12hat = chol(xx)'; endif b2hat = (B2+H12)*d12hat; --- 98,130 ---- D1122 = D11((nz-nu+1):nz,(nw-ny+1):nw); ## D11ik may be the empty matrix, don't calculate with empty matrices ! [nd1111, md1111] = size (D1111); ! md1112 = length (D1112); ! md1121 = length (D1121); ! if (nd1111 == 0 || md1112 == 0) d11hat = -D1122; else ! xx = inv (g*g*eye(nz-nu) - D1111*D1111'); d11hat = -D1121*D1111'*xx*D1112 - D1122; endif if (md1112 == 0) ! d21hat = eye (ny); elseif (nd1111 == 0) ! d21hat = chol (eye(ny) - D1112'*D1112/g/g); else ! xx = inv (g*g*eye(nz-nu) - D1111*D1111'); ! xx = eye (ny) - D1112'*xx*D1112; ! d21hat = chol (xx); endif if (md1121 == 0) ! d12hat = eye (nu); elseif (md1111 == 0) ! d12hat = chol (eye(nu) - D1121*D1121'/g/g)'; else ! xx = inv (g*g*eye(nw-ny) - D1111'*D1111); ! xx = eye (nu)-D1121*xx*D1121'; ! d12hat = chol (xx)'; endif b2hat = (B2+H12)*d12hat; *************** *** 138,150 **** ## non-zero D22 is a special case if (d22nz) ! if (rank(eye(nu) + d11hat*D22) < nu) ! error(" *** cannot compute controller for D22 non-zero."); endif d22new = [D22, zeros(ny,ny); zeros(nu,nu), 0*D22']; ! xx = inv(eye(nu+ny) + d22new*dhat); ! mhat = inv(eye(nu+ny) + dhat*d22new); ahat = ahat - bhat*((eye(nu+ny)-xx)/dhat)*chat; bhat = bhat*xx; chat = mhat*chat; --- 142,154 ---- ## non-zero D22 is a special case if (d22nz) ! if (rank (eye(nu) + d11hat*D22) < nu) ! error (" *** cannot compute controller for D22 non-zero."); endif d22new = [D22, zeros(ny,ny); zeros(nu,nu), 0*D22']; ! xx = inv (eye(nu+ny) + d22new*dhat); ! mhat = inv (eye(nu+ny) + dhat*d22new); ahat = ahat - bhat*((eye(nu+ny)-xx)/dhat)*chat; bhat = bhat*xx; chat = mhat*chat; *************** *** 152,157 **** endif ! K = ss(ahat,bhat(:,1:ny),chat(1:nu,:),dhat(1:nu,1:ny)); endfunction --- 156,161 ---- endif ! K = ss (ahat, bhat(:,1:ny), chat(1:nu,:), dhat(1:nu,1:ny)); endfunction diff -cNr octave-2.9.16/scripts/control/hinf/hinfnorm.m octave-2.9.17/scripts/control/hinf/hinfnorm.m *** octave-2.9.16/scripts/control/hinf/hinfnorm.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/hinfnorm.m Thu Nov 8 15:26:32 2007 *************** *** 115,207 **** function [g, gmin, gmax] = hinfnorm (sys, tol, gmin, gmax, ptol) ! if((nargin == 0) || (nargin > 4)) print_usage (); ! elseif(!isstruct(sys)) ! error("Sys must be a system data structure"); endif ## set defaults where applicable ! if(nargin < 5) ptol = 1e-9; # pole tolerance endif ! if(nargin < 4) gmax = 1e9; # max gain value endif ! dflg = is_digital(sys); ! sys = sysupdate(sys,"ss"); ! [A,B,C,D] = sys2ss(sys); ! [n,nz,m,p] = sysdimensions(sys); ## eigenvalues of A must all be stable ! if(!is_stable(sys)) ! warning(["hinfnorm: unstable system (is_stable, ptol=",num2str(ptol), ... ! "), returning Inf"]); g = Inf; endif ! Dnrm = norm(D); ! if(nargin < 3) ! gmin = max(1e-9,Dnrm); # min gain value ! elseif(gmin < Dnrm) ! warning(["hinfnorm: setting Gmin=||D||=",num2str(Dnrm)]); endif ! if(nargin < 2) tol = 0.001; # convergence measure for gmin, gmax endif ## check for scalar input arguments 2...5 ! if( ! (isscalar(tol) && isscalar(gmin) ! && isscalar(gmax) && isscalar(ptol)) ) ! error("hinfnorm: tol, gmin, gmax, ptol must be scalars"); endif ! In = eye(n+nz); ! Im = eye(m); ! Ip = eye(p); ## find the Hinf norm via binary search ! while((gmax/gmin - 1) > tol) g = (gmax+gmin)/2; ! if(dflg) ## multiply g's through in formulas to avoid extreme magnitudes... Rg = g^2*Im - D'*D; Ak = A + (B/Rg)*D'*C; Ck = g^2*C'*((g^2*Ip-D*D')\C); ## set up symplectic generalized eigenvalue problem per Iglesias & Glover ! s1 = [Ak , zeros(nz) ; -Ck, In ]; ! s2 = [In, -(B/Rg)*B' ; zeros(nz) , Ak' ]; ## guard against roundoff again: zero out extremely small values ## prior to balancing s1 = s1 .* (abs(s1) > ptol*norm(s1,"inf")); s2 = s2 .* (abs(s2) > ptol*norm(s2,"inf")); ! [cc,dd,s1,s2] = balance(s1,s2); ! [qza,qzb,zz,pls] = qz(s1,s2,"S"); # ordered qz decomposition ! eigerr = abs(abs(pls)-1); ! normH = norm([s1,s2]); Hb = [s1, s2]; ## check R - B' X B condition (Iglesias and Glover's paper) X = zz((nz+1):(2*nz),1:nz)/zz(1:nz,1:nz); ! dcondfailed = min(real( eig(Rg - B'*X*B)) < ptol); else Rinv = inv(g*g*Im - (D' * D)); ! H = [A + B*Rinv*D'*C, B*Rinv*B'; ... -C'*(Ip + D*Rinv*D')*C, -(A + B*Rinv*D'*C)']; ## guard against roundoff: zero out extremely small values prior ## to balancing ! H = H .* (abs(H) > ptol*norm(H,"inf")); ! [DD,Hb] = balance(H); ! pls = eig(Hb); ! eigerr = abs(real(pls)); ! normH = norm(H); dcondfailed = 0; # digital condition; doesn't apply here endif ! if( (min(eigerr) <= ptol * normH) | dcondfailed) gmin = g; else gmax = g; --- 115,207 ---- function [g, gmin, gmax] = hinfnorm (sys, tol, gmin, gmax, ptol) ! if (nargin == 0 || nargin > 4) print_usage (); ! elseif (! isstruct (sys)) ! error ("Sys must be a system data structure"); endif ## set defaults where applicable ! if (nargin < 5) ptol = 1e-9; # pole tolerance endif ! if (nargin < 4) gmax = 1e9; # max gain value endif ! dflg = is_digital (sys); ! sys = sysupdate (sys, "ss"); ! [A, B, C, D] = sys2ss (sys); ! [n, nz, m, p] = sysdimensions (sys); ## eigenvalues of A must all be stable ! if (! is_stable (sys)) ! warning ("hinfnorm: unstable system (is_stable, ptol=%g), returning Inf", ! ptol); g = Inf; endif ! Dnrm = norm (D); ! if (nargin < 3) ! gmin = max (1e-9, Dnrm); # min gain value ! elseif (gmin < Dnrm) ! warning ("hinfnorm: setting Gmin=||D||=%g", Dnrm); endif ! if (nargin < 2) tol = 0.001; # convergence measure for gmin, gmax endif ## check for scalar input arguments 2...5 ! if (! isscalar (tol) && isscalar (gmin) ! && isscalar (gmax) && isscalar (ptol)) ! error ("hinfnorm: tol, gmin, gmax, ptol must be scalars"); endif ! In = eye (n+nz); ! Im = eye (m); ! Ip = eye (p); ## find the Hinf norm via binary search ! while (gmax/gmin - 1 > tol) g = (gmax+gmin)/2; ! if (dflg) ## multiply g's through in formulas to avoid extreme magnitudes... Rg = g^2*Im - D'*D; Ak = A + (B/Rg)*D'*C; Ck = g^2*C'*((g^2*Ip-D*D')\C); ## set up symplectic generalized eigenvalue problem per Iglesias & Glover ! s1 = [Ak , zeros(nz); -Ck, In]; ! s2 = [In, -(B/Rg)*B'; zeros(nz), Ak']; ## guard against roundoff again: zero out extremely small values ## prior to balancing s1 = s1 .* (abs(s1) > ptol*norm(s1,"inf")); s2 = s2 .* (abs(s2) > ptol*norm(s2,"inf")); ! [cc, dd, s1, s2] = balance (s1, s2); ! [qza, qzb, zz, pls] = qz (s1, s2, "S"); # ordered qz decomposition ! eigerr = abs (abs(pls)-1); ! normH = norm ([s1, s2]); Hb = [s1, s2]; ## check R - B' X B condition (Iglesias and Glover's paper) X = zz((nz+1):(2*nz),1:nz)/zz(1:nz,1:nz); ! dcondfailed = min (real (eig (Rg - B'*X*B)) < ptol); else Rinv = inv(g*g*Im - (D' * D)); ! H = [A + B*Rinv*D'*C, B*Rinv*B'; -C'*(Ip + D*Rinv*D')*C, -(A + B*Rinv*D'*C)']; ## guard against roundoff: zero out extremely small values prior ## to balancing ! H = H .* (abs (H) > ptol * norm (H, "inf")); ! [DD, Hb] = balance (H); ! pls = eig (Hb); ! eigerr = abs (real (pls)); ! normH = norm (H); dcondfailed = 0; # digital condition; doesn't apply here endif ! if ((min (eigerr) <= ptol * normH) | dcondfailed) gmin = g; else gmax = g; diff -cNr octave-2.9.16/scripts/control/hinf/hinfsyn.m octave-2.9.17/scripts/control/hinf/hinfsyn.m *** octave-2.9.16/scripts/control/hinf/hinfsyn.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/hinfsyn.m Thu Nov 8 10:55:02 2007 *************** *** 131,177 **** function [K, g, GW, Xinf, Yinf] = hinfsyn (Asys, nu, ny, gmin, gmax, gtol, ptol, tol) ! if( (nargin < 1) | (nargin > 8) ) print_usage (); endif ## set default arguments ! if(nargin < 8) tol = 200*eps; ! elseif(!is_sample(tol)) ! error("tol must be a positive scalar.") endif ! if(nargin < 7) ptol = 1e-9; ! elseif(!is_sample(ptol)) ! error("hinfsyn: ptol must be a positive scalar"); endif ! if(!is_sample(gmax) | !is_sample(gmin) | !is_sample(gtol) ) ! error(["hinfsyn: gmax=",num2str(gmax),", gmin=",num2str(gmin), ... ! "gtol=",num2str(gtol), " must be positive scalars."]) endif ! [chkdgkf,dgs] = is_dgkf(Asys,nu,ny,tol); if (! chkdgkf ) ! disp("hinfsyn: system does not meet required assumptions") ! help is_dgkf ! error("hinfsyn: exit"); endif ## extract dgs information ! nw = dgs.nw; nu = dgs.nu; ! A = dgs.A; B1 = dgs.Bw; B2 = dgs.Bu; ! C1 = dgs.Cz; D11 = dgs.Dzw; D12 = dgs.Dzu; nz = dgs.nz; ! C2 = dgs.Cy; D21 = dgs.Dyw; D22 = dgs.Dyu; ny = dgs.ny; d22nz = dgs.Dyu_nz; dflg = dgs.dflg; ## recover i/o transformations ! R12 = dgs.Ru; R21 = dgs.Ry; ! [ncstates, ndstates, nin, nout] = sysdimensions(Asys); ! Atsam = sysgettsam(Asys); ! [Ast, Ain, Aout] = sysgetsignals(Asys); BB = [B1, B2]; CC = [C1 ; C2]; --- 131,194 ---- function [K, g, GW, Xinf, Yinf] = hinfsyn (Asys, nu, ny, gmin, gmax, gtol, ptol, tol) ! if (nargin < 1 || nargin > 8) print_usage (); endif ## set default arguments ! if (nargin < 8) tol = 200*eps; ! elseif (! is_sample (tol)) ! error ("tol must be a positive scalar.") endif ! if (nargin < 7) ptol = 1e-9; ! elseif (! is_sample (ptol)) ! error ("hinfsyn: ptol must be a positive scalar"); endif ! if (! is_sample (gmax) || ! is_sample (gmin) || ! is_sample (gtol)) ! error ("hinfsyn: gmax=%g, gmin=%g, gtol=%g must be positive scalars", ! gmax, gmin, gtol); endif ! [chkdgkf, dgs] = is_dgkf (Asys, nu, ny, tol); if (! chkdgkf ) ! error ("hinfsyn: system does not meet required assumptions") endif ## extract dgs information ! nw = dgs.nw; ! nu = dgs.nu; ! nz = dgs.nz; ! ny = dgs.ny; ! ! A = dgs.A; ! ! B1 = dgs.Bw; ! B2 = dgs.Bu; ! ! C1 = dgs.Cz; ! C2 = dgs.Cy; ! ! D11 = dgs.Dzw; ! D12 = dgs.Dzu; ! D21 = dgs.Dyw; ! D22 = dgs.Dyu; ! d22nz = dgs.Dyu_nz; + dflg = dgs.dflg; ## recover i/o transformations ! R12 = dgs.Ru; ! R21 = dgs.Ry; ! ! [ncstates, ndstates, nin, nout] = sysdimensions (Asys); ! ! Atsam = sysgettsam (Asys); ! ! [Ast, Ain, Aout] = sysgetsignals (Asys); BB = [B1, B2]; CC = [C1 ; C2]; *************** *** 182,202 **** ## perform binary search to find gamma min ghi = gmax; ## derive a lower lower bound for gamma from D matrices ! xx1 = norm((eye(nz) - (D12/(D12'*D12))*D12')*D11); ! xx2 = norm(D11*(eye(nw)-(D21'/(D21*D21'))*D21)); ! glo = max(xx1, xx2); if (glo > gmin) ! disp(" *** D matrices indicate a greater value of gamma min."); ! fprintf(" gamma min (%f) superseeded by %f.", gmin, glo); glo = xx1; else glo = gmin; endif if (glo > ghi) ! fprintf(" *** lower bound of gamma greater than upper bound(%f)", ... ! glo, ghi); ! disp(" *** unable to continue, Goodbye."); ! return; endif de = ghi - glo; --- 199,217 ---- ## perform binary search to find gamma min ghi = gmax; ## derive a lower lower bound for gamma from D matrices ! xx1 = norm ((eye(nz) - (D12/(D12'*D12))*D12')*D11); ! xx2 = norm (D11*(eye(nw)-(D21'/(D21*D21'))*D21)); ! glo = max (xx1, xx2); if (glo > gmin) ! warning (" *** D matrices indicate a greater value of gamma min."); ! warning (" gamma min (%f) superseeded by %f.", gmin, glo); glo = xx1; else glo = gmin; endif if (glo > ghi) ! error (" *** lower bound of gamma greater than upper bound (%g, %g)", ! glo, ghi); endif de = ghi - glo; *************** *** 242,359 **** ## now do the search ! while (!iteration_finished) switch (search_state) ! case (0) g = ghi; ! case (1) g = glo; ! case (2) g = 0.5 * (ghi + glo); ! otherwise error(" *** This should never happen!"); endswitch ! printf("%10.4f ", g); ## computing R and R~ d1dot = [D11, D12]; ! R = zeros(nin, nin); R(1:nw,1:nw) = -g*g*eye(nw); R = R + d1dot' * d1dot; ddot1 = [D11; D21]; ! Rtilde = zeros(nout, nout); Rtilde(1:nz,1:nz) = -g*g*eye(nz); Rtilde = Rtilde + ddot1 * ddot1'; ! [Xinf,x_ha_err] = hinfsyn_ric(A,BB,C1,d1dot,R,ptol); ! [Yinf,y_ha_err] = hinfsyn_ric(A',CC',B1',ddot1',Rtilde,ptol); ## assume failure for this gamma passed = 0; ! rerr=""; ! if (!x_ha_err && !y_ha_err) ## test spectral radius condition ! rho = max(abs(eig(Xinf * Yinf))); if (rho < g*g) ## spectral radius condition passed passed = 1; else ! rerr = sprintf("rho=%f",rho); endif endif ! if(x_ha_err >= 0 & x_ha_err <= 6) ! printf("%s",errmesg{x_ha_err+1}); xerr = errdesx{x_ha_err+1}; else ! error(" *** Xinf fail: this should never happen!"); endif ! if(y_ha_err >= 0 & y_ha_err <= 6) ! printf("%s",errmesg{y_ha_err+1}); yerr = errdesy{y_ha_err+1}; else ! error(" *** Yinf fail: this should never happen!"); endif ! if(passed) printf(" y all tests passed.\n"); ! else printf(" n %s/%s%s\n",xerr,yerr,rerr); endif if (passed && (de/g < gtol)) search_state = 3; endif switch (search_state) ! case (0) ! if (!passed) ## upper bound must pass but did not fprintf(" *** the upper bound of gamma (%f) is too small.\n", g); iteration_finished = 2; else search_state = 1; endif ! case (1) ! if (!passed) search_state = 2; else ## lower bound must not pass but passed ! fprintf(" *** the lower bound of gamma (%f) passed.\n", g); iteration_finished = 3; endif ! case (2) ## Normal case; must check that singular R, Rtilde wasn't the problem. ! if ((!passed) & (x_ha_err != 6) & (y_ha_err != 6) ) glo = g; ! else ghi = g; endif de = ghi - glo; ! case (3) iteration_finished = 1; # done ! otherwise error(" *** This should never happen!"); endswitch endwhile ! printf("----------------------------------------"); ! printf("--------------------------------------\n"); if (iteration_finished != 1) K = []; else ## success: compute controller ! fprintf(" hinfsyn final: glo=%f ghi=%f, test gain g=%f\n", \ ! glo, ghi, g); ! printf("----------------------------------------"); ! printf("--------------------------------------\n"); ! Z = inv(eye(ncstates) - Yinf*Xinf/g/g); F = -R \ (d1dot'*C1 + BB'*Xinf); H = -(B1*ddot1' + Yinf*CC') / Rtilde; ! K = hinf_ctr(dgs,F,H,Z,g); ! Kst = strappend(Ast,"_K"); ! Kin = strappend(Aout((nout-ny+1):(nout)),"_K"); ! Kout = strappend(Ain((nin-nu+1):(nin)),"_K"); ! [Ac, Bc, Cc, Dc] = sys2ss(K); ! K = ss(Ac,Bc,Cc,Dc,Atsam,ncstates,ndstates,Kst,Kin,Kout); if (nargout >= 3) ! GW = starp(Asys, K); endif endif ! elseif(ndstates) ## discrete time solution ! error("hinfsyn: discrete-time case not yet implemented") endif --- 257,387 ---- ## now do the search ! while (! iteration_finished) switch (search_state) ! case 0 ! g = ghi; ! case 1 ! g = glo; ! case 2 ! g = 0.5 * (ghi + glo); ! otherwise ! error (" *** This should never happen!"); endswitch ! printf ("%10.4f ", g); ## computing R and R~ d1dot = [D11, D12]; ! R = zeros (nin, nin); R(1:nw,1:nw) = -g*g*eye(nw); R = R + d1dot' * d1dot; ddot1 = [D11; D21]; ! Rtilde = zeros (nout, nout); Rtilde(1:nz,1:nz) = -g*g*eye(nz); Rtilde = Rtilde + ddot1 * ddot1'; ! [Xinf, x_ha_err] = hinfsyn_ric (A, BB, C1, d1dot, R, ptol); ! [Yinf, y_ha_err] = hinfsyn_ric (A', CC', B1', ddot1', Rtilde, ptol); ## assume failure for this gamma passed = 0; ! rerr = ""; ! if (! x_ha_err && ! y_ha_err) ## test spectral radius condition ! rho = max (abs (eig (Xinf * Yinf))); if (rho < g*g) ## spectral radius condition passed passed = 1; else ! rerr = sprintf ("rho=%f",rho); endif endif ! if (x_ha_err >= 0 && x_ha_err <= 6) ! printf ("%s", errmesg{x_ha_err+1}); xerr = errdesx{x_ha_err+1}; else ! error (" *** Xinf fail: this should never happen!"); endif ! if (y_ha_err >= 0 && y_ha_err <= 6) ! printf ("%s", errmesg{y_ha_err+1}); yerr = errdesy{y_ha_err+1}; else ! error (" *** Yinf fail: this should never happen!"); endif ! if (passed) ! printf (" y all tests passed.\n"); ! else ! printf (" n %s/%s%s\n", xerr, yerr, rerr); ! endif if (passed && (de/g < gtol)) search_state = 3; endif switch (search_state) ! case 0 ! if (! passed) ## upper bound must pass but did not fprintf(" *** the upper bound of gamma (%f) is too small.\n", g); iteration_finished = 2; else search_state = 1; endif ! case 1 ! if (! passed) ! search_state = 2; else ## lower bound must not pass but passed ! fprintf (" *** the lower bound of gamma (%f) passed.\n", g); iteration_finished = 3; endif ! case 2 ## Normal case; must check that singular R, Rtilde wasn't the problem. ! if (! passed && x_ha_err != 6 && y_ha_err != 6) ! glo = g; ! else ! ghi = g; ! endif de = ghi - glo; ! case 3 ! iteration_finished = 1; # done ! otherwise ! error (" *** This should never happen!"); endswitch endwhile ! printf ("----------------------------------------"); ! printf ("--------------------------------------\n"); if (iteration_finished != 1) K = []; else ## success: compute controller ! fprintf (" hinfsyn final: glo=%f ghi=%f, test gain g=%f\n", ! glo, ghi, g); ! printf ("----------------------------------------"); ! printf ("--------------------------------------\n"); ! Z = inv (eye(ncstates) - Yinf*Xinf/g/g); F = -R \ (d1dot'*C1 + BB'*Xinf); H = -(B1*ddot1' + Yinf*CC') / Rtilde; ! K = hinf_ctr (dgs, F, H, Z, g); ! Kst = strappend (Ast, "_K"); ! Kin = strappend (Aout((nout-ny+1):(nout)),"_K"); ! Kout = strappend (Ain((nin-nu+1):(nin)),"_K"); ! [Ac, Bc, Cc, Dc] = sys2ss (K); ! K = ss (Ac, Bc, Cc, Dc, Atsam, ncstates, ndstates, Kst, Kin, Kout); if (nargout >= 3) ! GW = starp (Asys, K); endif endif ! elseif (ndstates) ## discrete time solution ! error ("hinfsyn: discrete-time case not yet implemented") endif diff -cNr octave-2.9.16/scripts/control/hinf/hinfsyn_chk.m octave-2.9.17/scripts/control/hinf/hinfsyn_chk.m *** octave-2.9.16/scripts/control/hinf/hinfsyn_chk.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/hinfsyn_chk.m Thu Nov 8 10:55:02 2007 *************** *** 80,126 **** function [retval, Pc, Pf] = hinfsyn_chk (A, B1, B2, C1, C2, D12, D21, g, ptol) Pc = Pf = []; ## Construct the two Hamiltonians g2 = 1/(g*g); ! Hc = [ A , g2*B1*B1' - B2*B2'; -C1'*C1 , -A']; ! Hf = [ A' , g2*C1'*C1 - C2'*C2; -B1*B1' , -A]; ## check if Hc, Hf are in dom(Ric) ! Hcminval = min(abs(real(eig(Hc)))); ! Hfminval = min(abs(real(eig(Hf)))); ! if(Hcminval < ptol); ! disp("hinfsyn_chk: Hc is not in dom(Ric)"); retval = 0; return endif if(Hfminval < ptol) ! disp("hinfsyn_chk: Hf is not in dom(Ric)"); retval = 0; return endif ## Solve ARE's ! Pc = are(A, B2*B2'-g2*B1*B1',C1'*C1); ! Pf = are(A',C2'*C2-g2*C1'*C1,B1*B1'); ! Pceig = eig(Pc); ! Pfeig = eig(Pf); ! Pcfeig = eig(Pc*Pf); ! if(min(Pceig) < -ptol) ! disp("hinfsyn_chk: Pc is not >= 0"); retval = 0; return endif ! if(min(Pfeig) < -ptol) ! disp("hinfsyn_chk: Pf is not >= 0"); retval = 0; return endif ! if(max(abs(Pcfeig)) >= g*g) ! disp("hinfsyn_chk: rho(Pf*Pc) is not < g^2"); retval = 0; return endif --- 80,130 ---- function [retval, Pc, Pf] = hinfsyn_chk (A, B1, B2, C1, C2, D12, D21, g, ptol) + if (nargin != 9) + print_usage (); + endif + Pc = Pf = []; ## Construct the two Hamiltonians g2 = 1/(g*g); ! Hc = [A, g2*B1*B1' - B2*B2'; -C1'*C1, -A']; ! Hf = [A', g2*C1'*C1 - C2'*C2; -B1*B1', -A]; ## check if Hc, Hf are in dom(Ric) ! Hcminval = min (abs (real (eig (Hc)))); ! Hfminval = min (abs (real (eig (Hf)))); ! if (Hcminval < ptol); ! warning ("hinfsyn_chk: Hc is not in dom(Ric)"); retval = 0; return endif if(Hfminval < ptol) ! warning ("hinfsyn_chk: Hf is not in dom(Ric)"); retval = 0; return endif ## Solve ARE's ! Pc = are (A, B2*B2'-g2*B1*B1', C1'*C1); ! Pf = are (A', C2'*C2-g2*C1'*C1, B1*B1'); ! Pceig = eig (Pc); ! Pfeig = eig (Pf); ! Pcfeig = eig (Pc*Pf); ! if (min (Pceig) < -ptol) ! warning ("hinfsyn_chk: Pc is not >= 0"); retval = 0; return endif ! if (min (Pfeig) < -ptol) ! warning ("hinfsyn_chk: Pf is not >= 0"); retval = 0; return endif ! if (max (abs (Pcfeig)) >= g*g) ! warning ("hinfsyn_chk: rho(Pf*Pc) is not < g^2"); retval = 0; return endif diff -cNr octave-2.9.16/scripts/control/hinf/hinfsyn_ric.m octave-2.9.17/scripts/control/hinf/hinfsyn_ric.m *** octave-2.9.16/scripts/control/hinf/hinfsyn_ric.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/hinfsyn_ric.m Wed Nov 7 21:29:23 2007 *************** *** 47,85 **** function [Xinf, x_ha_err] = hinfsyn_ric (A, BB, C1, d1dot, R, ptol) x_ha_err = 0; # assume success Xinf = []; # default return value ! n = issquare(A); ! nw = issquare(R); ! if(rank(R) != nw) x_ha_err = 6; else # build hamiltonian Ha for X_inf xx = ([BB; -C1'*d1dot]/R) * [d1dot'*C1, BB']; Ha = [A, 0*A; -C1'*C1, -A'] - xx; x_ha_err = 0; ! [d, Ha] = balance(Ha); ! [u, s] = schur(Ha, "A"); ! rev = real(eig(s)); ! if (any(abs(rev) <= ptol)) # eigenvalues near the imaginary axis x_ha_err = 1; ! elseif (sum(rev > 0) != sum(rev < 0)) ## unequal number of positive and negative eigenvalues x_ha_err = 2; else ## compute positive Riccati equation solution u = d * u; Xinf = u(n+1:2*n,1:n) / u(1:n,1:n); ! if (!all(all(finite(Xinf)))) x_ha_err = 3; ! elseif (norm(Xinf-Xinf') >= 10*ptol) ## solution not symmetric x_ha_err = 4; else ## positive semidefinite? ## force symmetry (faster, avoids some convergence problems) Xinf = (Xinf + Xinf')/2; ! rev = eig(Xinf); ! if (any(rev <= -ptol)) x_ha_err = 5; endif endif --- 47,90 ---- function [Xinf, x_ha_err] = hinfsyn_ric (A, BB, C1, d1dot, R, ptol) + if (nargin != 6) + print_usage (); + endif + x_ha_err = 0; # assume success Xinf = []; # default return value ! n = issquare (A); ! nw = issquare (R); ! if (rank (R) != nw) ! x_ha_err = 6; else # build hamiltonian Ha for X_inf xx = ([BB; -C1'*d1dot]/R) * [d1dot'*C1, BB']; Ha = [A, 0*A; -C1'*C1, -A'] - xx; x_ha_err = 0; ! [d, Ha] = balance (Ha); ! [u, s] = schur (Ha, "A"); ! rev = real (eig (s)); ! if (any (abs (rev) <= ptol)) # eigenvalues near the imaginary axis x_ha_err = 1; ! elseif (sum (rev > 0) != sum (rev < 0)) ## unequal number of positive and negative eigenvalues x_ha_err = 2; else ## compute positive Riccati equation solution u = d * u; Xinf = u(n+1:2*n,1:n) / u(1:n,1:n); ! if (! all (all (finite (Xinf)))) x_ha_err = 3; ! elseif (norm (Xinf-Xinf') >= 10*ptol) ## solution not symmetric x_ha_err = 4; else ## positive semidefinite? ## force symmetry (faster, avoids some convergence problems) Xinf = (Xinf + Xinf')/2; ! rev = eig (Xinf); ! if (any (rev <= -ptol)) x_ha_err = 5; endif endif diff -cNr octave-2.9.16/scripts/control/hinf/is_dgkf.m octave-2.9.17/scripts/control/hinf/is_dgkf.m *** octave-2.9.16/scripts/control/hinf/is_dgkf.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/is_dgkf.m Thu Nov 8 10:55:02 2007 *************** *** 131,214 **** function [retval, dgkf_struct] = is_dgkf (Asys, nu, ny, tol) ! if (nargin < 3) | (nargin > 4) print_usage (); ! elseif (! isscalar(nu) | ! isscalar(ny) ) ! error("is_dgkf: arguments 2 and 3 must be scalars") ! elseif (! isstruct(Asys) ) ! error("Argument 1 must be a system data structure"); endif ! if(nargin < 4) tol = 200*eps; ! elseif( !is_sample(tol) ) ! error("is_dgkf: tol must be a positive scalar") endif retval = 1; # assume passes test ! dflg = is_digital(Asys); ! [Anc, Anz, nin, nout ] = sysdimensions(Asys); ! if( Anz == 0 & Anc == 0 ) ! error("is_dgkf: no system states"); ! elseif( nu >= nin ) ! error("is_dgkf: insufficient number of disturbance inputs"); ! elseif( ny >= nout ) ! error("is_dgkf: insufficient number of regulated outputs"); endif ! nw = nin - nu; nw1 = nw + 1; ! nz = nout - ny; nz1 = nz + 1; ! [A,B,C,D] = sys2ss(Asys); ## scale input/output for numerical reasons ! if(norm (C, "fro") * norm (B, "fro") == 0) ! error("||C||*||B|| = 0; no dynamic connnection from inputs to outputs"); endif ! xx = sqrt(norm(B, Inf) / norm(C, Inf)); B = B / xx; C = C * xx; ## partition matrices ! Bw = B(:,1:nw); Bu = B(:,nw1:nin); ! Cz = C(1:nz,:); Dzw = D(1:nz,1:nw); Dzu = D(1:nz,nw1:nin); ! Cy = C(nz1:nout,:); Dyw = D(nz1:nout,1:nw); Dyu = D(nz1:nout,nw1:nin); ## Check for loopo shifting ! Dyu_nz = (norm(Dyu,Inf) != 0); if (Dyu_nz) ! warning("is_dgkf: D22 nonzero; performing loop shifting"); endif ## 12 - rank condition at w = 0 xx =[A, Bu; Cz, Dzu]; ! [nr, nc] = size(xx); ! irank = rank(xx); if (irank != nc) retval = 0; ! warning(sprintf("rank([A Bu; Cz Dzu]) = %d, need %d; n=%d, nz=%d, nu=%d", ... ! irank,nc,(Anc+Anz),nz,nu)); ! warning(" *** 12-rank condition violated at w = 0."); endif ## 21 - rank condition at w = 0 xx =[A, Bw; Cy, Dyw]; ! [nr, nc] = size(xx); ! irank = rank(xx); if (irank != nr) retval = 0; ! warning(sprintf("rank([A Bw; Cy Dyw]) = %d, need %d; n=%d, ny=%d, nw=%d", ... ! irank,nr,(Anc+Anz),ny,nw)); ! warning(" *** 21-rank condition violated at w = 0."); endif ## can Dzu be transformed to become [0 I]' or [I]? ## This ensures a normalized weight ! [Qz, Ru] = qr(Dzu); ! irank = rank(Ru); if (irank != nu) retval = 0; ! warning(sprintf("*** rank(Dzu(%d x %d) = %d", nz, nu, irank)); ! warning(" *** Dzu does not have full column rank."); endif if (nu >= nz) Qz = Qz(:,1:nu)'; --- 131,225 ---- function [retval, dgkf_struct] = is_dgkf (Asys, nu, ny, tol) ! if (nargin < 3) || (nargin > 4) print_usage (); ! elseif (! isscalar (nu) || ! isscalar (ny)) ! error ("is_dgkf: arguments 2 and 3 must be scalars") ! elseif (! isstruct (Asys)) ! error ("Argument 1 must be a system data structure"); endif ! if (nargin < 4) tol = 200*eps; ! elseif (! is_sample (tol)) ! error ("is_dgkf: tol must be a positive scalar") endif retval = 1; # assume passes test ! dflg = is_digital (Asys); ! [Anc, Anz, nin, nout ] = sysdimensions (Asys); ! if (Anz == 0 && Anc == 0) ! error ("is_dgkf: no system states"); ! elseif (nu >= nin) ! error ("is_dgkf: insufficient number of disturbance inputs"); ! elseif (ny >= nout) ! error ("is_dgkf: insufficient number of regulated outputs"); endif ! nw = nin - nu; ! nz = nout - ny; ! nw1 = nw + 1; ! nz1 = nz + 1; ! ! [A, B, C, D] = sys2ss (Asys); ## scale input/output for numerical reasons ! if (norm (C, "fro") * norm (B, "fro") == 0) ! error ("||C||*||B|| = 0; no dynamic connnection from inputs to outputs"); endif ! xx = sqrt (norm (B, Inf) / norm (C, Inf)); B = B / xx; C = C * xx; ## partition matrices ! Bw = B(:,1:nw); ! Bu = B(:,nw1:nin); ! ! Cz = C(1:nz,:); ! Cy = C(nz1:nout,:); ! ! Dzw = D(1:nz,1:nw); ! Dzu = D(1:nz,nw1:nin); ! ! Dyw = D(nz1:nout,1:nw); ! Dyu = D(nz1:nout,nw1:nin); ## Check for loopo shifting ! Dyu_nz = (norm (Dyu, Inf) != 0); if (Dyu_nz) ! warning ("is_dgkf: D22 nonzero; performing loop shifting"); endif ## 12 - rank condition at w = 0 xx =[A, Bu; Cz, Dzu]; ! [nr, nc] = size (xx); ! irank = rank (xx); if (irank != nc) retval = 0; ! warning ("rank([A Bu; Cz Dzu]) = %d, need %d; n=%d, nz=%d, nu=%d", ! irank, nc, Anc+Anz, nz, nu); ! warning (" *** 12-rank condition violated at w = 0"); endif ## 21 - rank condition at w = 0 xx =[A, Bw; Cy, Dyw]; ! [nr, nc] = size (xx); ! irank = rank (xx); if (irank != nr) retval = 0; ! warning ("rank([A Bw; Cy Dyw]) = %d, need %d; n=%d, ny=%d, nw=%d", ! irank, nr, Anc+Anz, ny, nw); ! warning (" *** 21-rank condition violated at w = 0"); endif ## can Dzu be transformed to become [0 I]' or [I]? ## This ensures a normalized weight ! [Qz, Ru] = qr (Dzu); ! irank = rank (Ru); if (irank != nu) retval = 0; ! warning ("*** rank(Dzu(%d x %d) = %d", nz, nu, irank); ! warning ("*** Dzu does not have full column rank"); endif if (nu >= nz) Qz = Qz(:,1:nu)'; *************** *** 219,230 **** ## can Dyw be transformed to become [0 I] or [I]? ## This ensures a normalized weight ! [Qw, Ry] = qr(Dyw'); ! irank = rank(Ry); if (irank != ny) retval = 0; ! warning(sprintf("*** rank(Dyw(%d x %d) = %d", ny, nw, irank)); ! warning(" *** Dyw does not have full row rank."); endif if (ny >= nw) --- 230,241 ---- ## can Dyw be transformed to become [0 I] or [I]? ## This ensures a normalized weight ! [Qw, Ry] = qr (Dyw'); ! irank = rank (Ry); if (irank != ny) retval = 0; ! warning ("*** rank(Dyw(%d x %d) = %d", ny, nw, irank); ! warning (" *** Dyw does not have full row rank"); endif if (ny >= nw) *************** *** 246,267 **** Dyw = Ry\Dyw*Qw; ## pack the return structure ! dgkf_struct.nw = nw; ! dgkf_struct.nu = nu; ! dgkf_struct.nz = nz; ! dgkf_struct.ny = ny; ! dgkf_struct.A = A; ! dgkf_struct.Bw = Bw; ! dgkf_struct.Bu = Bu; ! dgkf_struct.Cz = Cz; ! dgkf_struct.Cy = Cy; ! dgkf_struct.Dzw = Dzw; ! dgkf_struct.Dzu = Dzu; ! dgkf_struct.Dyw = Dyw; ! dgkf_struct.Dyu = Dyu; ! dgkf_struct.Ru = Ru; ! dgkf_struct.Ry = Ry; ! dgkf_struct.Dyu_nz = Dyu_nz; ! dgkf_struct.dflg = dflg; endfunction --- 257,278 ---- Dyw = Ry\Dyw*Qw; ## pack the return structure ! dgkf_struct.nw = nw; ! dgkf_struct.nu = nu; ! dgkf_struct.nz = nz; ! dgkf_struct.ny = ny; ! dgkf_struct.A = A; ! dgkf_struct.Bw = Bw; ! dgkf_struct.Bu = Bu; ! dgkf_struct.Cz = Cz; ! dgkf_struct.Cy = Cy; ! dgkf_struct.Dzw = Dzw; ! dgkf_struct.Dzu = Dzu; ! dgkf_struct.Dyw = Dyw; ! dgkf_struct.Dyu = Dyu; ! dgkf_struct.Ru = Ru; ! dgkf_struct.Ry = Ry; ! dgkf_struct.Dyu_nz = Dyu_nz; ! dgkf_struct.dflg = dflg; endfunction diff -cNr octave-2.9.16/scripts/control/hinf/wgt1o.m octave-2.9.17/scripts/control/hinf/wgt1o.m *** octave-2.9.16/scripts/control/hinf/wgt1o.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/hinf/wgt1o.m Thu Nov 8 10:55:02 2007 *************** *** 59,78 **** print_usage (); endif - if(nargout > 1) - print_usage (); - endif - if (vl == vh) a = []; b = []; c = []; else ! a = [-2*pi*fc]; ! b = [-2*pi*fc]; ! c = [vh-vl]; endif ! d=[vh]; - wsys = ss(a,b,c,d); endfunction --- 59,75 ---- print_usage (); endif if (vl == vh) a = []; b = []; c = []; else ! a = -2*pi*fc; ! b = -2*pi*fc; ! c = vh-vl; endif ! d = vh; ! ! wsys = ss (a, b, c, d); endfunction diff -cNr octave-2.9.16/scripts/control/obsolete/dezero.m octave-2.9.17/scripts/control/obsolete/dezero.m *** octave-2.9.16/scripts/control/obsolete/dezero.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/dezero.m Thu Nov 8 11:36:06 2007 *************** *** 31,37 **** function t = dezero (s) ## delete the next line if you're stubbornly going to use dezero. ! error("dezero is no longer supported."); if (nargin != 1) print_usage (); --- 31,37 ---- function t = dezero (s) ## delete the next line if you're stubbornly going to use dezero. ! error ("dezero is no longer supported."); if (nargin != 1) print_usage (); *************** *** 48,54 **** ## need to remove zeros first, then call deblank s = toascii (s); ! t = deblank(char(s(find(s != 0) ))); endif else --- 48,54 ---- ## need to remove zeros first, then call deblank s = toascii (s); ! t = deblank (char (s(find (s != 0)))); endif else diff -cNr octave-2.9.16/scripts/control/obsolete/dlqg.m octave-2.9.17/scripts/control/obsolete/dlqg.m *** octave-2.9.16/scripts/control/obsolete/dlqg.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/dlqg.m Thu Nov 8 11:36:06 2007 *************** *** 49,80 **** function [K, Q, P, Ee, Er] = dlqg (A, B, C, G, Sigw, Sigv, Q, R) ! warning("dlqg: obsolete. use lqg instead (system data structure format)"); if (nargin == 5) ## system data structure format ## check that it really is system data structure ! if(! isstruct(A) ) ! error("dlqg: 5 arguments, first argument is not a system data structure structure") endif ! sys = sysupdate(sys,"ss"); # make sure in proper form ! [ncstates,ndstates,nin,nout] = sysdimensions(sys); ! if(ndstates == -1) ! error("this message should never appear: bad system dimensions"); endif ! if(ncstates) ! error("dlqg: system has continuous-time states (try lqg?)") ! elseif(ndstates < 1) ! error("dlqg: system has no discrete time states") ! elseif(nin <= columns(Sigw)) ! error(["dlqg: ",num2str(nin)," inputs provided, noise dimension is ", ... ! num2str(columns(Sigw))]) ! elseif(nout != columns(Sigv)) ! error(["dlqg: number of outputs (",num2str(nout),") incompatible with ", ... ! "dimension of Sigv (",num2str(columns(Sigv)),")"]) endif ## put parameters into correct variables --- 49,80 ---- function [K, Q, P, Ee, Er] = dlqg (A, B, C, G, Sigw, Sigv, Q, R) ! warning ("dlqg: obsolete. use lqg instead (system data structure format)"); if (nargin == 5) ## system data structure format ## check that it really is system data structure ! if (! isstruct (A)) ! error ("dlqg: 5 arguments, first argument is not a system data structure structure") endif ! sys = sysupdate (sys, "ss"); # make sure in proper form ! [ncstates, ndstates, nin, nout] = sysdimensions (sys); ! if (ndstates == -1) ! error ("this message should never appear: bad system dimensions"); endif ! if (ncstates) ! error ("dlqg: system has continuous-time states (try lqg?)") ! elseif (ndstates < 1) ! error ("dlqg: system has no discrete time states") ! elseif (nin <= columns (Sigw)) ! error ("dlqg: %d inputs provided, noise dimension is %d", ! nin, columns (Sigw)); ! elseif (nout != columns(Sigv)) ! error ("dlqg: number of outputs (%d) incompatible with dimension of Sigv (%d)", ! nout, columns (Sigv)); endif ## put parameters into correct variables *************** *** 82,89 **** Q = G; Sigv = C; Sigw = B; ! [A,B,C,D] = sys2ss(Sys) ! [n,m] = size(B) m1 = columns(Sigw); m2 = m1+1; G = B(:,1:m1); --- 82,89 ---- Q = G; Sigv = C; Sigw = B; ! [A, B, C, D] = sys2ss (Sys) ! [n, m] = size (B) m1 = columns(Sigw); m2 = m1+1; G = B(:,1:m1); *************** *** 91,125 **** elseif (nargin == 8) ## state-space format ! m = columns(B); ! m1 = columns(G); ! p = rows(C); ! n = abcddim(A,B,C,zeros(p,m)); ! n1 = abcddim(A,G,C,zeros(p,m1)); ! if( (n == -1) || (n1 == -1)) ! error("dlqg: A,B,C,G incompatibly dimensioned"); ! elseif(p != columns(Sigv)) ! error("dlqg: C, Sigv incompatibly dimensioned"); ! elseif(m1 != columns(Sigw)) ! error("dlqg: G, Sigw incompatibly dimensioned"); endif else error ("dlqg: invalid number of arguments") endif ! if (! (issquare(Sigw) && issquare(Sigv) ) ) ! error("dlqg: Sigw, Sigv must be square"); endif ## now we can just do the design; call dlqr and dlqe, since all matrices ## are not given in Cholesky factor form (as in h2syn case) ! [Ks, P, Er] = dlqr(A,B,Q,R); ! [Ke, Q, jnk, Ee] = dlqe(A,G,C,Sigw,Sigv); Ac = A - Ke*C - B*Ks; Bc = Ke; Cc = -Ks; ! Dc = zeros(rows(Cc),columns(Bc)); ! K = ss(Ac,Bc,Cc,Dc,1); ! disp("HODEL: need to add names to this guy!") endfunction --- 91,125 ---- elseif (nargin == 8) ## state-space format ! m = columns (B); ! m1 = columns (G); ! p = rows (C); ! n = abcddim (A, B, C, zeros (p, m)); ! n1 = abcddim (A, G, C, zeros (p, m1)); ! if (n == -1 || n1 == -1) ! error ("dlqg: A,B,C,G incompatibly dimensioned"); ! elseif (p != columns (Sigv)) ! error ("dlqg: C, Sigv incompatibly dimensioned"); ! elseif (m1 != columns (Sigw)) ! error ("dlqg: G, Sigw incompatibly dimensioned"); endif else error ("dlqg: invalid number of arguments") endif ! if (! (issquare (Sigw) && issquare (Sigv))) ! error ("dlqg: Sigw, Sigv must be square"); endif ## now we can just do the design; call dlqr and dlqe, since all matrices ## are not given in Cholesky factor form (as in h2syn case) ! [Ks, P, Er] = dlqr (A, B, Q, R); ! [Ke, Q, jnk, Ee] = dlqe (A, G, C, Sigw, Sigv); Ac = A - Ke*C - B*Ks; Bc = Ke; Cc = -Ks; ! Dc = zeros (rows(Cc), columns(Bc)); ! K = ss (Ac, Bc, Cc, Dc, 1); ! disp ("HODEL: need to add names to this guy!") endfunction diff -cNr octave-2.9.16/scripts/control/obsolete/minfo.m octave-2.9.17/scripts/control/obsolete/minfo.m *** octave-2.9.16/scripts/control/obsolete/minfo.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/minfo.m Thu Nov 8 11:36:06 2007 *************** *** 44,60 **** function [systype, nout, nin, ncstates, ndstates] = minfo (inmat) ! warning("minfo: obsolete. Use sys2ss, sys2tf, or sys2zp."); ! if (nargin ~= 1 ) disp ("MINFO: Wrong number of arguments") systype = nout = nin = ncstates = ndstates = []; endif ! [rr,cc] = size(inmat); ## Check for empty matrix first! ! if (isempty(inmat)) systype = "empty"; nout = nin = ncstates = ndstates = 0; return --- 44,60 ---- function [systype, nout, nin, ncstates, ndstates] = minfo (inmat) ! warning ("minfo: obsolete. Use sys2ss, sys2tf, or sys2zp."); ! if (nargin != 1 ) disp ("MINFO: Wrong number of arguments") systype = nout = nin = ncstates = ndstates = []; endif ! [rr, cc] = size (inmat); ## Check for empty matrix first! ! if (isempty (inmat)) systype = "empty"; nout = nin = ncstates = ndstates = 0; return *************** *** 91,94 **** --- 91,95 ---- ncstates = 0; ndstates = 0; endif + endfunction diff -cNr octave-2.9.16/scripts/control/obsolete/packsys.m octave-2.9.17/scripts/control/obsolete/packsys.m *** octave-2.9.16/scripts/control/obsolete/packsys.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/packsys.m Thu Nov 8 15:26:32 2007 *************** *** 38,54 **** warning("packsys is obsolete! Use ss instead."); if (nargin < 3 || nargin > 5) ! disp("packsys: Invalid number of arguments") endif ## check dflg ! if(nargin == 5) ! if( !isscalar(dflg)) ! [m,n] = size(dflg); ! error(["packsys: dflg (",num2str(m),",",num2str(n), ... ! ") must be a scalar."]); ! elseif( (dflg != 0) && (dflg != 1)) ! error(["packsys: dflg=",num2str(dflg),"must be 0 or 1"]); endif else ## default condition --- 38,53 ---- warning("packsys is obsolete! Use ss instead."); if (nargin < 3 || nargin > 5) ! disp ("packsys: Invalid number of arguments"); endif ## check dflg ! if (nargin == 5) ! if (! isscalar (dflg)) ! [m, n] = size(dflg); ! error ("packsys: dflg (%d,%d) must be a scalar", m, n); ! elseif (dflg != 0 && dflg != 1) ! error ("packsys: dflg=%g must be 0 or 1", dflg); endif else ## default condition *************** *** 57,72 **** if (nargin == 3) ## No D matrix. Form a zero one! ! [brows,bcols] = size(b); ! [crows,ccols] = size(c); ! d = zeros(crows,bcols); endif ! [n,m,p] = abcddim(a,b,c,d); if (n == -1 || m == -1 || p == -1) ! error("packsys: incompatible dimensions") endif ! Asys = ss(a,b,c,d,dflg); endfunction --- 56,71 ---- if (nargin == 3) ## No D matrix. Form a zero one! ! [brows, bcols] = size (b); ! [crows, ccols] = size (c); ! d = zeros (crows, bcols); endif ! [n, m, p] = abcddim (a, b, c, d); if (n == -1 || m == -1 || p == -1) ! error ("packsys: incompatible dimensions") endif ! Asys = ss (a, b, c, d, dflg); endfunction diff -cNr octave-2.9.16/scripts/control/obsolete/qzval.m octave-2.9.17/scripts/control/obsolete/qzval.m *** octave-2.9.16/scripts/control/obsolete/qzval.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/qzval.m Thu Nov 8 11:36:06 2007 *************** *** 41,47 **** function lam = qzval (A, B) ! warning("qzval is obsolete; calling qz instead") ! lam = qz(A,B); endfunction --- 41,47 ---- function lam = qzval (A, B) ! warning ("qzval is obsolete; calling qz instead") ! lam = qz (A, B); endfunction diff -cNr octave-2.9.16/scripts/control/obsolete/rotg.m octave-2.9.17/scripts/control/obsolete/rotg.m *** octave-2.9.16/scripts/control/obsolete/rotg.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/rotg.m Thu Nov 8 11:36:06 2007 *************** *** 24,29 **** function [c, s] = rotg (a, b) ! [c,s] = givens(a,b); endfunction --- 24,29 ---- function [c, s] = rotg (a, b) ! [c, s] = givens (a, b); endfunction diff -cNr octave-2.9.16/scripts/control/obsolete/series.m octave-2.9.17/scripts/control/obsolete/series.m *** octave-2.9.16/scripts/control/obsolete/series.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/series.m Thu Nov 8 11:36:06 2007 *************** *** 43,98 **** ## If two arguments input, take care of mu system case ! warning("series is superseded by sysmult; use sysmult instead.") muflag = 0; ! if(nargin == 2) ! temp=b1; ! [a1,b1,c1,d1]=sys2ss(a1); ! [a2,b2,c2,d2]=sys2ss(temp); muflag = 1; endif ## If four arguments input, put two transfer functions in series ! if(nargin == 4) ! a = conv(a1,c1); % was conv1 ! b = conv(b1,d1); % was conv1 c = 0; d = 0; ## Find series combination of 2 state space systems ! elseif((nargin == 8)||(muflag == 1)) ## check matrix dimensions ! [n1,m1,p1] = abcddim(a1,b1,c1,d1); ! [n2,m2,p2] = abcddim(a2,b2,c2,d2); ! if((n1 == -1) || (n2 == -1)) ! error("Incorrect matrix dimensions"); endif ## check to make sure the number of outputs of system1 equals the number ## of inputs of system2 ! if(p1 ~= m2) ! error("System 1 output / System 2 input connection sizes do not match"); endif ## put the two state space systems in series ! a = [a1, zeros(rows(a1),columns(a2));b2*c1, a2]; ! b = [b1;b2*d1]; c = [d2*c1, c2]; d = [d2*d1]; ## take care of mu output ! if(muflag == 1) ! a=ss(a,b,c,d); ! b=c=d=0; endif endif --- 43,98 ---- ## If two arguments input, take care of mu system case ! warning ("series is superseded by sysmult; use sysmult instead.") muflag = 0; ! if (nargin == 2) ! temp = b1; ! [a1, b1, c1, d1] = sys2ss (a1); ! [a2, b2, c2, d2] = sys2ss (temp); muflag = 1; endif ## If four arguments input, put two transfer functions in series ! if (nargin == 4) ! a = conv (a1, c1); # was conv1 ! b = conv (b1, d1); # was conv1 c = 0; d = 0; ## Find series combination of 2 state space systems ! elseif (nargin == 8 || muflag == 1) ## check matrix dimensions ! [n1, m1, p1] = abcddim (a1, b1, c1, d1); ! [n2, m2, p2] = abcddim (a2, b2, c2, d2); ! if (n1 == -1 || n2 == -1) ! error ("incorrect matrix dimensions"); endif ## check to make sure the number of outputs of system1 equals the number ## of inputs of system2 ! if(p1 != m2) ! error ("system 1 output / system 2 input connection sizes do not match"); endif ## put the two state space systems in series ! a = [a1, zeros(rows(a1), columns(a2)); b2*c1, a2]; ! b = [b1; b2*d1]; c = [d2*c1, c2]; d = [d2*d1]; ## take care of mu output ! if (muflag == 1) ! a = ss (a, b, c, d); ! b = c = d = 0; endif endif diff -cNr octave-2.9.16/scripts/control/obsolete/swapcols.m octave-2.9.17/scripts/control/obsolete/swapcols.m *** octave-2.9.16/scripts/control/obsolete/swapcols.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/swapcols.m Thu Nov 8 11:36:06 2007 *************** *** 31,37 **** function B = swapcols (A) ! m = length(A(1,:)); idx = m:-1:1; B = A(:,idx); --- 31,37 ---- function B = swapcols (A) ! m = length (A(1,:)); idx = m:-1:1; B = A(:,idx); diff -cNr octave-2.9.16/scripts/control/obsolete/swaprows.m octave-2.9.17/scripts/control/obsolete/swaprows.m *** octave-2.9.16/scripts/control/obsolete/swaprows.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/swaprows.m Thu Nov 8 11:36:06 2007 *************** *** 31,37 **** function B = swaprows (A) ! m = rows(A); idx = m:-1:1; B = A(idx,:); --- 31,37 ---- function B = swaprows (A) ! m = rows (A); idx = m:-1:1; B = A(idx,:); diff -cNr octave-2.9.16/scripts/control/obsolete/syschnames.m octave-2.9.17/scripts/control/obsolete/syschnames.m *** octave-2.9.16/scripts/control/obsolete/syschnames.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/syschnames.m Thu Nov 8 11:36:06 2007 *************** *** 28,33 **** function retsys = syschnames (sys, opt, list, names) ! retsys = syssetsignals(sys,opt,names,list); endfunction --- 28,33 ---- function retsys = syschnames (sys, opt, list, names) ! retsys = syssetsignals (sys, opt, names, list); endfunction diff -cNr octave-2.9.16/scripts/control/obsolete/unpacksys.m octave-2.9.17/scripts/control/obsolete/unpacksys.m *** octave-2.9.16/scripts/control/obsolete/unpacksys.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/obsolete/unpacksys.m Thu Nov 8 11:36:06 2007 *************** *** 25,32 **** function [a, b, c, d] = unpacksys (syst) ! warning("unpacksys obsolete; calling sys2ss"); ! [a,b,c,d] = sys2ss(syst); endfunction --- 25,32 ---- function [a, b, c, d] = unpacksys (syst) ! warning ("unpacksys obsolete; calling sys2ss"); ! [a, b, c, d] = sys2ss (syst); endfunction diff -cNr octave-2.9.16/scripts/control/system/__syschnamesl__.m octave-2.9.17/scripts/control/system/__syschnamesl__.m *** octave-2.9.16/scripts/control/system/__syschnamesl__.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/__syschnamesl__.m Thu Nov 8 15:18:26 2007 *************** *** 33,77 **** function old_names = __syschnamesl__ (olist, old_names, inames, listname) probstr = []; - if( max(olist) > rows(old_names) ) - probstr = ["index list value(s) exceed(s) number of signals (", ... - num2str(rows(old_names)),")"]; - - elseif( length(olist) > rows(inames) ) - probstr = ["index list dimension exceeds number of replacement names (", ... - num2str(rows(inames)),")"]; ! elseif(isempty(olist)) probstr = []; # do nothing, no changes ! elseif(min(size(olist)) != 1 ) probstr = "index list must be either a vector or an empty matrix"; ! elseif(max(olist) > rows(old_names)) ! probstr = ["max(",listname,")=",num2str(max(olist))," > ", ... ! num2str(rows(old_names)),", too big"]; ! elseif(min(olist) < 1) ! probstr = ["min(",listname,")=",num2str(min(olist))," < 1, too small"]; else ! if( length(olist) == 1) ! len_in = columns(inames); ! len_out = columns(old_names); if (len_in < len_out) ! inames(1,(len_in+1):(len_out)) = zeros(1,(len_out - len_in)); endif old_names(olist,1:length(inames)) = inames; ! elseif(length(olist) > 1) ! for ii=1:length(olist) mystr = inames(ii,:); ! len_my = columns(mystr); ! len_out = columns(old_names); if (len_my < len_out) ! mystr(1,(len_my+1):(len_out)) = " "*ones(1,(len_out - len_my)); len_my = len_out; endif --- 33,78 ---- function old_names = __syschnamesl__ (olist, old_names, inames, listname) probstr = []; ! if (max (olist) > rows (old_names)) ! probstr = sprintf ("index list value(s) exceed(s) number of signals (%d)", ! rows (old_names)); ! ! elseif (length (olist) > rows (inames)) ! probstr = sprintf ("index list dimension exceeds number of replacement names (%d)", ! rows (inames)); ! ! elseif (isempty (olist)) probstr = []; # do nothing, no changes ! elseif (min (size (olist)) != 1) probstr = "index list must be either a vector or an empty matrix"; ! elseif (max (olist) > rows (old_names)) ! probstr = sprintf ("max(%s)=%d > %d, too big", listname, ! max (olist), rows (old_names)); ! elseif (min (olist) < 1) ! probstr = sprintf ("min(%s)=%d < 1, too small", listname, min (olist)); else ! if (length(olist) == 1) ! len_in = columns (inames); ! len_out = columns (old_names); if (len_in < len_out) ! inames(1,(len_in+1):(len_out)) = zeros (1, len_out-len_in); endif old_names(olist,1:length(inames)) = inames; ! elseif (length(olist) > 1) ! for ii = 1:length(olist) mystr = inames(ii,:); ! len_my = columns (mystr); ! len_out = columns (old_names); if (len_my < len_out) ! mystr(1,(len_my+1):len_out) = repmat (" ", 1, len_out-len_my); len_my = len_out; endif *************** *** 79,104 **** endfor endif endif ! if(!isempty(probstr)) ## the following lines are NOT debugging code! ! disp("Problem in syschnames: old names are") ! __outlist__(old_names," ") ! disp("new names are") __outlist__(inames," ") ! disp("list indices are") ! disp(olist) ! error(sprintf("syschnames: \"%s\" dim=(%d x %d)--\n\t%s\n", ... ! listname, rows(olist), columns(olist),probstr)); endif ## change zeros to blanks ! if( find(old_names == 0) ) ## disp("__syschnamesl__: old_names contains zeros ") ## old_names ## disp("/__syschnamesl__"); ! [ii,jj] = find(old_names == 0); ! for idx=1:length(ii) old_names(ii(idx),jj(idx)) = " "; endfor --- 80,105 ---- endfor endif endif ! if (! isempty (probstr)) ## the following lines are NOT debugging code! ! disp ("Problem in syschnames: old names are") ! __outlist__ (old_names," ") ! disp ("new names are") __outlist__(inames," ") ! disp ("list indices are") ! disp (olist) ! error (sprintf ("syschnames: \"%s\" dim=(%d x %d)--\n\t%s\n", ... ! listname, rows (olist), columns (olist), probstr)); endif ## change zeros to blanks ! if (find (old_names == 0)) ## disp("__syschnamesl__: old_names contains zeros ") ## old_names ## disp("/__syschnamesl__"); ! [ii, jj] = find (old_names == 0); ! for idx = 1:length(ii) old_names(ii(idx),jj(idx)) = " "; endfor *************** *** 108,115 **** endif ## just in case it's not a string anymore ! if( !ischar(old_names) ) ! old_names = char(old_names); endif ## disp("__syschnamesl__: exit, old_names=") --- 109,116 ---- endif ## just in case it's not a string anymore ! if (! ischar (old_names)) ! old_names = char (old_names); endif ## disp("__syschnamesl__: exit, old_names=") diff -cNr octave-2.9.16/scripts/control/system/__syscont_disc__.m octave-2.9.17/scripts/control/system/__syscont_disc__.m *** octave-2.9.16/scripts/control/system/__syscont_disc__.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/__syscont_disc__.m Thu Nov 8 15:18:26 2007 *************** *** 47,57 **** function [n_tot, st_c, st_d, y_c, y_d] = __syscont_disc__ (sys) ## get ranges for discrete/continuous states and outputs ! [nn,nz,mm,pp,yd] = sysdimensions(sys); n_tot = nn + nz; st_c = 1:(nn); st_d = nn + (1:nz); ! y_c = find(yd == 0); # y_c, y_d will be empty if there are none. ! y_d = find(yd == 1); endfunction --- 47,57 ---- function [n_tot, st_c, st_d, y_c, y_d] = __syscont_disc__ (sys) ## get ranges for discrete/continuous states and outputs ! [nn, nz, mm, pp, yd] = sysdimensions (sys); n_tot = nn + nz; st_c = 1:(nn); st_d = nn + (1:nz); ! y_c = find (yd == 0); # y_c, y_d will be empty if there are none. ! y_d = find (yd == 1); endfunction diff -cNr octave-2.9.16/scripts/control/system/__sysdefioname__.m octave-2.9.17/scripts/control/system/__sysdefioname__.m *** octave-2.9.16/scripts/control/system/__sysdefioname__.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/__sysdefioname__.m Thu Nov 8 15:18:26 2007 *************** *** 41,60 **** function ioname = __sysdefioname__ (n, str, m) ! if (nargin < 2 | nargin > 3) print_usage (); endif ! if (nargin == 2) m = min(1,n); endif ioname = {}; jj = 1; ! if(n > 0 & m > 0 & m <= n) for ii = m:n ! ioname{ii+1-m} = sprintf("%s_%d",str,ii); endfor ! elseif(m > n) ! error("str=%s; start value m=%d > final value n=%d",str,m,n); endif endfunction --- 41,62 ---- function ioname = __sysdefioname__ (n, str, m) ! if (nargin < 2 || nargin > 3) print_usage (); endif ! if (nargin == 2) ! m = min (1, n); ! endif ioname = {}; jj = 1; ! if (n > 0 && m > 0 && m <= n) for ii = m:n ! ioname{ii+1-m} = sprintf ("%s_%d", str, ii); endfor ! elseif (m > n) ! error ("str=%s; start value m=%d > final value n=%d", str, m, n); endif endfunction diff -cNr octave-2.9.16/scripts/control/system/__sysgroupn__.m octave-2.9.17/scripts/control/system/__sysgroupn__.m *** octave-2.9.16/scripts/control/system/__sysgroupn__.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/__sysgroupn__.m Thu Nov 8 15:18:26 2007 *************** *** 35,59 **** function names = __sysgroupn__ (names, kind) ## check for duplicate names ! l = length(names); ii = 1; ! while(ii <= l-1) st1 = names{ii}; jj = ii+1; ! while ( jj <= l) st2 = names{jj}; ! if(strcmp(st1,st2)) ! suffix = ["_",num2str(jj)]; ! warning("sysgroup: %s name(%d) = %s name(%d) = %s", ... ! kind,ii,kind,jj,st1); ! strval = sprintf("%s%s",st2,suffix); names{jj} = strval; ! warning("sysgroup: changed %s name %d to %s",kind,jj,strval); ## restart the check (just to be sure there's no further duplications) ! ii = 0; jj = l; endif ! jj = jj+1; endwhile ! ii = ii+1; endwhile endfunction --- 35,59 ---- function names = __sysgroupn__ (names, kind) ## check for duplicate names ! l = length (names); ii = 1; ! while (ii <= l-1) st1 = names{ii}; jj = ii+1; ! while (jj <= l) st2 = names{jj}; ! if (strcmp (st1, st2)) ! warning ("sysgroup: %s name(%d) = %s name(%d) = %s", ! kind, ii, kind, jj, st1); ! strval = sprintf ("%s_%d", st2, jj) names{jj} = strval; ! warning ("sysgroup: changed %s name %d to %s", kind, jj, strval); ## restart the check (just to be sure there's no further duplications) ! ii = 0; ! jj = l; endif ! jj++; endwhile ! ii++; endwhile endfunction diff -cNr octave-2.9.16/scripts/control/system/__tf2sysl__.m octave-2.9.17/scripts/control/system/__tf2sysl__.m *** octave-2.9.16/scripts/control/system/__tf2sysl__.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/__tf2sysl__.m Thu Nov 8 15:18:26 2007 *************** *** 27,32 **** function vec = __tf2sysl__ (vec) ! error("__tf2sysl__ no longer used; use the tf function."); endfunction --- 27,32 ---- function vec = __tf2sysl__ (vec) ! error ("__tf2sysl__ no longer used; use the tf function."); endfunction diff -cNr octave-2.9.16/scripts/control/system/__zp2ssg2__.m octave-2.9.17/scripts/control/system/__zp2ssg2__.m *** octave-2.9.16/scripts/control/system/__zp2ssg2__.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/__zp2ssg2__.m Thu Nov 8 15:18:26 2007 *************** *** 32,56 **** function [poly, rvals] = __zp2ssg2__ (rvals) ## locate imaginary roots (if any) ! cidx = find(imag(rvals)); ! if(!isempty(cidx)) ## select first complex root, omit from cidx ! r1i = cidx(1); r1 = rvals(r1i); cidx = complement(r1i,cidx); ## locate conjugate root (must be in cidx list, just in case there's ## roundoff) ! err = abs(rvals(cidx) - r1'); ! minerr = min(err); ! c2i = find(err == minerr, 1); r2i = cidx(c2i); r2 = rvals(r2i); ! cidx = complement(r2i,cidx); ## don't check for divide by zero, since 0 is not complex. ! if(abs(r2 - r1')/abs(r1) > 1e-12) ! error(sprintf("r1=(%f,%f); r2=(%f,%f), not conjugates.", ... ! real(r1),imag(r1),real(r2),imag(r2))); endif ## complex conjugate pair --- 32,58 ---- function [poly, rvals] = __zp2ssg2__ (rvals) ## locate imaginary roots (if any) ! cidx = find (imag (rvals)); ! if (! isempty (cidx)) ## select first complex root, omit from cidx ! r1i = cidx(1); ! r1 = rvals(r1i); ! cidx = complement (r1i, cidx); ## locate conjugate root (must be in cidx list, just in case there's ## roundoff) ! err = abs (rvals(cidx) - r1'); ! minerr = min (err); ! c2i = find (err == minerr, 1); r2i = cidx(c2i); r2 = rvals(r2i); ! cidx = complement (r2i, cidx); ## don't check for divide by zero, since 0 is not complex. ! if (abs (r2-r1') / abs (r1) > 1e-12) ! error ("r1=(%f,%f); r2=(%f,%f), not conjugates.", ! real (r1), imag (r1), real (r2), imag(r2)); endif ## complex conjugate pair *************** *** 60,70 **** r1 = rvals(1); r2 = rvals(2); poly = [1, -(r1+r2), (r1*r2)]; ! r1i = 1; r2i = 2; endif ## remove roots used ! idx = complement([r1i, r2i],1:length(rvals)); rvals = rvals(idx); endfunction --- 62,73 ---- r1 = rvals(1); r2 = rvals(2); poly = [1, -(r1+r2), (r1*r2)]; ! r1i = 1; ! r2i = 2; endif ## remove roots used ! idx = complement ([r1i, r2i], 1:length(rvals)); rvals = rvals(idx); endfunction diff -cNr octave-2.9.16/scripts/control/system/abcddim.m octave-2.9.17/scripts/control/system/abcddim.m *** octave-2.9.16/scripts/control/system/abcddim.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/abcddim.m Thu Nov 8 15:18:26 2007 *************** *** 68,74 **** function [n, m, p] = abcddim (a, b, c, d) if (nargin != 4) ! error ("abcddim: four arguments required"); endif n = m = p = -1; --- 68,74 ---- function [n, m, p] = abcddim (a, b, c, d) if (nargin != 4) ! print_usage (); endif n = m = p = -1; *************** *** 78,129 **** [c, cn, cm] = __abcddims__ (c); [d, dn, dm] = __abcddims__ (d); ! if ( (!issquare(a)) & (!isempty(a)) ) ! warning (["abcddim: a is not square (",num2str(an),"x",num2str(am),")"]); ! return endif ! if( (bm == 0) & (dm == 0) ) ! warning("abcddim: no inputs"); elseif (bn != am) ! warning (["abcddim: a(",num2str(an),"x",num2str(am), ... ! " and b(",num2str(bn),"x",num2str(bm),") are not compatible"]); ! return endif ! if( (cn == 0) & (dn == 0 ) ) ! warning("abcddim: no outputs"); elseif (cm != an) ! warning (["abcddim: a(",num2str(an),"x",num2str(am), ... ! " and c(",num2str(cn),"x",num2str(cm),") are not compatible"]); ! return endif have_connections = (bn*cn != 0); ! if( (dn == 0) & have_connections) ! warning("abcddim: empty d matrix passed; setting compatibly with b, c"); [d, dn, dm] = __abcddims__ (zeros (cn, bm)); endif ! if(an > 0) ! [dn, dm] = size(d); ! if ( (cn != dn) & have_connections ) ! warning (["abcddim: c(",num2str(cn),"x",num2str(cm), ... ! " and d(",num2str(dn),"x",num2str(dm),") are not compatible"]); ! return endif ! if ( (bm != dm) & have_connections ) ! warning (["abcddim: b(",num2str(bn),"x",num2str(bm), ... ! " and d(",num2str(dn),"x",num2str(dm),") are not compatible"]); ! return endif m = bm; p = cn; else ! [p,m] = size(d); endif n = an; endfunction --- 78,130 ---- [c, cn, cm] = __abcddims__ (c); [d, dn, dm] = __abcddims__ (d); ! if (! issquare (a) && ! isempty (a)) ! warning ("abcddim: a is not square (%dx%d)", an, am); ! return; endif ! if (bm == 0 && dm == 0) ! warning ("abcddim: no inputs"); elseif (bn != am) ! warning ("abcddim: a(%dx%d) and b(%dx%d) are not compatible", ! an, am, bn, bm); ! return; endif ! if (cn == 0 && dn == 0) ! warning ("abcddim: no outputs"); elseif (cm != an) ! warning ("abcddim: a(%dx%d) and c(%dx%d) are not compatible", ! an, am, cn, cm); ! return; endif have_connections = (bn*cn != 0); ! if (dn == 0 && have_connections) ! warning ("abcddim: empty d matrix passed; setting compatibly with b, c"); [d, dn, dm] = __abcddims__ (zeros (cn, bm)); endif ! if (an > 0) ! [dn, dm] = size (d); ! if (cn != dn && have_connections) ! warning ("abcddim: c(%dx%d) and d(%dx%d) are not compatible", ! cn, cm, dn, dm); ! return; endif ! if (bm != dm && have_connections) ! warning ("abcddim: b(",num2str(bn),"x",num2str(bm), ... ! " and d(",num2str(dn),"x",num2str(dm),") are not compatible"); ! return; endif m = bm; p = cn; else ! [p, m] = size (d); endif n = an; + endfunction diff -cNr octave-2.9.16/scripts/control/system/buildssic.m octave-2.9.17/scripts/control/system/buildssic.m *** octave-2.9.16/scripts/control/system/buildssic.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/buildssic.m Thu Nov 8 13:54:10 2007 *************** *** 159,211 **** function sys = buildssic (Clst, Ulst, Olst, Ilst, s1, s2, s3, s4, s5, s6, s7, s8) ! if((nargin < 5) || (nargin > 12)) print_usage (); endif if (nargin >= 5) ! if (!isstruct(s1)) ! error("---> s1 must be a structed system."); endif ! s1 = sysupdate(s1, "ss"); ! [n, nz, m, p] = sysdimensions(s1); ! if (!n && !nz) ! error("---> pure static system must not be the first in list."); endif if (n && nz) ! error("---> cannot handle mixed continuous and discrete systems."); endif D_SYS = (nz > 0); ! [A,B,C,D,tsam] = sys2ss(s1); nt = n + nz; endif for ii = 6:nargin ! eval(["mysys = s", num2str(ii-4), ";"]); ! if (!isstruct(mysys)) ! error("---> Parameter must be a structed system."); endif ! mysys = sysupdate(mysys, "ss"); ! [n1, nz1, m1, p1] = sysdimensions(mysys); if (n1 && nz1) ! error("---> cannot handle mixed continuous and discrete systems."); endif if (D_SYS) if (n1) ! error("---> cannot handle mixed cont. and discr. systems."); endif ! if (tsam != sysgettsam(mysys)) ! error("---> sampling time of all systems must match."); endif endif ! [as,bs,cs,ds] = sys2ss(mysys); nt1 = n1 + nz1; ! if (!nt1) ## pure gain (pad B, C with zeros) B = [B, zeros(nt,m1)]; C = [C; zeros(p1,nt)]; else A = [A, zeros(nt,nt1); zeros(nt1,nt), as]; ! B = [B, zeros(nt,m1); zeros(nt1,m), bs]; ! C = [C, zeros(p,nt1); zeros(p1,nt), cs]; endif D = [D, zeros(p,m1); zeros(p1,m), ds]; n = n + n1; --- 159,211 ---- function sys = buildssic (Clst, Ulst, Olst, Ilst, s1, s2, s3, s4, s5, s6, s7, s8) ! if (nargin < 5 || nargin > 12) print_usage (); endif if (nargin >= 5) ! if (! isstruct (s1)) ! error ("---> s1 must be a structed system."); endif ! s1 = sysupdate (s1, "ss"); ! [n, nz, m, p] = sysdimensions (s1); ! if (! n && ! nz) ! error ("---> pure static system must not be the first in list."); endif if (n && nz) ! error ("---> cannot handle mixed continuous and discrete systems."); endif D_SYS = (nz > 0); ! [A, B, C, D, tsam] = sys2ss (s1); nt = n + nz; endif for ii = 6:nargin ! eval (["mysys = s", num2str(ii-4), ";"]); ! if (! isstruct (mysys)) ! error ("---> Parameter must be a structed system."); endif ! mysys = sysupdate (mysys, "ss"); ! [n1, nz1, m1, p1] = sysdimensions (mysys); if (n1 && nz1) ! error ("---> cannot handle mixed continuous and discrete systems."); endif if (D_SYS) if (n1) ! error ("---> cannot handle mixed cont. and discr. systems."); endif ! if (tsam != sysgettsam (mysys)) ! error ("---> sampling time of all systems must match."); endif endif ! [as, bs, cs, ds] = sys2ss (mysys); nt1 = n1 + nz1; ! if (! nt1) ## pure gain (pad B, C with zeros) B = [B, zeros(nt,m1)]; C = [C; zeros(p1,nt)]; else A = [A, zeros(nt,nt1); zeros(nt1,nt), as]; ! B = [B, zeros(nt,m1); zeros(nt1,m), bs]; ! C = [C, zeros(p,nt1); zeros(p1,nt), cs]; endif D = [D, zeros(p,m1); zeros(p1,m), ds]; n = n + n1; *************** *** 216,266 **** endfor ## check maximum dimensions ! [nx, mx] = size(Clst); if (nx > m) ! error("---> more rows in Clst than total number of inputs."); endif if (mx > p+1) ! error("---> more cols in Clst than total number of outputs."); endif ## empty vector Ulst is OK ! lul = length(Ulst); if (lul) ! if (!isvector(Ulst)) ! error("---> Input u list Ulst must be a vector."); endif if (lul > m) ! error("---> more values in Ulst than number of inputs."); endif endif ! if (!length(Olst)) Olst = [1:(p+lul)]; endif ! if (!length(Ilst)) Ilst = [1:m]; endif ! if (!isvector(Olst)) ! error("---> Output list Olst must be a vector."); endif ! if (!isvector(Ilst)) ! error("---> Input list Ilst must be a vector."); endif ## build the feedback "K" from the interconnection data Clst ! K = zeros(m, p); ! inp_used = zeros(m,1); for ii = 1:nx xx = Clst(ii,:); iu = xx(1); ! if ((iu < 1) || (iu > m)) ! error("---> invalid value in first col of Clst."); endif if (inp_used(iu)) ! error("---> Input specified more than once."); endif inp_used(iu) = 1; for kk = 2:mx it = xx(kk); ! if (abs(it) > p) ! error("---> invalid row value in Clst."); elseif (it) ! K(iu,abs(it)) = sign(it); endif endfor endfor --- 216,270 ---- endfor ## check maximum dimensions ! [nx, mx] = size (Clst); if (nx > m) ! error ("---> more rows in Clst than total number of inputs."); endif if (mx > p+1) ! error ("---> more cols in Clst than total number of outputs."); endif ## empty vector Ulst is OK ! lul = length (Ulst); if (lul) ! if (! isvector (Ulst)) ! error ("---> Input u list Ulst must be a vector."); endif if (lul > m) ! error ("---> more values in Ulst than number of inputs."); endif endif ! if (! length (Olst)) ! Olst = 1:(p+lul); endif ! if (! length (Ilst)) ! Ilst = 1:m; ! endif ! if (! isvector(Olst)) ! error ("---> Output list Olst must be a vector."); ! endif ! if (! isvector (Ilst)) ! error ("---> Input list Ilst must be a vector."); endif ## build the feedback "K" from the interconnection data Clst ! K = zeros (m, p); ! inp_used = zeros (m, 1); for ii = 1:nx xx = Clst(ii,:); iu = xx(1); ! if (iu < 1 || iu > m) ! error ("---> invalid value in first col of Clst."); endif if (inp_used(iu)) ! error ("---> Input specified more than once."); endif inp_used(iu) = 1; for kk = 2:mx it = xx(kk); ! if (abs (it) > p) ! error ("---> invalid row value in Clst."); elseif (it) ! K(iu,abs(it)) = sign (it); endif endfor endfor *************** *** 274,284 **** ## -1 ## R = (I-D*K) must exist. ! R = eye(p) - D*K; ! if (rank(R) < p) ! error("---> singularity in algebraic loop."); else ! R = inv(R); endif A = A + B*K*R*C; B = B + B*K*R*D; --- 278,288 ---- ## -1 ## R = (I-D*K) must exist. ! R = eye (p) - D*K; ! if (rank (R) < p) ! error ("---> singularity in algebraic loop."); else ! R = inv (R); endif A = A + B*K*R*C; B = B + B*K*R*D; *************** *** 287,329 **** ## append old inputs u to the outputs (if lul > 0) kc = K*C; ! kdi = eye(m) + K*D; for ii = 1:lul it = Ulst(ii); ! if ((it < 1) || (it > m)) ! error("---> invalid value in Ulst."); endif C = [C; kc(it,:)]; D = [D; kdi(it,:)]; endfor ## select and rearrange outputs ! nn = length(A); ! lol = length(Olst); ! Cnew = zeros(lol,nn); ! Dnew = zeros(lol,m); for ii = 1:lol iu = Olst(ii); ! if (!iu || (abs(iu) > p+lul)) ! error("---> invalid value in Olst."); endif Cnew(ii,:) = sign(iu)*C(abs(iu),:); Dnew(ii,:) = sign(iu)*D(abs(iu),:); endfor C = Cnew; D = Dnew; ! lil = length(Ilst); ! Bnew = zeros(nn,lil); ! Dnew = zeros(lol,lil); for ii = 1:lil iu = Ilst(ii); ! if (!iu || (abs(iu) > m)) ! error("---> invalid value in Ilst."); endif ! Bnew(:,ii) = sign(iu)*B(:,abs(iu)); ! Dnew(:,ii) = sign(iu)*D(:,abs(iu)); endfor ! sys = ss(A, Bnew, C, Dnew, tsam, n, nz); endfunction --- 291,333 ---- ## append old inputs u to the outputs (if lul > 0) kc = K*C; ! kdi = eye (m) + K*D; for ii = 1:lul it = Ulst(ii); ! if (it < 1 || it > m) ! error ("---> invalid value in Ulst."); endif C = [C; kc(it,:)]; D = [D; kdi(it,:)]; endfor ## select and rearrange outputs ! nn = length (A); ! lol = length (Olst); ! Cnew = zeros (lol, nn); ! Dnew = zeros (lol, m); for ii = 1:lol iu = Olst(ii); ! if (! iu || abs(iu) > p+lul) ! error ("---> invalid value in Olst."); endif Cnew(ii,:) = sign(iu)*C(abs(iu),:); Dnew(ii,:) = sign(iu)*D(abs(iu),:); endfor C = Cnew; D = Dnew; ! lil = length (Ilst); ! Bnew = zeros (nn, lil); ! Dnew = zeros (lol, lil); for ii = 1:lil iu = Ilst(ii); ! if (! iu || abs(iu) > m) ! error ("---> invalid value in Ilst."); endif ! Bnew(:,ii) = sign (iu) * B(:,abs(iu)); ! Dnew(:,ii) = sign (iu) * D(:,abs(iu)); endfor ! sys = ss (A, Bnew, C, Dnew, tsam, n, nz); endfunction diff -cNr octave-2.9.16/scripts/control/system/c2d.m octave-2.9.17/scripts/control/system/c2d.m *** octave-2.9.16/scripts/control/system/c2d.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/c2d.m Fri Nov 9 14:34:17 2007 *************** *** 100,113 **** ## Updated by John Ingram for system data structure August 1996 function dsys = c2d (sys, opt, T) ## parse input arguments ! if(nargin < 1 | nargin > 3) print_usage (); ! elseif (!isstruct(sys)) ! error("sys must be a system data structure"); elseif (nargin == 1) opt = "ex"; ! elseif (nargin == 2 & !ischar(opt) ) T = opt; opt = "ex"; endif --- 100,114 ---- ## Updated by John Ingram for system data structure August 1996 function dsys = c2d (sys, opt, T) + ## parse input arguments ! if (nargin < 1 || nargin > 3) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be a system data structure"); elseif (nargin == 1) opt = "ex"; ! elseif (nargin == 2 && ! ischar (opt)) T = opt; opt = "ex"; endif *************** *** 117,155 **** endif ## check if sampling period T was passed. ! Ts = sysgettsam(sys); ! if(!exist("T")) T = Ts; ! if(T == 0) ! error("sys is purely continuous; no sampling period T provided"); endif ! elseif (T != Ts & Ts > 0) ! warning(["c2d: T=",num2str(T),", system tsam==",num2str(Ts), ... ! ": using T=", num2str(min(T,Ts))]); ! T = min(T,Ts); endif ! if (!is_sample(T)) ! error("sampling period T must be a positive, real scalar"); elseif (! (strcmp (opt, "ex") || strcmp (opt, "bi") || strcmp (opt, "matched"))) error ("invalid option passed: %s", opt); endif ! sys = sysupdate(sys,"ss"); ! [n,nz,m,p] = sysdimensions(sys); ! if(n == 0) ! dsys = syssetsignals(sys,"yd",ones(1:p)); ! elseif(strcmp(opt,"ex")); ! [aa,bb,cc,dd] = sys2ss(sys); crng= 1:n; drng = n+(1:nz); ## partition state equations into continuous, imaginary subsystems Ac = aa(crng,crng); Bc = bb(crng,:); ! if(nz == 0) Acd = Adc = Add = Bd = 0; else Acd = aa(crng,drng); --- 118,155 ---- endif ## check if sampling period T was passed. ! Ts = sysgettsam (sys); ! if (! exist ("T")) T = Ts; ! if (T == 0) ! error ("sys is purely continuous; no sampling period T provided"); endif ! elseif (T != Ts && Ts > 0) ! warning ("c2d: T=%g, system tsam=%g: using T=", T, Ts, min (T, Ts)); ! T = min (T, Ts); endif ! if (! is_sample (T)) ! error ("sampling period T must be a positive, real scalar"); elseif (! (strcmp (opt, "ex") || strcmp (opt, "bi") || strcmp (opt, "matched"))) error ("invalid option passed: %s", opt); endif ! sys = sysupdate (sys, "ss"); ! [n, nz, m, p] = sysdimensions (sys); ! if (n == 0) ! dsys = syssetsignals (sys, "yd", ones(1:p)); ! elseif (strcmp (opt, "ex")); ! [aa, bb, cc, dd] = sys2ss (sys); crng= 1:n; drng = n+(1:nz); ## partition state equations into continuous, imaginary subsystems Ac = aa(crng,crng); Bc = bb(crng,:); ! if (nz == 0) Acd = Adc = Add = Bd = 0; else Acd = aa(crng,drng); *************** *** 161,225 **** ## convert state equations mat = [Ac, Bc; zeros(m+nz,n+nz+m)]; ! matexp = expm(mat * T); ## replace Ac aa(crng,crng) = matexp(crng,crng); ## discretized homegenous diff eqn ## replace Bc ! bb(crng,:) = matexp(crng,n+(1:m)); ## replace Acd ! if(nz) aa(crng,drng) = matexp(crng,n+m+(1:nz)); ! end ! stnames = sysgetsignals(sys,"st"); ## continuous states renamed below ! innames = sysgetsignals(sys,"in"); ! outnames = sysgetsignals(sys,"out"); outlist = 1:p; ! dsys = ss(aa,bb,cc,dd,T,0,n+nz,stnames,innames, ... ! outnames,outlist); ## rename states ! for ii=1:n ! strval = sprintf("%s_d",sysgetsignals(dsys,"st",ii,1)); ! dsys = syssetsignals(dsys,"st",strval,ii); endfor ! elseif(strcmp(opt,"bi")) ! if(is_digital(sys)) ! error("c2d: system is already digital") else ## convert with bilinear transform ! [a,b,c,d,tsam,n,nz,stname,inname,outname,yd] = sys2ss(sys); ! IT = (2/T)*eye(size(a)); A = (IT+a)/(IT-a); iab = (IT-a)\b; ! tk=2/sqrt(T); B = tk*iab; C = tk*(c/(IT-a)); D = d + (c*iab); ! stnamed = strappend(stname,"_d"); ! dsys = ss(A,B,C,D,T,0,rows(A),stnamed,inname,outname); endif ! elseif(strcmp(opt,"matched")) ! if(is_digital(sys)) ! error("c2d: system is already digital"); ! elseif((length(sys.inname) != 1) || (length(sys.outname) != 1)) ! error("c2d: system in not single input, single output"); else ! sys = sysupdate(sys,"zp"); ! p = exp(sys.pol*T); ! z = exp(sys.zer*T); ! infinite_zeros = max(size(sys.pol))-max(size(sys.zer))-1; for i = 1:infinite_zeros z = [z ; -1]; endfor ## Should the freaquency we adjust around always be 1? ! [cmag,cphase,cw] = bode(sys,1); ! [dmag,dpahse,dw] = bode(zp(z,p,1,T),1); ! dsys = zp(z,p,cmag/dmag,T); ! endif else error ("invalid option = %s", opt); endif --- 161,225 ---- ## convert state equations mat = [Ac, Bc; zeros(m+nz,n+nz+m)]; ! matexp = expm (mat * T); ## replace Ac aa(crng,crng) = matexp(crng,crng); ## discretized homegenous diff eqn ## replace Bc ! bb(crng,:) = matexp(crng,n+(1:m)); ## replace Acd ! if (nz) aa(crng,drng) = matexp(crng,n+m+(1:nz)); ! endif ! stnames = sysgetsignals (sys, "st"); ## continuous states renamed below ! innames = sysgetsignals (sys, "in"); ! outnames = sysgetsignals (sys, "out"); outlist = 1:p; ! dsys = ss (aa, bb, cc, dd, T, 0, n+nz, stnames, innames, ! outnames, outlist); ## rename states ! for ii = 1:n ! strval = sprintf ("%s_d", sysgetsignals (dsys, "st", ii, 1)); ! dsys = syssetsignals (dsys, "st", strval, ii); endfor ! elseif (strcmp (opt, "bi")) ! if (is_digital (sys)) ! error ("c2d: system is already digital") else ## convert with bilinear transform ! [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys); ! IT = (2/T) * eye (size (a)); A = (IT+a)/(IT-a); iab = (IT-a)\b; ! tk = 2 / sqrt (T); B = tk*iab; C = tk*(c/(IT-a)); D = d + (c*iab); ! stnamed = strappend (stname, "_d"); ! dsys = ss (A, B, C, D, T, 0, rows (A), stnamed, inname, outname); endif ! elseif (strcmp (opt, "matched")) ! if (is_digital (sys)) ! error ("c2d: system is already digital"); ! elseif (length (sys.inname) != 1 || length (sys.outname) != 1) ! error ("c2d: system in not single input, single output"); else ! sys = sysupdate (sys, "zp"); ! p = exp (sys.pol*T); ! z = exp (sys.zer*T); ! infinite_zeros = max (size (sys.pol)) - max (size (sys.zer)) - 1; for i = 1:infinite_zeros z = [z ; -1]; endfor ## Should the freaquency we adjust around always be 1? ! [cmag, cphase, cw] = bode (sys, 1); ! [dmag, dpahse, dw] = bode (zp (z, p, 1, T), 1); ! dsys = zp (z, p, cmag/dmag, T); ! endif else error ("invalid option = %s", opt); endif diff -cNr octave-2.9.16/scripts/control/system/cellidx.m octave-2.9.17/scripts/control/system/cellidx.m *** octave-2.9.16/scripts/control/system/cellidx.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/cellidx.m Thu Nov 8 15:18:26 2007 *************** *** 34,98 **** ## screen and exits with an error. ## @end deftypefn ! function [idxvec,errmsg] = cellidx(listvar,strlist) ! if(nargin != 2) ! print_usage (); ! endif ! ! if(ischar(strlist)) ! tmp = strlist; ! strlist = {}; ! for kk=1:rows(tmp) ! strlist{kk} = deblank(tmp(kk,:)); ! endfor ! endif ! if(ischar(listvar)) ! tmp = listvar; ! listvar = {}; ! for kk=1:rows(tmp) ! listvar{kk} = deblank(tmp(kk,:)); ! endfor ! endif ! ## initialize size of idxvec (for premature return) ! idxvec = zeros(length(strlist),1); ! errmsg = ""; ! if(!is_signal_list(listvar)) ! errmsg = "listvar must be a list of strings"; ! elseif(!is_signal_list(strlist)) ! errmsg = "strlist must be a list of strings"; ! endif ! ! if(length(errmsg)) ! if(nargout < 2) error(errmsg); ! else return; endif - endif ! nsigs = length(listvar); ! for idx = 1:length(strlist) ! signame = strlist{idx}; ! for jdx = 1:nsigs ! if( strcmp(signame,listvar{jdx}) ) ! if(idxvec(idx) != 0) ! warning("Duplicate signal name %s (%d,%d)\n", ... ! listvar{jdx},jdx,idxvec(idx)); else ! idxvec(idx) = jdx; endif endif endfor - if(idxvec(idx) == 0) - errmsg = sprintf("Did not find %s",signame); - if(nargout == 1) - error(errmsg); - else - break - end - endif - endfor endfunction --- 34,100 ---- ## screen and exits with an error. ## @end deftypefn ! function [idxvec,errmsg] = cellidx (listvar, strlist) ! if (nargin != 2) ! print_usage (); ! endif ! if (ischar (strlist)) ! tmp = strlist; ! strlist = {}; ! for kk = 1:rows(tmp) ! strlist{kk} = deblank (tmp(kk,:)); ! endfor ! endif ! if (ischar (listvar)) ! tmp = listvar; ! listvar = {}; ! for kk = 1:rows(tmp) ! listvar{kk} = deblank (tmp(kk,:)); ! endfor ! endif ! ! ## initialize size of idxvec (for premature return) ! idxvec = zeros (length(strlist), 1); ! errmsg = ""; ! if (! is_signal_list (listvar)) ! errmsg = "listvar must be a list of strings"; ! elseif (! is_signal_list (strlist)) ! errmsg = "strlist must be a list of strings"; endif ! if (length (errmsg)) ! if (nargout < 2) ! error (errmsg); ! else ! return; ! endif ! endif ! ! nsigs = length(listvar); ! for idx = 1:length(strlist) ! signame = strlist{idx}; ! for jdx = 1:nsigs ! if (strcmp (signame, listvar{jdx}) ) ! if (idxvec(idx) != 0) ! warning ("Duplicate signal name %s (%d,%d)\n", ! listvar{jdx}, jdx, idxvec(idx)); ! else ! idxvec(idx) = jdx; ! endif ! endif ! endfor ! if (idxvec(idx) == 0) ! errmsg = sprintf ("Did not find %s", signame); ! if (nargout == 1) ! error (errmsg); else ! break; endif endif endfor endfunction diff -cNr octave-2.9.16/scripts/control/system/d2c.m octave-2.9.17/scripts/control/system/d2c.m *** octave-2.9.16/scripts/control/system/d2c.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/d2c.m Thu Nov 8 13:54:10 2007 *************** *** 66,171 **** ## SYS_INTERNAL accesses members of system data structure ! if( (nargin != 1) & (nargin != 2) ) print_usage (); ! elseif (!isstruct(sys)) ! error("sys must be in system data structure"); ! elseif(nargin == 1) opt = "log"; tol = 1e-12; ! elseif(ischar(opt)) # all remaining cases are for nargin == 2 tol = 1e-12; ! if( !(strcmp(opt,"log") | strcmp(opt,"bi") ) ) ! error(["d2c: invalid opt passed=",opt]); endif ! elseif(!is_sample(opt)) ! error("tol must be a positive scalar") ! elseif(opt > 1e-2) ! warning(["d2c: ridiculous error tolerance passed=",num2str(opt); ... ! ", intended c2d call?"]) else tol = opt; opt = "log"; endif ! T = sysgettsam(sys); ! if(strcmp(opt,"bi")) ## bilinear transform ## convert with bilinear transform ! if (! is_digital(sys) ) ! error("d2c requires a discrete time system for input") endif ! [a,b,c,d,tsam,n,nz,stname,inname,outname,yd] = sys2ss(sys); ! poles = eig(a); ! if( find(abs(poles-1) < 200*(n+nz)*eps) ) ! warning("d2c: some poles very close to one. May get bad results."); endif ! I = eye(size(a)); ! tk = 2/sqrt(T); A = (2/T)*(a-I)/(a+I); iab = (I+a)\b; B = tk*iab; C = tk*(c/(I+a)); D = d- (c*iab); ! stnamec = strappend(stname,"_c"); ! csys = ss(A,B,C,D,0,rows(A),0,stnamec,inname,outname); ! elseif(strcmp(opt,"log")) ! sys = sysupdate(sys,"ss"); ! [n,nz,m,p] = sysdimensions(sys); ! ! if(nz == 0) ! warning("d2c: all states continuous; setting outputs to agree"); ! csys = syssetsignals(sys,"yd",zeros(1,1:p)); return; ! elseif(n != 0) ! warning(["d2c: n=",num2str(n),">0; performing c2d first"]); ! sys = c2d(sys,T); endif ! [a,b] = sys2ss(sys); ! [ma,na] = size(a); ! [mb,nb] = size(b); ! if(isempty(b) ) ! warning("d2c: empty b matrix"); Amat = a; else Amat = [a, b; zeros(nb,na), eye(nb)]; endif ! poles = eig(a); ! if( find(abs(poles) < 200*(n+nz)*eps) ) ! warning("d2c: some poles very close to zero. logm not performed"); ! Mtop = zeros(ma, na+nb); ! elseif( find(abs(poles-1) < 200*(n+nz)*eps) ) ! warning("d2c: some poles very close to one. May get bad results."); ! logmat = real(logm(Amat)/T); Mtop = logmat(1:na,:); else ! logmat = real(logm(Amat)/T); Mtop = logmat(1:na,:); endif ## perform simplistic, stupid optimization approach. ## should re-write with a Davidson-Fletcher CG approach ! mxthresh = norm(Mtop); ! if(mxthresh == 0) mxthresh = 1; endif eps1 = mxthresh; #gradient descent step size ! cnt = max(20,(n*nz)*4); #max number of iterations newgrad=1; #signal for new gradient ! while( (eps1/mxthresh > tol) & cnt) ! cnt = cnt-1; ## calculate the gradient of error with respect to Amat... ! geps = norm(Mtop)*1e-8; ! if(geps == 0) geps = 1e-8; endif DMtop = Mtop; ! if(isempty(b)) Mall = Mtop; DMall = DMtop; else --- 66,171 ---- ## SYS_INTERNAL accesses members of system data structure ! if (nargin != 1 && nargin != 2) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be in system data structure"); ! elseif (nargin == 1) opt = "log"; tol = 1e-12; ! elseif (ischar (opt)) # all remaining cases are for nargin == 2 tol = 1e-12; ! if (! (strcmp (opt, "log") || strcmp (opt, "bi"))) ! error ("d2c: invalid opt passed=%s", opt); endif ! elseif (! is_sample (opt)) ! error ("tol must be a positive scalar") ! elseif (opt > 1e-2) ! warning ("d2c: ridiculous error tolerance passed=%g, intended c2d call?", ! opt); else tol = opt; opt = "log"; endif ! T = sysgettsam (sys); ! if (strcmp (opt, "bi")) ## bilinear transform ## convert with bilinear transform ! if (! is_digital (sys) ) ! error ("d2c requires a discrete time system for input") endif ! [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys); ! poles = eig (a); ! if (find (abs (poles-1) < 200*(n+nz)*eps)) ! warning ("d2c: some poles very close to one. May get bad results."); endif ! I = eye (size (a)); ! tk = 2 / sqrt (T); A = (2/T)*(a-I)/(a+I); iab = (I+a)\b; B = tk*iab; C = tk*(c/(I+a)); D = d- (c*iab); ! stnamec = strappend (stname, "_c"); ! csys = ss (A, B, C, D, 0, rows (A), 0, stnamec, inname, outname); ! elseif (strcmp (opt, "log")) ! sys = sysupdate (sys, "ss"); ! [n, nz, m, p] = sysdimensions (sys); ! ! if (nz == 0) ! warning ("d2c: all states continuous; setting outputs to agree"); ! csys = syssetsignals (sys, "yd", zeros (1, 1:p)); return; ! elseif (n != 0) ! warning ("d2c: n=%d > 0; performing c2d first", n); ! sys = c2d (sys, T); endif ! [a, b] = sys2ss (sys); ! [ma, na] = size (a); ! [mb, nb] = size (b); ! if (isempty (b)) ! warning ("d2c: empty b matrix"); Amat = a; else Amat = [a, b; zeros(nb,na), eye(nb)]; endif ! poles = eig (a); ! if (find (abs (poles) < 200*(n+nz)*eps)) ! warning ("d2c: some poles very close to zero. logm not performed"); ! Mtop = zeros (ma, na+nb); ! elseif (find (abs (poles-1) < 200*(n+nz)*eps)) ! warning ("d2c: some poles very close to one. May get bad results."); ! logmat = real (logm (Amat) / T); Mtop = logmat(1:na,:); else ! logmat = real (logm (Amat) / T); Mtop = logmat(1:na,:); endif ## perform simplistic, stupid optimization approach. ## should re-write with a Davidson-Fletcher CG approach ! mxthresh = norm (Mtop); ! if (mxthresh == 0) mxthresh = 1; endif eps1 = mxthresh; #gradient descent step size ! cnt = max (20, (n*nz)*4); #max number of iterations newgrad=1; #signal for new gradient ! while ((eps1/mxthresh > tol) && cnt) ! cnt--; ## calculate the gradient of error with respect to Amat... ! geps = norm (Mtop) * 1e-8; ! if (geps == 0) geps = 1e-8; endif DMtop = Mtop; ! if (isempty (b)) Mall = Mtop; DMall = DMtop; else *************** *** 173,182 **** DMall = [DMtop; zeros(nb,na+nb) ]; endif ! if(newgrad) ! GrMall = zeros(size(Mall)); ! for ii=1:rows(Mtop) ! for jj=1:columns(Mtop) DMall(ii,jj) = Mall(ii,jj) + geps; GrMall(ii,jj) = norm (Amat - expm (DMall*T), "fro") ... - norm (Amat - expm (Mall*T), "fro"); --- 173,182 ---- DMall = [DMtop; zeros(nb,na+nb) ]; endif ! if (newgrad) ! GrMall = zeros (size (Mall)); ! for ii = 1:rows(Mtop) ! for jj = 1:columns(Mtop) DMall(ii,jj) = Mall(ii,jj) + geps; GrMall(ii,jj) = norm (Amat - expm (DMall*T), "fro") ... - norm (Amat - expm (Mall*T), "fro"); *************** *** 190,225 **** ## got a gradient, now try to use it DMall = Mall-eps1*GrMall; ! FMall = expm(Mall*T); ! FDMall = expm(DMall*T); ! FmallErr = norm(Amat - FMall); ! FdmallErr = norm(Amat - FDMall); ! if( FdmallErr < FmallErr) Mtop = DMall(1:na,:); ! eps1 = min(eps1*2,1e12); newgrad = 1; else eps1 = eps1/2; endif ! if(FmallErr == 0) eps1 = 0; endif endwhile ! [aa,bb,cc,dd,tsam,nn,nz,stnam,innam,outnam,yd] = sys2ss(sys); aa = Mall(1:na,1:na); ! if(!isempty(b)) bb = Mall(1:na,(na+1):(na+nb)); endif ! csys = ss(aa,bb,cc,dd,0,na,0,stnam,innam,outnam); ## update names ! nn = sysdimensions(sys); for ii = (nn+1):na ! strval = sprintf("%s_c",sysgetsignals(csys,"st",ii,1)); ! csys = syssetsignals(csys,"st",strval,ii); endfor endif --- 190,225 ---- ## got a gradient, now try to use it DMall = Mall-eps1*GrMall; ! FMall = expm (Mall*T); ! FDMall = expm (DMall*T); ! FmallErr = norm (Amat - FMall); ! FdmallErr = norm (Amat - FDMall); ! if (FdmallErr < FmallErr) Mtop = DMall(1:na,:); ! eps1 = min (eps1*2, 1e12); newgrad = 1; else eps1 = eps1/2; endif ! if (FmallErr == 0) eps1 = 0; endif endwhile ! [aa, bb, cc, dd, tsam, nn, nz, stnam, innam, outnam, yd] = sys2ss (sys); aa = Mall(1:na,1:na); ! if (! isempty (b)) bb = Mall(1:na,(na+1):(na+nb)); endif ! csys = ss (aa, bb, cc, dd, 0, na, 0, stnam, innam, outnam); ## update names ! nn = sysdimensions (sys); for ii = (nn+1):na ! strval = sprintf ("%s_c", sysgetsignals (csys, "st", ii, 1)); ! csys = syssetsignals (csys, "st", strval, ii); endfor endif diff -cNr octave-2.9.16/scripts/control/system/dmr2d.m octave-2.9.17/scripts/control/system/dmr2d.m *** octave-2.9.16/scripts/control/system/dmr2d.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/dmr2d.m Thu Nov 8 13:54:10 2007 *************** *** 76,197 **** function [dsys, fidx] = dmr2d (sys, idx, sprefix, Ts2, cuflg) ## parse input arguments ! if(nargin != 4 | nargout > 2) print_usage (); ! ! elseif (!isstruct(sys)) ! error("sys must be in system data structure form"); ! ! elseif(!is_digital(sys)) ! error("sys must be discrete-time; continuous time passed"); ! endif ! if(is_signal_list(idx) | ischar(idx)) ! idx = sysidx(sys,"st",idx); ! ! elseif (!(isvector(idx) | isempty(idx))) ! error(["idx(",num2str(rows(idx)),"x",num2str(columns(idx)), ... ! ") must be a vector"]); ! ! elseif (any(idx <= 0)) ! idv = find(idx <= 0); ii = idv(1); ! error(["idx(",num2str(ii),")=",num2str(idx(ii)), ... ! "; entries of idx must be positive"]); ! ! elseif(!(is_signal_list(sprefix) | isempty(sprefix))) ! error("sprefix must be a signal list (see is_signal_list) or empty"); ! ! elseif(!is_sample(Ts2)) ! error(["Ts2=",num2str(Ts2),"; invalid sampling time"]); ! endif ## optional argument: cuflg ! if(nargin <= 4) cuflg = 1; # default: constant inputs over Ts2 sampling interv. ! elseif( !isscalar(cuflg) ) ! error("cuflg must be a scalar") ! elseif( cuflg != 0 | cuflg != 1) ! error(["cuflg = ",num2str(cuflg),", should be 0 or 1"]); endif ## extract state space information ! [da,db,dc,dd,Ts1,nc,nz,stname,inname,outname,yd] = sys2ss(sys); ## compute number of steps ! if(Ts1 > Ts2) ! error(["Current sampling time=",num2str(Ts1)," > Ts2=",num2str(Ts2)]); endif ! nstp = floor(Ts2/Ts1+0.5); ! if(abs((Ts2 - Ts1*nstp)/Ts1) > 1e-12) ! warning(["dmr2d: Ts1=",num2str(Ts1),", Ts2=",num2str(Ts2), ... ! ", selecting nsteps=",num2str(nstp),"; mismatch"]); endif ! if(isempty(sprefix) & isempty(idx)) ! warning("both sprefix and idx are empty; returning dsys=sys"); fidx = []; dsys = sys; return ! elseif(isempty(sprefix)) fidx = idx; else ! fidx = reshape(idx,1,length(idx)); ## find states whose name begins with any strings in sprefix. ! ns = length(sprefix); ! for kk=1:ns spk = sprefix{kk}; # get next prefix and length ! spl = length(spk); ## check each state name ! for ii=1:nz sti = stname{ii}; # compare spk with this state name ! if(length(sti) >= spl) ## if the prefix matches and ii isn't already in the list, add ii ! if(strcmp(sti(1:spl),spk) & !any(fidx == ii) ) ! fidx = sort([fidx,ii]); endif endif endfor endfor endif ! if(nstp == 0) ! warning("dmr2d: nstp = 0; setting tsam and returning"); ! dsys = syschtsam(sys,Ts2); ! return ! elseif(nstp < 0) ! error(["nstp = ", num2str(nstp)," < 0; this shouldn't be!"]); endif ## permute system matrices ! pv = sysreorder(nz,fidx); pv = pv(nz:-1:1); # reverse order to put fast modes in leading block ## construct inverse permutation ! Inz = eye(nz); pvi = (Inz(pv,:)'*[1:nz]')'; ## permute A, B (stname permuted for debugging only) da = da(pv,pv); db = db(pv,:); ! stname = stname(pv); ## partition A, B: ! lfidx = length(fidx); bki = 1:lfidx; a11 = da(bki,bki); b1 = db(bki,:); ! if(lfidx < nz) lfidx1 = lfidx+1; bki2 = (lfidx1):nz; a12 = da(bki,bki2); b2 = db(bki2,:); else ! warning("dmr2d: converting entire A,B matrices to new sampling rate"); lfidx1 = -1; bki2 = []; endif --- 76,187 ---- function [dsys, fidx] = dmr2d (sys, idx, sprefix, Ts2, cuflg) ## parse input arguments ! if (nargin != 4) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be in system data structure form"); ! elseif (! is_digital (sys)) ! error ("sys must be discrete-time; continuous time passed"); endif ! if (is_signal_list (idx) || ischar (idx)) ! idx = sysidx (sys, "st", idx); ! elseif (! (isvector (idx) || isempty (idx))) ! error ("idx(%dx%d) must be a vector", rows (idx), columns (idx)); ! elseif (any (idx <= 0)) ! idv = find (idx <= 0); ii = idv(1); ! error ("idx(%d)=%g; entries of idx must be positive", ii, idx(ii)); ! elseif (! (is_signal_list (sprefix) || isempty (sprefix))) ! error ("sprefix must be a signal list (see is_signal_list) or empty"); ! elseif (! is_sample (Ts2)) ! error ("Ts2=%g; invalid sampling time", Ts2); endif ## optional argument: cuflg ! if (nargin <= 4) cuflg = 1; # default: constant inputs over Ts2 sampling interv. ! elseif (! isscalar (cuflg)) ! error ("cuflg must be a scalar") ! elseif (cuflg != 0 || cuflg != 1) ! error ("cuflg = %g, should be 0 or 1", cuflg); endif ## extract state space information ! [da, db, dc, dd, Ts1, nc, nz, stname, inname, outname, yd] = sys2ss (sys); ## compute number of steps ! if (Ts1 > Ts2) ! error ("Current sampling time=%g > Ts2=%g", Ts1, Ts2); endif ! nstp = floor (Ts2/Ts1+0.5); ! if (abs ((Ts2 - Ts1*nstp)/Ts1) > 1e-12) ! warning ("dmr2d: Ts1=%g, Ts2=%g, selecting nsteps=%d; mismatch", ! Ts1, Ts2, nstp); endif ! if (isempty (sprefix) && isempty (idx)) ! warning ("both sprefix and idx are empty; returning dsys=sys"); fidx = []; dsys = sys; return ! elseif (isempty (sprefix)) fidx = idx; else ! fidx = reshape (idx, 1, length(idx)); ## find states whose name begins with any strings in sprefix. ! ns = length (sprefix); ! for kk = 1:ns spk = sprefix{kk}; # get next prefix and length ! spl = length (spk); ## check each state name ! for ii = 1:nz sti = stname{ii}; # compare spk with this state name ! if (length (sti) >= spl) ## if the prefix matches and ii isn't already in the list, add ii ! if (strcmp (sti(1:spl), spk) && ! any (fidx == ii)) ! fidx = sort ([fidx, ii]); endif endif endfor endfor endif ! if (nstp == 0) ! warning ("dmr2d: nstp = 0; setting tsam and returning"); ! dsys = syschtsam (sys, Ts2); ! return; ! elseif (nstp < 0) ! error ("nstp = %d < 0; this shouldn't be!", nstp); endif ## permute system matrices ! pv = sysreorder (nz, fidx); pv = pv(nz:-1:1); # reverse order to put fast modes in leading block ## construct inverse permutation ! Inz = eye (nz); pvi = (Inz(pv,:)'*[1:nz]')'; ## permute A, B (stname permuted for debugging only) da = da(pv,pv); db = db(pv,:); ! stname = stname (pv); ## partition A, B: ! lfidx = length (fidx); bki = 1:lfidx; a11 = da(bki,bki); b1 = db(bki,:); ! if (lfidx < nz) lfidx1 = lfidx+1; bki2 = (lfidx1):nz; a12 = da(bki,bki2); b2 = db(bki2,:); else ! warning ("dmr2d: converting entire A,B matrices to new sampling rate"); lfidx1 = -1; bki2 = []; endif *************** *** 201,256 **** ## compute abar_{n-1}*a12 and appropriate b matrix stuff a12b = a12; # running total of abar_{n-1}*a12 a12w = a12; # current a11^n*a12 (start with n = 0) ! if(cuflg) b1b = b1; b1w = b1; else ## cuflg == 0, need to keep track of intersample inputs too ! nzdx = find(max(abs(b1)) != 0); # FIXME: check tolerance relative to ||b1|| b1w = b1(nzdx); innamenz = inname(nzdx); b1b = b1; # initial b1 must match columns in b2 endif ## compute a11h = a11^nstp by squaring ! a11h = eye(size(a11)); p2 = 1; a11p2 = a11; #a11^p2 nstpw = nstp; # workspace for computing a11^nstp ! while(nstpw > 0.5) ! oddv = rem(nstpw,2); ! if(oddv) a11h = a11h*a11p2; endif nstpw = (nstpw-oddv)/2; ! if(nstpw > 0.5) a11p2 = a11p2*a11p2; # a11^(next power of 2) endif endwhile ## FIXME: this part should probably also use squaring, but ## that would require exponentially growing memory. What do do? ! for kk=2:nstp ## update a12 block to sum(a12 + ... + a11^(kk-1)*a12) a12w = a11*a12w; a12b = a12b + a12w; ## similar for b1 block (checking for cuflg first!) b1w = a11*b1w; ! if(cuflg) b1b = b1b + b1w; # update b1 block just like we did a12 else b1b = [b1b, b1w]; # append new inputs ! newin = strappend(innamenz,["_d",num2str(kk-1)]); ! inname = __sysconcat__(inname,newin); endif endfor ## reconstruct system and return da(bki,bki) = a11h; db(bki,1:columns(b1b)) = b1b; ! if(!isempty(bki2)) da(bki,bki2) = a12b; endif --- 191,247 ---- ## compute abar_{n-1}*a12 and appropriate b matrix stuff a12b = a12; # running total of abar_{n-1}*a12 a12w = a12; # current a11^n*a12 (start with n = 0) ! if (cuflg) b1b = b1; b1w = b1; else ## cuflg == 0, need to keep track of intersample inputs too ! ## FIXME: check tolerance relative to ||b1|| ! nzdx = find (max (abs (b1)) != 0); b1w = b1(nzdx); innamenz = inname(nzdx); b1b = b1; # initial b1 must match columns in b2 endif ## compute a11h = a11^nstp by squaring ! a11h = eye (size (a11)); p2 = 1; a11p2 = a11; #a11^p2 nstpw = nstp; # workspace for computing a11^nstp ! while (nstpw > 0.5) ! oddv = rem (nstpw, 2); ! if (oddv) a11h = a11h*a11p2; endif nstpw = (nstpw-oddv)/2; ! if (nstpw > 0.5) a11p2 = a11p2*a11p2; # a11^(next power of 2) endif endwhile ## FIXME: this part should probably also use squaring, but ## that would require exponentially growing memory. What do do? ! for kk = 2:nstp ## update a12 block to sum(a12 + ... + a11^(kk-1)*a12) a12w = a11*a12w; a12b = a12b + a12w; ## similar for b1 block (checking for cuflg first!) b1w = a11*b1w; ! if (cuflg) b1b = b1b + b1w; # update b1 block just like we did a12 else b1b = [b1b, b1w]; # append new inputs ! newin = sprintf ("%s_d%d", innamenz, kk-1); ! inname = __sysconcat__ (inname, newin); endif endfor ## reconstruct system and return da(bki,bki) = a11h; db(bki,1:columns(b1b)) = b1b; ! if (! isempty (bki2)) da(bki,bki2) = a12b; endif *************** *** 259,264 **** stname = stname(pvi); ## construct new system and return ! dsys = ss(da,db,dc,dd,Ts2,0,nz,stname,inname,outname,find(yd == 1)); endfunction --- 250,256 ---- stname = stname(pvi); ## construct new system and return ! dsys = ss (da, db, dc, dd, Ts2, 0, nz, stname, inname, outname, ! find (yd == 1)); endfunction diff -cNr octave-2.9.16/scripts/control/system/fir2sys.m octave-2.9.17/scripts/control/system/fir2sys.m *** octave-2.9.16/scripts/control/system/fir2sys.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/fir2sys.m Thu Nov 8 15:18:26 2007 *************** *** 87,104 **** function sys = fir2sys (num, tsam, inname, outname) ## Test for the correct number of input arguments ! if (nargin < 1 | nargin > 4) print_usage (); endif ## let tf do the argument checking ! den = [1,zeros(1,length(num)-1)]; ## check sampling interval (if any) ! if (nargin <= 1) tsam = 1; # default - elseif (isempty(tsam)) - tsam = 1; endif ## Set name of input --- 87,102 ---- function sys = fir2sys (num, tsam, inname, outname) ## Test for the correct number of input arguments ! if (nargin < 1 || nargin > 4) print_usage (); endif ## let tf do the argument checking ! den = [1, zeros(1,length(num)-1)]; ## check sampling interval (if any) ! if (nargin < 2 || isempty (tsam)) tsam = 1; # default endif ## Set name of input diff -cNr octave-2.9.16/scripts/control/system/is_abcd.m octave-2.9.17/scripts/control/system/is_abcd.m *** octave-2.9.16/scripts/control/system/is_abcd.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_abcd.m Thu Nov 8 15:18:26 2007 *************** *** 32,92 **** function retval = is_abcd (a, b, c, d) retval = 0; switch (nargin) ! case (1) ## A only ! [na, ma] = size(a); if (na != ma) ! disp("Matrix A ist not square.") endif ! case (2) ## A, B only ! [na, ma] = size(a); [nb, mb] = size(b); if (na != ma) ! disp("Matrix A ist not square.") return; endif if (na != nb) ! disp("A and B column dimension different.") return; endif ! case (3) ## A, B, C only ! [na, ma] = size(a); [nb, mb] = size(b); [nc, mc] = size(c); if (na != ma) ! disp("Matrix A ist not square.") return; endif if (na != nb) ! disp("A and B column dimensions not compatible.") return; endif if (ma != mc) ! disp("A and C row dimensions not compatible.") return; endif ! case (4) ## all matrices A, B, C, D ! [na, ma] = size(a); [nb, mb] = size(b); ! [nc, mc] = size(c); [nd, md] = size(d); if (na != ma) ! disp("Matrix A ist not square.") return; endif if (na != nb) ! disp("A and B column dimensions not compatible.") return; endif if (ma != mc) ! disp("A and C row dimensions not compatible.") return; endif if (mb != md) ! disp("B and D row dimensions not compatible.") return; endif if (nc != nd) ! disp("C and D column dimensions not compatible.") return; endif otherwise --- 32,98 ---- function retval = is_abcd (a, b, c, d) retval = 0; + switch (nargin) ! case 1 ## A only ! [na, ma] = size (a); if (na != ma) ! disp ("Matrix A ist not square.") endif ! case 2 ## A, B only ! [na, ma] = size (a); ! [nb, mb] = size(b); if (na != ma) ! disp ("Matrix A ist not square.") return; endif if (na != nb) ! disp ("A and B column dimension different.") return; endif ! case 3 ## A, B, C only ! [na, ma] = size(a); ! [nb, mb] = size(b); ! [nc, mc] = size(c); if (na != ma) ! disp ("Matrix A ist not square.") return; endif if (na != nb) ! disp ("A and B column dimensions not compatible.") return; endif if (ma != mc) ! disp ("A and C row dimensions not compatible.") return; endif ! case 4 ## all matrices A, B, C, D ! [na, ma] = size(a); ! [nb, mb] = size(b); ! [nc, mc] = size(c); ! [nd, md] = size(d); if (na != ma) ! disp ("Matrix A ist not square.") return; endif if (na != nb) ! disp ("A and B column dimensions not compatible.") return; endif if (ma != mc) ! disp ("A and C row dimensions not compatible.") return; endif if (mb != md) ! disp ("B and D row dimensions not compatible.") return; endif if (nc != nd) ! disp ("C and D column dimensions not compatible.") return; endif otherwise *************** *** 94,97 **** --- 100,104 ---- endswitch ## all tests passed, signal ok. retval = 1; + endfunction diff -cNr octave-2.9.16/scripts/control/system/is_controllable.m octave-2.9.17/scripts/control/system/is_controllable.m *** octave-2.9.16/scripts/control/system/is_controllable.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_controllable.m Thu Nov 8 15:18:26 2007 *************** *** 65,86 **** function [retval, U] = is_controllable (a, b, tol) deftol = 1; # assume default tolerance ! if(nargin < 1 | nargin > 3) print_usage (); ! elseif(isstruct(a)) ## system structure passed. ! sys = sysupdate(a,"ss"); ! [a,bs] = sys2ss(sys); ! if(nargin > 2) print_usage (); ! elseif(nargin == 2) tol = b; % get tolerance deftol = 0; endif b = bs; else ## a,b arguments sent directly. ! if(nargin < 2) print_usage (); else deftol = 1; --- 65,87 ---- function [retval, U] = is_controllable (a, b, tol) deftol = 1; # assume default tolerance ! ! if (nargin < 1 || nargin > 3) print_usage (); ! elseif (isstruct (a)) ## system structure passed. ! sys = sysupdate (a, "ss"); ! [a, bs] = sys2ss (sys); ! if (nargin > 2) print_usage (); ! elseif (nargin == 2) tol = b; % get tolerance deftol = 0; endif b = bs; else ## a,b arguments sent directly. ! if (nargin < 2) print_usage (); else deftol = 1; *************** *** 88,114 **** endif ## check for default tolerance ! if(deftol) tol = 1000*eps; endif ## check tol dimensions ! if( !isscalar(tol) ) ! error("is_controllable: tol(%dx%d) must be a scalar", ... ! rows(tol),columns(tol)); ! elseif( !is_sample(tol) ) ! error("is_controllable: tol=%e must be positive",tol); endif ## check dimensions compatibility n = issquare (a); [nr, nc] = size (b); ! if (n == 0 | n != nr | nc == 0) ! warning("is_controllable: a=(%dx%d), b(%dx%d)",rows(a),columns(a),nr,nc); retval = 0; else ## call block-krylov subspace routine to get an orthogonal basis ## of the controllable subspace. ! [U,H,Ucols] = krylov(a,b,n,tol,1); retval = (Ucols == n); endif endfunction --- 89,118 ---- endif ## check for default tolerance ! if (deftol) ! tol = 1000*eps; ! endif ## check tol dimensions ! if (! isscalar (tol)) ! error ("is_controllable: tol(%dx%d) must be a scalar", ... ! rows (tol), columns (tol)); ! elseif (! is_sample (tol)) ! error ("is_controllable: tol=%e must be positive",tol); endif ## check dimensions compatibility n = issquare (a); [nr, nc] = size (b); ! if (n == 0 || n != nr || nc == 0) ! warning ("is_controllable: a=(%dx%d), b(%dx%d)",rows(a),columns(a),nr,nc); retval = 0; else ## call block-krylov subspace routine to get an orthogonal basis ## of the controllable subspace. ! [U, H, Ucols] = krylov (a, b, n, tol, 1); retval = (Ucols == n); endif + endfunction diff -cNr octave-2.9.16/scripts/control/system/is_detectable.m octave-2.9.17/scripts/control/system/is_detectable.m *** octave-2.9.16/scripts/control/system/is_detectable.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_detectable.m Fri Nov 9 14:34:17 2007 *************** *** 38,67 **** function [retval, U] = is_detectable (a, c, tol, dflg) ! if( nargin < 1) print_usage (); ! elseif(isstruct(a)) ## system form ! if(nargin == 2) tol = c; ! elseif(nargin > 2) print_usage (); endif ! dflg = is_digital(a); ! [a,b,c] = sys2ss(a); else ! if ((nargin > 4)||(nargin == 1)) print_usage (); endif ! if (~exist("dflg")) dflg = 0; ! end ! end ! if(~exist("tol")) tol = 200*eps; ! end ! retval = is_stabilizable(a',c',tol,dflg); endfunction --- 38,68 ---- function [retval, U] = is_detectable (a, c, tol, dflg) ! if (nargin < 1) print_usage (); ! elseif (isstruct (a)) ## system form ! if (nargin == 2) tol = c; ! elseif (nargin > 2) print_usage (); endif ! dflg = is_digital (a); ! [a,b,c] = sys2ss (a); else ! if (nargin > 4 || nargin == 1) print_usage (); endif ! if (! exist ("dflg")) dflg = 0; ! endif ! endif ! if (! exist ("tol")) tol = 200*eps; ! endif ! ! retval = is_stabilizable (a', c', tol, dflg); endfunction diff -cNr octave-2.9.16/scripts/control/system/is_digital.m octave-2.9.17/scripts/control/system/is_digital.m *** octave-2.9.16/scripts/control/system/is_digital.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_digital.m Thu Nov 8 15:18:26 2007 *************** *** 47,57 **** function DIGITAL = is_digital (sys, eflg) ! switch(nargin) ! case(1), eflg = 0; ! case(2), ! if( isempty(find(eflg == [0, 1, 2])) ) ! error("invalid value of eflg=%d (%e)",eflg,eflg); endif otherwise, print_usage (); --- 47,58 ---- function DIGITAL = is_digital (sys, eflg) ! switch (nargin) ! case 1 ! eflg = 0; ! case 2 ! if (isempty (find (eflg == [0, 1, 2]))) ! error ("invalid value of eflg=%g", eflg); endif otherwise, print_usage (); *************** *** 59,77 **** ## checked for sampled data system (mixed) ## discrete system ! sysyd = sysgetsignals(sys,"yd"); ! [nn,nz] = sysdimensions(sys); ! cont = sum(sysyd == 0) + nn; ! tsam = sysgettsam(sys); ! dig = sum(sysyd != 0) + nz + tsam; ## check for mixed system ! if( cont*dig != 0) ! switch(eflg) ! case(0), ! error("continuous/discrete system; use syscont, sysdisc, or c2d first"); ! case(1), ! warning("is_digital: mixed continuous/discrete system"); endswitch dig_sign = -1; else --- 60,78 ---- ## checked for sampled data system (mixed) ## discrete system ! sysyd = sysgetsignals (sys, "yd"); ! [nn, nz] = sysdimensions (sys); ! cont = sum (sysyd == 0) + nn; ! tsam = sysgettsam (sys); ! dig = sum (sysyd != 0) + nz + tsam; ## check for mixed system ! if (cont*dig != 0) ! switch (eflg) ! case 0 ! error ("continuous/discrete system; use syscont, sysdisc, or c2d first"); ! case 1 ! warning ("is_digital: mixed continuous/discrete system"); endswitch dig_sign = -1; else diff -cNr octave-2.9.16/scripts/control/system/is_observable.m octave-2.9.17/scripts/control/system/is_observable.m *** octave-2.9.16/scripts/control/system/is_observable.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_observable.m Thu Nov 8 15:18:26 2007 *************** *** 38,60 **** function [retval, U] = is_observable (a, c, tol) ! if( nargin < 1) print_usage (); ! elseif(isstruct(a)) ## system form ! if(nargin == 2) tol = c; ! elseif(nargin > 2) print_usage (); endif ! [a,b,c] = sys2ss(a); ! elseif(nargin > 3) print_usage (); endif ! if(exist("tol")) ! [retval,U] = is_controllable (a', c', tol); else ! [retval,U] = is_controllable (a', c'); endif endfunction --- 38,60 ---- function [retval, U] = is_observable (a, c, tol) ! if (nargin < 1) print_usage (); ! elseif (isstruct (a)) ## system form ! if (nargin == 2) tol = c; ! elseif (nargin > 2) print_usage (); endif ! [a, b, c] = sys2ss (a); ! elseif (nargin > 3) print_usage (); endif ! if (exist ("tol")) ! [retval, U] = is_controllable (a', c', tol); else ! [retval, U] = is_controllable (a', c'); endif endfunction diff -cNr octave-2.9.16/scripts/control/system/is_sample.m octave-2.9.17/scripts/control/system/is_sample.m *** octave-2.9.16/scripts/control/system/is_sample.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_sample.m Wed Nov 7 21:29:23 2007 *************** *** 28,33 **** --- 28,37 ---- function out = is_sample (Ts) + if (nargin != 1) + print_usage (); + endif + out = (isscalar (Ts) && (Ts == abs (Ts)) && (Ts != 0)); endfunction diff -cNr octave-2.9.16/scripts/control/system/is_signal_list.m octave-2.9.17/scripts/control/system/is_signal_list.m *** octave-2.9.16/scripts/control/system/is_signal_list.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_signal_list.m Fri Nov 9 14:34:17 2007 *************** *** 24,33 **** function flg = is_signal_list (mylist) flg = iscell (mylist); ! if(flg) ! flg = (rows(mylist) == 1 | columns(mylist) == 1); ! end if (flg) for ii = 1:length (mylist) if (! (ischar (mylist{ii}) && rows (mylist{ii}) == 1)) --- 24,37 ---- function flg = is_signal_list (mylist) + if (nargin != 1) + print_usage (); + endif + flg = iscell (mylist); ! if (flg) ! flg = (rows (mylist) == 1 || columns (mylist) == 1); ! endif if (flg) for ii = 1:length (mylist) if (! (ischar (mylist{ii}) && rows (mylist{ii}) == 1)) diff -cNr octave-2.9.16/scripts/control/system/is_stabilizable.m octave-2.9.17/scripts/control/system/is_stabilizable.m *** octave-2.9.16/scripts/control/system/is_stabilizable.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_stabilizable.m Fri Nov 9 14:34:17 2007 *************** *** 46,124 **** function retval = is_stabilizable (a, b, tol, dflg) ! if(nargin < 1) print_usage (); ! elseif(isstruct(a)) ## system passed. ! if(nargin == 2) tol = b; % get tolerance ! elseif(nargin > 2) print_usage (); endif disc = is_digital(a); ! [a,b] = sys2ss(a); else ## a,b arguments sent directly. ! if ((nargin > 4)||(nargin == 1)) print_usage (); endif ! if(exist("dflg")) disc = dflg; else disc = 0; ! end endif ! if(~exist("tol")) tol = 200*eps; ! end ## Checking dimensions ! n = is_square(a); ! if (n==0) ! error("is_stabilizable: a must be square"); ! end ! [nr,m] = size(b); ! if (nr!=n) ! error("is_stabilizable: (a,b) not conformal"); ! end ##Computing the eigenvalue of A ! L = eig(a); retval = 1; specflag = 0; ! for i=1:n ! if (disc==0) ## Continuous time case ! rL = real(L(i)); ! if (rL>=0) H = [eye(n)*L(i)-a, b]; ! f = (rank(H,tol)==n); ! if (f==0) retval = 0; ! if (rL==0) specflag = 1; ! end ! end ! end else ## Discrete time case ! rL = abs(L(i)); ! if (rL>=1) H = [eye(n)*L(i)-a, b]; ! f = (rank(H,tol)==n); ! if (f==0) retval = 0; ! if (rL==1) specflag = 1; ! end ! end ! end ! end ! end ! if (specflag==1) ## This means that the system has uncontrollable modes at the imaginary axis ## (or at the unit circle for discrete time systems) retval = -1; ! end --- 46,126 ---- function retval = is_stabilizable (a, b, tol, dflg) ! if (nargin < 1) print_usage (); ! elseif (isstruct (a)) ## system passed. ! if (nargin == 2) tol = b; % get tolerance ! elseif (nargin > 2) print_usage (); endif disc = is_digital(a); ! [a, b] = sys2ss (a); else ## a,b arguments sent directly. ! if (nargin > 4 || nargin == 1) print_usage (); endif ! if (exist ("dflg")) disc = dflg; else disc = 0; ! endif endif ! if (! exist ("tol")) tol = 200*eps; ! endif ## Checking dimensions ! n = is_square (a); ! if (n == 0) ! error ("is_stabilizable: a must be square"); ! endif ! [nr, m] = size (b); ! if (nr != n) ! error ("is_stabilizable: (a,b) not conformal"); ! endif ##Computing the eigenvalue of A ! L = eig (a); retval = 1; specflag = 0; ! for i = 1:n ! if (disc == 0) ## Continuous time case ! rL = real (L(i)); ! if (rL >= 0) H = [eye(n)*L(i)-a, b]; ! f = (rank (H, tol) == n); ! if (f == 0) retval = 0; ! if (rL == 0) specflag = 1; ! endif ! endif ! endif else ## Discrete time case ! rL = abs (L(i)); ! if (rL >= 1) H = [eye(n)*L(i)-a, b]; ! f = (rank (H, tol) == n); ! if (f == 0) retval = 0; ! if (rL == 1) specflag = 1; ! endif ! endif ! endif ! endif ! endfor ! if (specflag == 1) ## This means that the system has uncontrollable modes at the imaginary axis ## (or at the unit circle for discrete time systems) retval = -1; ! endif ! ! endfunction diff -cNr octave-2.9.16/scripts/control/system/is_stable.m octave-2.9.17/scripts/control/system/is_stable.m *** octave-2.9.16/scripts/control/system/is_stable.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/is_stable.m Thu Nov 8 15:18:26 2007 *************** *** 48,77 **** function retval = is_stable (a, tol, disc) ! if( (nargin < 1) | (nargin > 3) ) print_usage (); ! elseif(isstruct(a)) ## system was passed ! if(nargin < 3) disc = is_digital(a); ! elseif(disc != is_digital(a)) ! warning("is_stable: disc =%d does not match system",disc) endif ! sys = sysupdate(a,"ss"); ! a = sys2ss(sys); else ! if(nargin < 3) disc = 0; endif ! if(issquare(a) == 0) ! error("A(%dx%d) must be square",rows(A), columns(A)); endif endif ! if(nargin < 2) tol = 200*eps; ! elseif( !isscalar(tol) ) ! error("is_stable: tol(%dx%d) must be a scalar",rows(tol),columns(tol)); endif ! l = eig(a); ! if(disc) nbad = sum(abs(l)*(1+tol) > 1); ! else nbad = sum(real(l)+tol > 0); endif retval = (nbad == 0); endfunction --- 48,86 ---- function retval = is_stable (a, tol, disc) ! if (nargin < 1 || nargin > 3) ! print_usage (); ! elseif (isstruct (a)) ## system was passed ! if (nargin < 3) ! disc = is_digital(a); ! elseif (disc != is_digital (a)) ! warning ("is_stable: disc =%d does not match system", disc) endif ! sys = sysupdate (a, "ss"); ! a = sys2ss (sys); else ! if (nargin < 3) ! disc = 0; ! endif ! if (issquare (a) == 0) ! error ("A(%dx%d) must be square", rows (A), columns (A)); endif endif ! if (nargin < 2) ! tol = 200*eps; ! elseif (! isscalar (tol)) ! error ("is_stable: tol(%dx%d) must be a scalar", rows (tol), ! columns (tol)); endif ! l = eig (a); ! if (disc) ! nbad = sum (abs(l)*(1+tol) > 1); ! else ! nbad = sum (real(l)+tol > 0); ! endif retval = (nbad == 0); endfunction diff -cNr octave-2.9.16/scripts/control/system/jet707.m octave-2.9.17/scripts/control/system/jet707.m *** octave-2.9.16/scripts/control/system/jet707.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/jet707.m Thu Nov 8 15:18:26 2007 *************** *** 33,39 **** ## ## System outputs: (1) airspeed and (2) pitch angle. ## ! ## @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight Control), Springer, 1994. ## @seealso{ord2} ## @end deftypefn --- 33,40 ---- ## ## System outputs: (1) airspeed and (2) pitch angle. ## ! ## @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight ! ## Control), Springer, 1994. ## @seealso{ord2} ## @end deftypefn *************** *** 45,68 **** if (nargin != 0) print_usage (); endif - if (nargin > 1) - print_usage (); - endif ! a = [ -0.46E-01, 0.10681415316, 0.0, -0.17121680433; ! -0.1675901504661613, -0.515, 1.0, 0.6420630320636088E-02; ! 0.1543104215347786, -0.547945, -0.906, -0.1521689385990753E-02; ! 0.0, 0.0, 1.0, 0.0 ]; ! b = [ 0.1602300107479095, 0.2111848453E-02; ! 0.8196877780963616E-02, -0.3025E-01; ! 0.9173594317692437E-01, -0.75283075; ! 0.0, 0.0 ]; ! c = [ 1.0, 0.0, 0.0, 0.0; ! 0.0, 0.0, 0.0, 1.0 ]; ! d=zeros(2,2); ! inam = ["thrust"; "rudder"]; ! onam = ["speed"; "pitch"]; ! snam = ["x1"; "x2"; "x3"; "x4"]; ! outsys = ss(a, b, c, d, 0.0, 4, 0, snam, inam, onam); endfunction --- 46,71 ---- if (nargin != 0) print_usage (); endif ! a = [-0.46E-01, 0.10681415316, 0.0, -0.17121680433; ! -0.1675901504661613, -0.515, 1.0, 0.6420630320636088E-02; ! 0.1543104215347786, -0.547945, -0.906, -0.1521689385990753E-02; ! 0.0, 0.0, 1.0, 0.0]; ! ! b = [0.1602300107479095, 0.2111848453E-02; ! 0.8196877780963616E-02, -0.3025E-01; ! 0.9173594317692437E-01, -0.75283075; ! 0.0, 0.0]; ! ! c = [1.0, 0.0, 0.0, 0.0; ! 0.0, 0.0, 0.0, 1.0]; ! ! d = zeros(2,2); ! ! inam = {"thrust"; "rudder"}; ! onam = {"speed"; "pitch"}; ! snam = {"x1"; "x2"; "x3"; "x4"}; ! ! outsys = ss (a, b, c, d, 0.0, 4, 0, snam, inam, onam); endfunction diff -cNr octave-2.9.16/scripts/control/system/listidx.m octave-2.9.17/scripts/control/system/listidx.m *** octave-2.9.16/scripts/control/system/listidx.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/listidx.m Thu Nov 8 15:18:26 2007 *************** *** 34,99 **** ## screen and exits with an error. ## @end deftypefn ! function [idxvec,errmsg] = listidx(listvar,strlist) ! error("listidx: don't use this anymore, ok?\n"); ! if(nargin != 2) ! print_usage (); ! endif ! ! if(ischar(strlist)) ! tmp = strlist; ! strlist = list(); ! for kk=1:rows(tmp) ! strlist(kk) = deblank(tmp(kk,:)); ! endfor ! endif ! if(ischar(listvar)) ! tmp = listvar; ! listvar = list(); ! for kk=1:rows(tmp) ! listvar(kk) = deblank(tmp(kk,:)); ! endfor ! endif ! ## initialize size of idxvec (for premature return) ! idxvec = zeros(length(strlist),1); ! errmsg = ""; ! if(!is_signal_list(listvar)) ! errmsg = "listvar must be a list of strings"; ! elseif(!is_signal_list(strlist)) ! errmsg = "strlist must be a list of strings"; ! endif ! ! if(length(errmsg)) ! if(nargout < 2) error(errmsg); ! else return; endif - endif ! nsigs = length(listvar); ! for idx = 1:length(strlist) ! signame = strlist{idx}; ! for jdx = 1:nsigs ! if( strcmp(signame,listvar{jdx}) ) ! if(idxvec(idx) != 0) ! warning("Duplicate signal name %s (%d,%d)\n", ... ! listvar{jdx},jdx,idxvec(idx)); else ! idxvec(idx) = jdx; endif endif endfor - if(idxvec(idx) == 0) - errmsg = sprintf("Did not find %s",signame); - if(nargout == 1) - error(errmsg); - else - break - end - endif - endfor endfunction --- 34,102 ---- ## screen and exits with an error. ## @end deftypefn ! function [idxvec, errmsg] = listidx (listvar, strlist) ! error ("listidx: don't use this anymore, ok?"); ! if (nargin != 2) ! print_usage (); ! endif ! ! if (ischar (strlist)) ! tmp = strlist; ! strlist = list(); ! for kk = 1:rows(tmp) ! strlist(kk) = deblank (tmp(kk,:)); ! endfor ! endif ! ! if (ischar (listvar)) ! tmp = listvar; ! listvar = list(); ! for kk = 1:rows(tmp) ! listvar(kk) = deblank (tmp(kk,:)); ! endfor ! endif ! ! ## initialize size of idxvec (for premature return) ! idxvec = zeros (length(strlist), 1); ! errmsg = ""; ! if (! is_signal_list (listvar)) ! errmsg = "listvar must be a list of strings"; ! elseif (! is_signal_list(strlist)) ! errmsg = "strlist must be a list of strings"; ! endif ! if (length (errmsg)) ! if (nargout < 2) ! error(errmsg); ! else ! return; ! endif endif ! nsigs = length (listvar); ! for idx = 1:length(strlist) ! signame = strlist{idx}; ! for jdx = 1:nsigs ! if (strcmp (signame, listvar{jdx})) ! if (idxvec(idx) != 0) ! warning ("Duplicate signal name %s (%d,%d)\n", ! listvar{jdx}, jdx, idxvec(idx)); ! else ! idxvec(idx) = jdx; ! endif ! endif ! endfor ! if (idxvec (idx) == 0) ! errmsg = sprintf ("Did not find %s", signame); ! if (nargout == 1) ! error (errmsg); else ! break; endif endif endfor endfunction diff -cNr octave-2.9.16/scripts/control/system/ord2.m octave-2.9.17/scripts/control/system/ord2.m *** octave-2.9.16/scripts/control/system/ord2.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/ord2.m Thu Nov 8 11:25:44 2007 *************** *** 65,80 **** ## Updates ! if(nargin != 2 & nargin != 3) print_usage (); endif - if (nargout > 1) - print_usage (); - endif - if (nargin == 2) - gain = 1.0; - endif - w = 2.0 * pi * nfreq; - outsys = ss ([-2.0*w*damp, -w; w, 0], [w; 0], [0, gain]); endfunction --- 65,78 ---- ## Updates ! if (nargin == 2 || nargin == 3) ! if (nargin == 2) ! gain = 1.0; ! endif ! w = 2.0 * pi * nfreq; ! outsys = ss ([-2.0*w*damp, -w; w, 0], [w; 0], [0, gain]); ! else print_usage (); endif endfunction diff -cNr octave-2.9.16/scripts/control/system/parallel.m octave-2.9.17/scripts/control/system/parallel.m *** octave-2.9.16/scripts/control/system/parallel.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/parallel.m Thu Nov 8 15:18:26 2007 *************** *** 46,73 **** if(nargin != 2) print_usage (); endif ! if(! isstruct(Asys) ) ! error("1st input argument is not a system data structure") elseif (! isstruct(Bsys) ) ! error("2nd input argument is not a system data structure") endif ! [Ann,Anz,mA] = sysdimensions(Asys); ! [Bnn,Bnz,mB] = sysdimensions(Bsys); ! if(mA != mB) ! error(["Asys has ",num2str(mA)," inputs, Bsys has ",num2str(mB)," inputs"]); endif ## save signal names ! Ain = sysgetsignals(Asys,"in"); ## change signal names to avoid warning messages from sysgroup ! Asys = syssetsignals(Asys,"in",__sysdefioname__(length(Ain),"Ain_u")); ! Bsys = syssetsignals(Bsys,"in",__sysdefioname__(length(Ain),"Bin_u")); ! sysp = sysgroup(Asys,Bsys); ! sysD = ss([],[],[],[eye(mA);eye(mA)]); ! sysp = sysmult(sysp,sysD); ! sysp = syssetsignals(sysp,"in",Ain); endfunction --- 46,73 ---- if(nargin != 2) print_usage (); endif ! if (! isstruct(Asys) ) ! error ("1st input argument is not a system data structure"); elseif (! isstruct(Bsys) ) ! error ("2nd input argument is not a system data structure"); endif ! [Ann, Anz, mA] = sysdimensions(Asys); ! [Bnn, Bnz, mB] = sysdimensions(Bsys); ! if (mA != mB) ! error ("Asys has %d inputs, Bsys has %d inputs", mA, mB); endif ## save signal names ! Ain = sysgetsignals (Asys, "in"); ## change signal names to avoid warning messages from sysgroup ! Asys = syssetsignals (Asys, "in", __sysdefioname__ (length (Ain), "Ain_u")); ! Bsys = syssetsignals (Bsys, "in", __sysdefioname__ (length (Ain), "Bin_u")); ! sysp = sysgroup (Asys, Bsys); ! sysD = ss ([], [], [], [eye(mA); eye(mA)]); ! sysp = sysmult (sysp, sysD); ! sysp = syssetsignals (sysp, "in", Ain); endfunction diff -cNr octave-2.9.16/scripts/control/system/ss.m octave-2.9.17/scripts/control/system/ss.m *** octave-2.9.16/scripts/control/system/ss.m Mon Oct 15 11:30:04 2007 --- octave-2.9.17/scripts/control/system/ss.m Thu Nov 8 15:26:32 2007 *************** *** 191,250 **** function retsys = ss (a, b, c, d, tsam, n, nz, stname, inname, outname, outlist) ## Test for correct number of inputs ! if ((nargin < 3) | (nargin > 11)) print_usage (); endif ## verify A, B, C, D arguments ## If D is not specified, set it to a zero matrix of appriate dimension. ! if (nargin == 3) d = zeros(rows(c) , columns(b)); ! elseif (isempty(d)) d = zeros(rows(c) , columns(b)); endif ## Check the dimensions ! [na,m,p] = abcddim(a,b,c,d); ## If dimensions are wrong, exit function if (m == -1) ! error("a(%dx%d), b(%dx%d), c(%dx%d), d(%dx%d); incompatible", ... ! rows(a), columns(a), rows(b), columns(b), rows(c), columns(c), ... ! rows(d), columns(d)); endif ## check for tsam input ! if(nargin < 5) tsam = 0; ! elseif( !( is_sample(tsam) | (tsam == 0) ) ) ! error("tsam must be a nonnegative real scalar"); endif ## check for continuous states ! if( (nargin < 6) & (tsam == 0) ) n = na; ! elseif(nargin < 6) n = 0; ! elseif((!ismatrix(n)) | ischar(n)) ! error("Parameter n is not a numerical value."); ! elseif( (!isscalar(n)) | (n < 0 ) | (n != round(n)) ) ! if(isscalar(n)) error("invalid value of n=%d,%e",n,n); ! else error("invalid value of n=(%dx%d)", ... ! rows(n), columns(n)); endif endif ## check for num discrete states ! if( (nargin < 7) & (tsam == 0)) nz = 0; ! elseif(nargin < 7) nz = na - n; ! elseif((!ismatrix(nz)) | ischar(nz)) ! error("Parameter nz is not a numerical value."); ! elseif( (!isscalar(nz)) | (nz < 0 ) | (nz != round(nz)) ) ! if(isscalar(nz)) ! error(["invalid value of nz=",num2str(nz)]); else ! error(["invalid value of nz=(",num2str(rows(nz)),"x", ... ! num2str(columns(nz)),")"]); endif endif ## check for total number of states ! if( (n + nz) != na ) ! error(["invalid: a is ",num2str(na),"x",num2str(na),", n=", ... ! num2str(n),", nz=",num2str(nz)]); endif ## construct system with default names --- 191,258 ---- function retsys = ss (a, b, c, d, tsam, n, nz, stname, inname, outname, outlist) ## Test for correct number of inputs ! if (nargin < 3 || nargin > 11) print_usage (); endif ## verify A, B, C, D arguments ## If D is not specified, set it to a zero matrix of appriate dimension. ! if (nargin == 3) ! d = zeros (rows (c), columns (b)); ! elseif (isempty (d)) ! d = zeros (rows (c), columns (b)); ! endif ## Check the dimensions ! [na, m, p] = abcddim (a, b, c, d); ## If dimensions are wrong, exit function if (m == -1) ! error ("a(%dx%d), b(%dx%d), c(%dx%d), d(%dx%d); incompatible", ! rows (a), columns (a), rows (b), columns (b), ! rows (c), columns (c), rows (d), columns (d)); endif ## check for tsam input ! if (nargin < 5) ! tsam = 0; ! elseif (! (is_sample (tsam) || tsam == 0)) ! error ("tsam must be a nonnegative real scalar"); endif ## check for continuous states ! if (nargin < 6 && tsam == 0) ! n = na; ! elseif (nargin < 6) ! n = 0; ! elseif (! ismatrix (n) || ischar (n)) ! error ("Parameter n is not a numerical value."); ! elseif (! isscalar(n) || n < 0 || n != round (n)) ! if (isscalar (n)) ! error ("invalid value of n=%d,%e", n, n); ! else ! error ("invalid value of n=(%dx%d)", rows (n), columns (n)); ! endif endif ## check for num discrete states ! if (nargin < 7 && tsam == 0) ! nz = 0; ! elseif (nargin < 7) ! nz = na - n; ! elseif (! ismatrix(nz) || ischar (nz)) ! error ("Parameter nz is not a numerical value."); ! elseif (! isscalar(nz) || nz < 0 || nz != round(nz)) ! if (isscalar (nz)) ! error ("invalid value of nz=%d", nz); else ! error ("invalid value of nz=(%d,%d)", rows (nz), columns (nz)); endif endif ## check for total number of states ! if ((n + nz) != na) ! error ("invalid: a is %dx%d, n=%d, nz=%d", na, na, n, nz); endif ## construct system with default names *************** *** 256,262 **** retsys.n = n; retsys.nz = nz; retsys.tsam = tsam; ! retsys.yd = zeros(1,p); # default value entered below ## Set the system vector: active = 2(ss), updated = [0 0 1]; retsys.sys = [2, 0, 0, 1]; --- 264,270 ---- retsys.n = n; retsys.nz = nz; retsys.tsam = tsam; ! retsys.yd = zeros (1, p); # default value entered below ## Set the system vector: active = 2(ss), updated = [0 0 1]; retsys.sys = [2, 0, 0, 1]; *************** *** 266,291 **** retsys.outname = __sysdefioname__ (p, "y"); ## check for state names ! if(nargin >= 8) ! if(!isempty(stname)) retsys = syssetsignals(retsys,"st",stname); endif endif ## check for input names ! if(nargin >= 9) ! if(!isempty(inname)) retsys = syssetsignals(retsys,"in",inname); endif endif ## check for output names ! if(nargin >= 10) ! if(!isempty(outname)) retsys = syssetsignals(retsys,"out",outname); endif endif ## set up yd ! if(nargin < 11) ! retsys = syssetsignals(retsys,"yd",ones(1,p)*(tsam > 0)); else ! if(!isempty(outlist)) ! retsys = syssetsignals(retsys,"yd",ones(size(outlist)),outlist); endif endif --- 274,305 ---- retsys.outname = __sysdefioname__ (p, "y"); ## check for state names ! if (nargin >= 8) ! if (! isempty (stname)) ! retsys = syssetsignals (retsys, "st", stname); ! endif endif ## check for input names ! if (nargin >= 9) ! if (! isempty (inname)) ! retsys = syssetsignals (retsys, "in", inname); ! endif endif ## check for output names ! if (nargin >= 10) ! if (! isempty (outname)) ! retsys = syssetsignals (retsys, "out", outname); ! endif endif ## set up yd ! if (nargin < 11) ! retsys = syssetsignals (retsys, "yd", ones(1,p)*(tsam > 0)); else ! if (! isempty (outlist)) ! retsys = syssetsignals (retsys, "yd", ones (size (outlist)), outlist); endif endif diff -cNr octave-2.9.16/scripts/control/system/ss2sys.m octave-2.9.17/scripts/control/system/ss2sys.m *** octave-2.9.16/scripts/control/system/ss2sys.m Mon Oct 15 11:30:04 2007 --- octave-2.9.17/scripts/control/system/ss2sys.m Thu Nov 8 13:54:10 2007 *************** *** 187,193 **** function retsys = ss2sys (varargin ) ! warning("ss2sys is deprecated. Use ss() instead."); ! retsys = ss(varargin{:}); endfunction --- 187,193 ---- function retsys = ss2sys (varargin ) ! warning ("ss2sys is deprecated. Use ss instead."); ! retsys = ss (varargin{:}); endfunction diff -cNr octave-2.9.16/scripts/control/system/ss2tf.m octave-2.9.17/scripts/control/system/ss2tf.m *** octave-2.9.16/scripts/control/system/ss2tf.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/ss2tf.m Wed Nov 7 21:29:23 2007 *************** *** 59,74 **** function [num, den] = ss2tf (a, b, c, d) ## Check args ! [n,m,p] = abcddim(a,b,c,d); if (n == -1) num = []; den = []; error("ss2tf: Non compatible matrix arguments"); ! elseif ( (m != 1) | (p != 1)) num = []; den = []; ! error(["ss2tf: not SISO system: m=",num2str(m)," p=",num2str(p)]); endif if(n == 0) --- 59,78 ---- function [num, den] = ss2tf (a, b, c, d) + if (nargin != 4) + print_usage (); + endif + ## Check args ! [n, m, p] = abcddim (a, b, c, d); if (n == -1) num = []; den = []; error("ss2tf: Non compatible matrix arguments"); ! elseif (m != 1 || p != 1) num = []; den = []; ! error ("ss2tf: not SISO system: m=%d, p=%d", m, p); endif if(n == 0) *************** *** 77,97 **** den = 1; else ## First, get the denominator coefficients ! den = poly(a); ## Get the zeros of the system ! [zz,g] = tzero(a,b,c,d); ## Form the Numerator (and include the gain) ! if (!isempty(zz)) ! num = g * poly(zz); else num = g; endif ## the coefficients must be real ! den = real(den); ! num = real(num); endif - endfunction --- 81,101 ---- den = 1; else ## First, get the denominator coefficients ! den = poly (a); ## Get the zeros of the system ! [zz, g] = tzero (a, b, c, d); ## Form the Numerator (and include the gain) ! if (! isempty (zz)) ! num = g * poly (zz); else num = g; endif ## the coefficients must be real ! den = real (den); ! num = real (num); endif + endfunction diff -cNr octave-2.9.16/scripts/control/system/ss2zp.m octave-2.9.17/scripts/control/system/ss2zp.m *** octave-2.9.16/scripts/control/system/ss2zp.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/ss2zp.m Thu Nov 8 15:18:26 2007 *************** *** 32,56 **** function [zer, pol, k] = ss2zp (a, b, c, d) ! if(nargin != 4) print_usage (); endif ! [n,m,p] = abcddim(a,b,c,d); if (n == -1) ! error("ss2tf: Non compatible matrix arguments"); ! elseif ( (m != 1) | (p != 1)) ! error(["ss2tf: not SISO system: m=",num2str(m)," p=",num2str(p)]); endif ! if(n == 0) ## gain block only k = d; zer = pol = []; else ## First, get the denominator coefficients ! [zer,k] = tzero(a,b,c,d); ! pol = eig(a); endif - endfunction --- 32,56 ---- function [zer, pol, k] = ss2zp (a, b, c, d) ! if (nargin != 4) print_usage (); endif ! [n, m, p] = abcddim (a, b, c, d); if (n == -1) ! error ("ss2tf: Non compatible matrix arguments"); ! elseif (m != 1 || p != 1) ! error ("ss2tf: not SISO system: m=%d p=%d", m, p); endif ! if (n == 0) ## gain block only k = d; zer = pol = []; else ## First, get the denominator coefficients ! [zer, k] = tzero (a, b, c, d); ! pol = eig (a); endif + endfunction diff -cNr octave-2.9.16/scripts/control/system/starp.m octave-2.9.17/scripts/control/system/starp.m *** octave-2.9.16/scripts/control/system/starp.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/starp.m Thu Nov 8 15:18:26 2007 *************** *** 53,80 **** function sys = starp (P, K, ny, nu); ! if((nargin != 2) && (nargin != 4)) print_usage (); endif ! if (!isstruct(P)) ! error("---> P must be in system data structure"); endif ! if (!isstruct(K)) ! error("---> K must be in system data structure"); endif ! P = sysupdate(P, "ss"); ! [n, nz, mp, pp] = sysdimensions(P); np = n + nz; ! K = sysupdate(K, "ss"); ! [n, nz, mk, pk] = sysdimensions(K); nk = n + nz; ny_sign = 1; nu_sign = 1; if (nargin == 2) ## perform a LFT of P and K (upper or lower) ! ny = min([pp, mk]); ! nu = min([pk, mp]); else if (ny < 0) ny = -ny; --- 53,80 ---- function sys = starp (P, K, ny, nu); ! if (nargin != 2 && nargin != 4) print_usage (); endif ! if (! isstruct (P)) ! error ("---> P must be in system data structure"); endif ! if (! isstruct (K)) ! error ("---> K must be in system data structure"); endif ! P = sysupdate (P, "ss"); ! [n, nz, mp, pp] = sysdimensions (P); np = n + nz; ! K = sysupdate (K, "ss"); ! [n, nz, mk, pk] = sysdimensions (K); nk = n + nz; ny_sign = 1; nu_sign = 1; if (nargin == 2) ## perform a LFT of P and K (upper or lower) ! ny = min ([pp, mk]); ! nu = min ([pk, mp]); else if (ny < 0) ny = -ny; *************** *** 86,125 **** endif endif if (ny > pp) ! error("---> P has not enough outputs."); endif if (nu > mp) ! error("---> P has not enough inputs."); endif if (ny > mk) ! error("---> K has not enough inputs."); endif if (nu > pk) ! error("---> K has not enough outputs."); endif nwp = mp - nu; nzp = pp - ny; nwk = mk - ny; nzk = pk - nu; ! if ((nwp + nwk) < 1) ! error("---> no inputs left for star product."); endif ! if ((nzp + nzk) < 1) ! error("---> no outputs left for star product."); endif ## checks done, form sys ! if (nzp) Olst = [1:nzp]; endif ! if (nzk) Olst = [Olst, pp+nu+1:pp+pk]; endif ! if (nwp) Ilst = [1:nwp]; endif ! if (nwk) Ilst = [Ilst, mp+ny+1:mp+mk]; endif ! Clst = zeros(ny+nu,2); for ii = 1:nu Clst(ii,:) = [nwp+ii, nu_sign*(pp+ii)]; endfor for ii = 1:ny Clst(nu+ii,:) = [mp+ii, ny_sign*(nzp+ii)]; endfor ! sys = buildssic(Clst,[],Olst,Ilst,P,K); endfunction --- 86,133 ---- endif endif if (ny > pp) ! error ("---> P has not enough outputs."); endif if (nu > mp) ! error ("---> P has not enough inputs."); endif if (ny > mk) ! error ("---> K has not enough inputs."); endif if (nu > pk) ! error ("---> K has not enough outputs."); endif nwp = mp - nu; nzp = pp - ny; nwk = mk - ny; nzk = pk - nu; ! if (nwp + nwk < 1) ! error ("---> no inputs left for star product."); endif ! if (nzp + nzk < 1) ! error ("---> no outputs left for star product."); endif ## checks done, form sys ! if (nzp) ! Olst = 1:nzp; ! endif ! if (nzk) ! Olst = [Olst, pp+nu+1:pp+pk]; ! endif ! if (nwp) ! Ilst = 1:nwp; ! endif ! if (nwk) ! Ilst = [Ilst, mp+ny+1:mp+mk]; ! endif ! Clst = zeros (ny+nu, 2); for ii = 1:nu Clst(ii,:) = [nwp+ii, nu_sign*(pp+ii)]; endfor for ii = 1:ny Clst(nu+ii,:) = [mp+ii, ny_sign*(nzp+ii)]; endfor ! sys = buildssic (Clst, [], Olst, Ilst, P, K); endfunction diff -cNr octave-2.9.16/scripts/control/system/sys2fir.m octave-2.9.17/scripts/control/system/sys2fir.m *** octave-2.9.16/scripts/control/system/sys2fir.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/sys2fir.m Wed Nov 7 21:29:23 2007 *************** *** 30,35 **** --- 30,39 ---- function [c, tsam, inname, outname] = sys2fir (sys) + if (nargin != 1) + print_usage (); + endif + ## let sys2tf do most of the work [num, den, tsam, inname, outname] = sys2tf (sys); diff -cNr octave-2.9.16/scripts/control/system/sys2ss.m octave-2.9.17/scripts/control/system/sys2ss.m *** octave-2.9.16/scripts/control/system/sys2ss.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/sys2ss.m Thu Nov 8 15:18:26 2007 *************** *** 78,105 **** function [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys) ! if(nargin != 1) print_usage (); endif ! if (nargout > 11) ! warning(["sys2ss: ",num2str(nargout)," out arguments exceeds max=11"]) ! print_usage (); ! endif ! ! if( ! isstruct(sys) ) ! error("input argument must be a system data structure"); endif ! sys = sysupdate(sys,"ss"); # make sure state space data is there ! [n,nz,m,p] = sysdimensions(sys); ! [stname,inname,outname,yd] = sysgetsignals(sys); ! tsam = sysgettsam(sys); ! ! cont = sum(yd == 0) + n; ! dig = sum(yd != 0) + nz + tsam; ! if(cont*dig) ! warning("sys2ss: input system is mixed continuous/discrete"); endif a = sys.a; --- 78,100 ---- function [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys) ! if (nargin != 1) print_usage (); endif ! if (! isstruct (sys)) ! error ("input argument must be a system data structure"); endif ! sys = sysupdate (sys, "ss"); # make sure state space data is there ! [n, nz, m, p] = sysdimensions (sys); ! [stname, inname, outname, yd] = sysgetsignals (sys); ! tsam = sysgettsam (sys); ! ! cont = sum (yd == 0) + n; ! dig = sum (yd != 0) + nz + tsam; ! if (cont*dig) ! warning ("sys2ss: input system is mixed continuous/discrete"); endif a = sys.a; diff -cNr octave-2.9.16/scripts/control/system/sys2tf.m octave-2.9.17/scripts/control/system/sys2tf.m *** octave-2.9.16/scripts/control/system/sys2tf.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/sys2tf.m Thu Nov 8 15:18:26 2007 *************** *** 39,64 **** function [num, den, tsam, inname, outname] = sys2tf (Asys) ! if(nargin != 1) print_usage (); endif ! if( !isstruct(Asys)) ! error("Asys must be a system data structure (see ss, tf, zp)"); ! elseif (! is_siso(Asys) ) ! [n, nz, m, p] = sysdimensions(Asys); ! error(["system is not SISO (",num2str(m)," inputs, ... ! ", num2str(p)," outputs"]); endif ! Asys = sysupdate(Asys,"tf"); # just in case num = Asys.num; den = Asys.den; ! tsam = sysgettsam(Asys); ! inname = sysgetsignals(Asys,"in"); ! outname = sysgetsignals(Asys,"out"); endfunction --- 39,63 ---- function [num, den, tsam, inname, outname] = sys2tf (Asys) ! if (nargin != 1) print_usage (); endif ! if (! isstruct (Asys)) ! error ("Asys must be a system data structure (see ss, tf, zp)"); ! elseif (! is_siso (Asys)) ! [n, nz, m, p] = sysdimensions (Asys); ! error ("system is not SISO: %d inputs, %d outputs", m, p); endif ! Asys = sysupdate (Asys, "tf"); # just in case num = Asys.num; den = Asys.den; ! tsam = sysgettsam (Asys); ! inname = sysgetsignals (Asys, "in"); ! outname = sysgetsignals (Asys, "out"); endfunction diff -cNr octave-2.9.16/scripts/control/system/sys2zp.m octave-2.9.17/scripts/control/system/sys2zp.m *** octave-2.9.16/scripts/control/system/sys2zp.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/sys2zp.m Thu Nov 8 15:18:26 2007 *************** *** 41,65 **** function [zer, pol, k, tsam, inname, outname] = sys2zp (sys) ! if(nargin != 1) print_usage (); ! elseif( !isstruct(sys)) ! error("sysconnect: sys must be in system data structure form") ! elseif (! is_siso(sys) ) ! [n, nz, m, p] = sysdimensions(sys); ! error(["system is not SISO (",num2str(m)," inputs, ... ! ", num2str(p)," outputs"]); endif ## update zero-pole form ! sys = sysupdate(sys,"zp"); zer = sys.zer; pol = sys.pol; k = sys.k; ! tsam = sysgettsam(sys); ! inname = sysgetsignals(sys,"in"); ! outname = sysgetsignals(sys,"out"); endfunction --- 41,64 ---- function [zer, pol, k, tsam, inname, outname] = sys2zp (sys) ! if (nargin != 1) print_usage (); ! elseif (! isstruct (sys)) ! error ("sysconnect: sys must be in system data structure form") ! elseif (! is_siso (sys)) ! [n, nz, m, p] = sysdimensions (sys); ! error ("system is not SISO: %d inputs, %d outputs", m, p); endif ## update zero-pole form ! sys = sysupdate (sys, "zp"); zer = sys.zer; pol = sys.pol; k = sys.k; ! tsam = sysgettsam (sys); ! inname = sysgetsignals (sys, "in"); ! outname = sysgetsignals (sys, "out"); endfunction diff -cNr octave-2.9.16/scripts/control/system/sysadd.m octave-2.9.17/scripts/control/system/sysadd.m *** octave-2.9.16/scripts/control/system/sysadd.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/sysadd.m Thu Nov 8 13:54:10 2007 *************** *** 46,75 **** function sys = sysadd (varargin) ! if(nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk=1:nargin arglist{kk} = varargin{kk}; ! if(!isstruct(arglist{kk})) ! error("sysadd: argument %d is not a data structure",kk); endif endfor ## check system dimensions ! [n,nz,mg,pg,Gyd] = sysdimensions(arglist{1}); ! for kk=2:nargin ! [n,nz,mh,ph,Hyd] = sysdimensions(arglist{kk}); ! if(mg != mh) ! error("arg 1 has %d inputs; arg %d has vs %d inputs",mg,kk,mh); ! elseif(pg != ph) ! error("arg 1 has %d outputs; arg %d has vs %d outputs",pg,kk,ph); ! elseif(norm(Gyd - Hyd)) ! warning("cannot add a discrete output to a continuous output"); ! error("Output type mismatch: arguments 1 and %d\n",kk); endif endfor --- 46,75 ---- function sys = sysadd (varargin) ! if (nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk = 1:nargin arglist{kk} = varargin{kk}; ! if (! isstruct (arglist{kk})) ! error ("sysadd: argument %d is not a data structure", kk); endif endfor ## check system dimensions ! [n, nz, mg, pg, Gyd] = sysdimensions (arglist{1}); ! for kk = 2:nargin ! [n, nz, mh, ph, Hyd] = sysdimensions (arglist{kk}); ! if (mg != mh) ! error ("arg 1 has %d inputs; arg %d has vs %d inputs", mg, kk, mh); ! elseif (pg != ph) ! error ("arg 1 has %d outputs; arg %d has vs %d outputs", pg, kk, ph); ! elseif (norm (Gyd - Hyd)) ! warning ("cannot add a discrete output to a continuous output"); ! error ("Output type mismatch: arguments 1 and %d\n", kk); endif endfor *************** *** 79,125 **** Hsys = arglist{2}; # check if adding scalar transfer functions with identical denoms ! [Gn, Gnz, Gm, Gp] = sysdimensions(Gsys); ! [Hn, Hnz, Hm, Hp] = sysdimensions(Hsys); ! if ( Gm ==1 & Gp == 1 & Hm == 1 & Hp == 1 & Gn == Hn & Gnz == Hnz ) ! # dimensions are compatible, check if can add ! [Gnum,Gden,GT,Gin,Gout] = sys2tf(Gsys); ! [Hnum,Hden,HT,Hin,Hout] = sys2tf(Hsys); ! if (length(Hden) == length(Gden) ) ! if( (Hden == Gden) & (HT == GT) ) ! sys = tf(Gnum+Hnum,Gden,GT,Gin,Gout); ! ! return; # return prematurely since the add is done. endif endif endif ## make sure in ss form ! Gsys = sysupdate(Gsys,"ss"); ! Hsys = sysupdate(Hsys,"ss"); ! Gin = sysgetsignals(Gsys,"in"); ! Gout = sysgetsignals(Gsys,"out"); ! Hin = sysgetsignals(Hsys,"in"); ! Hout = sysgetsignals(Hsys,"out"); ## change signal names to avoid warning messages from sysgroup ! Gsys = syssetsignals(Gsys,"in",__sysdefioname__(length(Gin),"Gin_u")); ! Gsys = syssetsignals(Gsys,"out",__sysdefioname__(length(Gout),"Gout_u")); ! Hsys = syssetsignals(Hsys,"in",__sysdefioname__(length(Hin),"Hin_u")); ! Hsys = syssetsignals(Hsys,"out",__sysdefioname__(length(Hout),"Hout_u")); ! sys = sysgroup(Gsys,Hsys); ! eyin = eye(mg); ! eyout = eye(pg); ! sys = sysscale(sys,[eyout, eyout],[eyin;eyin],Gout,Gin); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk=2:length(arglist) ! sys = sysadd(sys,arglist{kk}); endfor endif --- 79,131 ---- Hsys = arglist{2}; # check if adding scalar transfer functions with identical denoms ! [Gn, Gnz, Gm, Gp] = sysdimensions (Gsys); ! [Hn, Hnz, Hm, Hp] = sysdimensions (Hsys); ! if (Gm == 1 & Gp == 1 & Hm == 1 & Hp == 1 & Gn == Hn & Gnz == Hnz) ! ## dimensions are compatible, check if can add ! [Gnum, Gden, GT, Gin, Gout] = sys2tf (Gsys); ! [Hnum, Hden, HT, Hin, Hout] = sys2tf (Hsys); ! if (length (Hden) == length (Gden) ) ! if ((Hden == Gden) & (HT == GT)) ! sys = tf (Gnum+Hnum, Gden, GT, Gin, Gout); ! return; endif endif endif ## make sure in ss form ! Gsys = sysupdate (Gsys, "ss"); ! Hsys = sysupdate (Hsys, "ss"); ! Gin = sysgetsignals (Gsys, "in"); ! Gout = sysgetsignals (Gsys, "out"); ! Hin = sysgetsignals (Hsys, "in"); ! Hout = sysgetsignals (Hsys, "out"); ## change signal names to avoid warning messages from sysgroup ! Gsys = syssetsignals (Gsys, "in", ! __sysdefioname__ (length (Gin), "Gin_u")); ! ! Gsys = syssetsignals (Gsys, "out", ! __sysdefioname__ (length (Gout), "Gout_u")); ! ! Hsys = syssetsignals (Hsys, "in", ! __sysdefioname__ (length (Hin), "Hin_u")); ! ! Hsys = syssetsignals (Hsys, "out", ! __sysdefioname__ (length (Hout), "Hout_u")); ! sys = sysgroup (Gsys, Hsys); ! eyin = eye (mg); ! eyout = eye (pg); ! sys = sysscale (sys, [eyout, eyout], [eyin; eyin], Gout, Gin); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk = 2:length(arglist) ! sys = sysadd (sys, arglist{kk}); endfor endif diff -cNr octave-2.9.16/scripts/control/system/sysappend.m octave-2.9.17/scripts/control/system/sysappend.m *** octave-2.9.16/scripts/control/system/sysappend.m Fri Oct 12 17:27:18 2007 --- octave-2.9.17/scripts/control/system/sysappend.m Thu Nov 8 15:26:32 2007 *************** *** 83,193 **** function retsys = sysappend (sys, b, c, d, outname, inname, yd) ## check input arguments ! if ( (nargin < 2) | (nargin > 7) | (!isstruct(sys))) print_usage (); ! elseif(!isstruct(sys)) ! error("sys must be a system data structure"); endif ## default system type must be state space form ! [Aa,Ab,Ac,Ad,Ats,Ann,Anz,Ast,Ain,Aout,Ayd] = sys2ss(sys); ! [Ann,Anz,Am,Ap] = sysdimensions(sys); ## default c ! if(nargin < 3) c = []; endif ## default d ! if(nargin < 4) make_d = 1; ! elseif(isempty(d)) make_d = 1; ! else make_d = 0; endif ! if(make_d) d = zeros(rows(c)+Ap,columns(b) + Am); endif ## Append new input(s) if any ! Bm = max(columns(d),columns(b)+Am); ! if(Bm != Am) ## construct new signal names ! if(nargin >= 6) # new names were passed ! if(!ischar(inname)) ! error("inname must be a string"); ! elseif(rows(inname) != (Bm - Am)) ! error(sprintf("%d new inputs requested; inname(%dx%d)", ... ! (Bm-Am),rows(inname),columns(inname))); endif else ! inname = __sysdefioname__(Bm,"u",(Am+1)); endif ! if(Am) ! Ain = __sysconcat__(Ain,inname); else Ain = inname; endif ## default b matrix ! if(isempty(b)) b = zeros(Ann+Anz,(Bm-Am)); ! elseif(rows(b) != Ann+Anz | columns(b) != (Bm-Am)) ! error(sprintf("b(%dx%d); should be (%dx%d)", rows(b), columns(b), ... ! (Ann+Anz), (Bm-Am))); endif ## append new b matrix ! Ab = [Ab,b]; endif ## Append new output(s) if any ! Bp = max(rows(d),rows(c)+Ap); ! if(Bp != Ap) ## construct new signal names, output classification ! if(nargin >= 5) # new names were passed ! if(!ischar(outname)) ! error("outname must be a string"); ! elseif(rows(outname) != (Bp - Ap)) ! error(sprintf("%d new outputs requested; outname(%dx%d)", ... ! (Bp-Ap),rows(outname),columns(outname))); ! endif else ! outname = __sysdefioname__(Bp,"y",(Ap+1)); endif - if(Ap) Aout = __sysconcat__(Aout,outname); - else Aout = outname; endif ## construct new yd entries ! if(nargin == 7) ! if(!isvector(yd)) ! error(sprintf("yd(%dx%d) must be a vector",rows(yd),columns(yd))) ! elseif(rows(c) != length(yd) & rows(d) != length(yd)) ! error(sprintf("length(yd) = %d; c(%dx%d), d(%dx%d); mismatch", ... ! length(yd), rows(c), columns(c),rows(d),columns(d))); ! endif else ! ## default yd values ! yd = ones(1,Bp)*( (Ats > 0) & (Ann == 0) & isempty(find(Ayd == 0)) ) ; endif ! Ayd = [vec(Ayd);vec(yd)]; ## default c matrix ! if(isempty(c)) c = zeros((Bp-Ap),Ann+Anz); ! elseif(columns(c) != Ann+Anz | rows(c) != (Bp-Ap)) ! error(sprintf("c(%dx%d); should be (%dx%d)", rows(c), columns(c), ... ! (Bp-Ap), (Ann+Anz) )); endif ## append new c matrix ! Ac = [Ac;c]; endif ## check d matrix ! if(isempty(d)) d = zeros(Bp,Bm); ! elseif(rows(d) != Bp | columns(d) != Bm) ! error(sprintf("d(%dx%d) should be (%dx%d)",rows(d), columns(d), Bp, Bp)); endif ## Splice in original D matrix ! if(Am & Ap) d(1:Ap, 1:Am) = Ad; endif Ad = d; ## construct return system ! retsys = ss(Aa,Ab,Ac,Ad,Ats,Ann,Anz,Ast,Ain,Aout,find(Ayd == 1)); endfunction --- 83,210 ---- function retsys = sysappend (sys, b, c, d, outname, inname, yd) ## check input arguments ! if (nargin < 2 || nargin > 7) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be a system data structure"); endif ## default system type must be state space form ! [Aa, Ab, Ac, Ad, Ats, Ann, Anz, Ast, Ain, Aout, Ayd] = sys2ss(sys); ! [Ann, Anz, Am, Ap] = sysdimensions(sys); ## default c ! if (nargin < 3) ! c = []; ! endif ## default d ! if (nargin < 4) ! make_d = 1; ! elseif (isempty(d)) ! make_d = 1; ! else ! make_d = 0; ! endif ! ! if (make_d) ! d = zeros (rows(c)+Ap, columns(b)+Am); ! endif ## Append new input(s) if any ! Bm = max (columns(d), columns(b)+Am); ! if (Bm != Am) ## construct new signal names ! if (nargin >= 6) # new names were passed ! if (! ischar (inname)) ! error ("inname must be a string"); ! elseif (rows (inname) != Bm - Am) ! error ("%d new inputs requested; inname(%dx%d)", ! Bm-Am, rows (inname), columns (inname)); endif else ! inname = __sysdefioname__ (Bm, "u", Am+1); endif ! if (Am) ! Ain = __sysconcat__(Ain, inname); else Ain = inname; endif ## default b matrix ! if (isempty (b)) ! b = zeros (Ann+Anz, (Bm-Am)); ! elseif (rows (b) != Ann+Anz || columns (b) != Bm-Am) ! error ("b(%dx%d); should be (%dx%d)", rows(b), columns(b), ! Ann+Anz, Bm-Am); endif ## append new b matrix ! Ab = [Ab, b]; endif ## Append new output(s) if any ! Bp = max (rows(d), rows(c)+Ap); ! if (Bp != Ap) ## construct new signal names, output classification ! if (nargin >= 5) # new names were passed ! if (! ischar (outname)) ! error ("outname must be a string"); ! elseif (rows (outname) != Bp-Ap) ! error ("%d new outputs requested; outname(%dx%d)", ! Bp-Ap, rows (outname), columns (outname)); ! endif else ! outname = __sysdefioname__ (Bp, "y", (Ap+1)); ! endif ! if (Ap) ! Aout = __sysconcat__ (Aout, outname); ! else ! Aout = outname; endif ## construct new yd entries ! if (nargin == 7) ! if (! isvector (yd)) ! error ("yd(%dx%d) must be a vector", rows (yd), columns (yd)); ! elseif (rows (c) != length (yd) && rows (d) != length (yd)) ! error ("length(yd) = %d; c(%dx%d), d(%dx%d); mismatch", ! length (yd), rows (c), columns (c), rows (d), columns (d)); ! endif else ! ## default yd values ! yd = ones (1, Bp) * ((Ats > 0) & (Ann == 0) & isempty (find (Ayd == 0))); endif ! Ayd = [vec(Ayd); vec(yd)]; ## default c matrix ! if (isempty (c)) ! c = zeros (Bp-Ap, Ann+Anz); ! elseif (columns (c) != Ann+Anz || rows (c) != Bp-Ap) ! error ("c(%dx%d); should be (%dx%d)", rows (c), columns (c), ! Bp-Ap, Ann+Anz); endif ## append new c matrix ! Ac = [Ac; c]; endif ## check d matrix ! if (isempty (d)) ! d = zeros (Bp, Bm); ! elseif (rows (d) != Bp || columns (d) != Bm) ! error ("d(%dx%d) should be (%dx%d)", rows (d), columns (d), Bp, Bp); endif ## Splice in original D matrix ! if (Am & Ap) ! d(1:Ap, 1:Am) = Ad; ! endif Ad = d; ## construct return system ! retsys = ss (Aa, Ab, Ac, Ad, Ats, Ann, Anz, Ast, Ain, Aout, find (Ayd == 1)); endfunction diff -cNr octave-2.9.16/scripts/control/system/sysconnect.m octave-2.9.17/scripts/control/system/sysconnect.m *** octave-2.9.16/scripts/control/system/sysconnect.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysconnect.m Thu Nov 8 15:26:32 2007 *************** *** 75,158 **** function sys = sysconnect (sys, output_list, input_list, order, tol) ! if( (nargin < 3) | (nargin > 5) ) print_usage (); endif ## check order ! if(nargin <= 3) order = 0; ! elseif( (order != 0) & (order != 1) ) ! error("sysconnect: order must be either 0 or 1") endif ! if (nargin <= 4) tol = 200*eps; ! elseif( !is_sample(tol) ) ! error("sysconnect: tol must be a positive scalar"); ! elseif(tol > 1e2*sqrt(eps)) ! warning(["sysconnect: tol set to large value=",num2str(tol), ... ! ", eps=",num2str(eps)]) endif ## convert signal names to indices ! if(is_signal_list(input_list) | ischar(input_list)) ! input_list = sysidx(sys,"in",input_list); endif ! if(is_signal_list(output_list) | ischar(output_list)) ! output_list = sysidx(sys,"out",output_list); endif ## verify sizes,format of input, output lists ! if( min(size(output_list))*min(size(input_list)) != 1) ! error("output_list and input_list must be vectors"); else ! lo = length(output_list); ! li = length(input_list); ! if(lo != li) ! error("output_list and input_list must be of the same length") endif ! if(is_duplicate_entry(output_list) | is_duplicate_entry(input_list) ) ! error("duplicate entry in input_list and/or output_list"); endif endif ! [nc,nz,mm,pp] = sysdimensions(sys); nn = nc+nz; ! if( !isstruct(sys)) ! error("sys must be in structured system form") ! elseif(pp < li) ! error(["length(output_list)=",num2str(li),", sys has only ", ... ! num2str(pp),"system outputs"]) ! elseif(mm < li) ! error(["length(input_list)=",num2str(li),", sys has only ", ... ! num2str(mm),"system inputs"]) endif ## check that there are enough inputs/outputs in the system for the lists ! if(max(input_list) > mm) ! error("max(input_list) exceeds the number of inputs"); ! elseif(max(output_list) > pp) ! error("max(output_list) exceeds the number of outputs"); endif ! output_list = reshape(output_list,1,length(output_list)); ## make sure we're in state space form sys = sysupdate (sys, "ss"); ## permute rows and columns of B,C,D matrices into pseudo-dgkf form... ! all_inputs = sysreorder(mm,input_list); ! all_outputs = sysreorder(pp,output_list); ! [aa,bb,cc,dd] = sys2ss(sys); bb = bb(:,all_inputs); cc = cc(all_outputs,:); dd = dd(all_outputs,all_inputs); ! yd = sysgetsignals(sys,"yd"); yd = yd(all_outputs); ## m1, p1 = number of inputs, outputs that are not being connected --- 75,155 ---- function sys = sysconnect (sys, output_list, input_list, order, tol) ! if (nargin < 3 || nargin > 5) print_usage (); endif ## check order ! if (nargin < 4) order = 0; ! elseif (order != 0 && order != 1) ! error ("sysconnect: order must be either 0 or 1") endif ! if (nargin < 5) tol = 200*eps; ! elseif (! is_sample (tol)) ! error ("sysconnect: tol must be a positive scalar"); ! elseif (tol > 1e2*sqrt(eps)) ! warning ("sysconnect: tol set to large value=%g, eps=%g", tol, eps); endif ## convert signal names to indices ! if (is_signal_list (input_list) || ischar (input_list)) ! input_list = sysidx (sys, "in", input_list); endif ! if (is_signal_list (output_list) || ischar (output_list)) ! output_list = sysidx (sys, "out", output_list); endif ## verify sizes,format of input, output lists ! if (min (size (output_list)) * min (size (input_list)) != 1) ! error ("output_list and input_list must be vectors"); else ! lo = length (output_list); ! li = length (input_list); ! if (lo != li) ! error ("output_list and input_list must be of the same length") endif ! if (is_duplicate_entry (output_list) || is_duplicate_entry (input_list)) ! error ("duplicate entry in input_list and/or output_list"); endif endif ! [nc, nz, mm, pp] = sysdimensions (sys); nn = nc+nz; ! if (! isstruct (sys)) ! error ("sys must be in structured system form") ! elseif (pp < lo) ! error ("length(output_list)=%d, sys has only %d system outputs", lo, pp); ! elseif (mm < li) ! error ("length(input_list)=%d, sys has only %d system inputs", li, mm); endif ## check that there are enough inputs/outputs in the system for the lists ! if (max (input_list) > mm) ! error ("max(input_list) exceeds the number of inputs"); ! elseif (max (output_list) > pp) ! error ("max(output_list) exceeds the number of outputs"); endif ! output_list = reshape (output_list, 1, length (output_list)); ## make sure we're in state space form sys = sysupdate (sys, "ss"); ## permute rows and columns of B,C,D matrices into pseudo-dgkf form... ! all_inputs = sysreorder (mm, input_list); ! all_outputs = sysreorder (pp, output_list); ! [aa, bb, cc, dd] = sys2ss (sys); bb = bb(:,all_inputs); cc = cc(all_outputs,:); dd = dd(all_outputs,all_inputs); ! yd = sysgetsignals (sys, "yd"); yd = yd(all_outputs); ## m1, p1 = number of inputs, outputs that are not being connected *************** *** 165,196 **** ## partition system into a DGKF-like form; the loop is closed around ## B2, C2 ! if(m1 > 0) B1 = bb(:,1:m1); D21= dd(p2:pp,1:m1); endif B2 = bb(:,m2:mm); ! if(p1 > 0) C1 = cc(1:p1,:); D12= dd(1:p1,m2:mm); endif C2 = cc(p2:pp,:); ! if(m1*p1 > 0) ! D11= dd(1:p1,1:m1); endif ! D22= dd(p2:pp,m2:mm); ! if(norm(D22)) ! warning("sysconnect: possible algebraic loop, D22 non-zero"); ! D22i = (eye(size(D22))-D22); C2h = D22i\C2; ! if(m1 > 0) D21h = D22i\D21; endif D22h = D22i\D22; else C2h = C2; ! if(m1 > 0) D21h = D21; endif D22h = D22; --- 162,193 ---- ## partition system into a DGKF-like form; the loop is closed around ## B2, C2 ! if (m1 > 0) B1 = bb(:,1:m1); D21= dd(p2:pp,1:m1); endif B2 = bb(:,m2:mm); ! if (p1 > 0) C1 = cc(1:p1,:); D12= dd(1:p1,m2:mm); endif C2 = cc(p2:pp,:); ! if (m1*p1 > 0) ! D11 = dd(1:p1,1:m1); endif ! D22 = dd(p2:pp,m2:mm); ! if (norm (D22)) ! warning ("sysconnect: possible algebraic loop, D22 non-zero"); ! D22i = eye (size (D22)) - D22; C2h = D22i\C2; ! if (m1 > 0) D21h = D22i\D21; endif D22h = D22i\D22; else C2h = C2; ! if (m1 > 0) D21h = D21; endif D22h = D22; *************** *** 198,266 **** endif ## check cont state -> disc output -> cont state ! dyi = find(yd(p2:pp)); ## disp("sysconnect: dyi=") ## dyi ## nc ## disp("/sysconnect"); ! if( (nc > 0) & find(dyi > 0) ) B2con = B2(1:nc,dyi); # connection to cont states C2hd = C2h(dyi,1:nc); # cont states -> outputs else B2con = C2hd = []; endif ! if(max(size(B2con)) & max(size(C2hd)) ) ! if(norm(B2con*C2hd)) ! warning("sysconnect: cont-state -> disc output -> cont state derivative"); ! warning(" connection made; resulting system may not be meaningful"); endif endif Ac = aa+B2*C2h; ! if(m1 > 0) B1c = B1 + B2*D21h; endif B2c = B2*(eye(size(D22h)) + D22h); ! if(p1*m1 > 0) D11c = D11 + D12*D21h; endif ! if(p1 > 0) C1c = C1+D12*C2h; D12c = D12*(eye(size(D22h))+D22h); endif ## construct system data structure ! if(m1 > 0) Bc = [B1c, B2c]; else Bc = B2c; endif ! if(p1 > 0) Cc = [C1c;C2h]; else Cc = C2h; endif ! if(m1*p1 > 0) Dc = [D11c,D12c; D21h,D22h]; ! elseif(m1 > 0) Dc = [D21h, D22h]; ! elseif(p1 > 0) Dc = [D12c; D22h]; else Dc = D22h; endif ## permute rows and columns of Bc, Cc, Dc back into original order ! Im = eye(mm,mm); Pi = Im(:,all_inputs); back_inputs = Pi*[1:mm]'; ! Ip = eye(pp,pp); Po = Ip(:,all_outputs); back_outputs = Po*[1:pp]'; --- 195,263 ---- endif ## check cont state -> disc output -> cont state ! dyi = find (yd(p2:pp)); ## disp("sysconnect: dyi=") ## dyi ## nc ## disp("/sysconnect"); ! if ((nc > 0) & find (dyi > 0)) B2con = B2(1:nc,dyi); # connection to cont states C2hd = C2h(dyi,1:nc); # cont states -> outputs else B2con = C2hd = []; endif ! if (max (size (B2con)) & max (size (C2hd))) ! if (norm (B2con*C2hd)) ! warning ("sysconnect: cont-state -> disc output -> cont state derivative"); ! warning ("connection made; resulting system may not be meaningful"); endif endif Ac = aa+B2*C2h; ! if (m1 > 0) B1c = B1 + B2*D21h; endif B2c = B2*(eye(size(D22h)) + D22h); ! if (p1*m1 > 0) D11c = D11 + D12*D21h; endif ! if (p1 > 0) C1c = C1+D12*C2h; D12c = D12*(eye(size(D22h))+D22h); endif ## construct system data structure ! if (m1 > 0) Bc = [B1c, B2c]; else Bc = B2c; endif ! if (p1 > 0) Cc = [C1c;C2h]; else Cc = C2h; endif ! if (m1*p1 > 0) Dc = [D11c,D12c; D21h,D22h]; ! elseif (m1 > 0) Dc = [D21h, D22h]; ! elseif (p1 > 0) Dc = [D12c; D22h]; else Dc = D22h; endif ## permute rows and columns of Bc, Cc, Dc back into original order ! Im = eye (mm, mm); Pi = Im(:,all_inputs); back_inputs = Pi*[1:mm]'; ! Ip = eye (pp, pp); Po = Ip(:,all_outputs); back_outputs = Po*[1:pp]'; *************** *** 270,285 **** yd = yd(back_outputs); ## rebuild system ! Ts = sysgettsam(sys); ! [stnam,innam,outnam] = sysgetsignals(sys); ! sys = ss(Ac,Bc,Cc,Dc,Ts,nc,nz,stnam,innam,outnam,find(yd)); ## update connected input names for ii = 1:length(input_list) idx = input_list(ii); ! tmpval = sysgetsignals(sys,"in",idx); ! strval = sprintf("%s*",tmpval{1} ); ! sys = syssetsignals(sys,"in",strval,idx); endfor ## maintain original system type if it was SISO --- 267,282 ---- yd = yd(back_outputs); ## rebuild system ! Ts = sysgettsam (sys); ! [stnam, innam, outnam] = sysgetsignals (sys); ! sys = ss (Ac, Bc, Cc, Dc, Ts, nc, nz, stnam, innam, outnam, find (yd)); ## update connected input names for ii = 1:length(input_list) idx = input_list(ii); ! tmpval = sysgetsignals (sys, "in", idx); ! strval = sprintf ("%s*", tmpval{1} ); ! sys = syssetsignals (sys, "in", strval, idx); endfor ## maintain original system type if it was SISO diff -cNr octave-2.9.16/scripts/control/system/syscont.m octave-2.9.17/scripts/control/system/syscont.m *** octave-2.9.16/scripts/control/system/syscont.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/syscont.m Thu Nov 8 15:18:26 2007 *************** *** 47,54 **** if (nargin != 1) print_usage (); ! elseif (!isstruct(sys)) ! error("sys must be in system data structure form"); endif sys = sysupdate (sys, "ss"); --- 47,54 ---- if (nargin != 1) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be in system data structure form"); endif sys = sysupdate (sys, "ss"); *************** *** 57,87 **** ## assume there's nothing there; build partitions as appropriate Acc = Acd = Bcc = Ccc = Ccd = Dcc = []; ! if(isempty(st_c) & isempty(y_c)) ! error("syscont: expecting continuous states and/or continuous outputs"); ! elseif (isempty(st_c)) ! warning("syscont: no continuous states"); ! elseif(isempty(y_c)) ! warning("syscont: no continuous outputs"); endif ! [sys_a, sys_b, sys_c, sys_d ] = sys2ss(sys); ! [sys_stname, sys_inname, sys_outname] = sysgetsignals(sys); ! [sys_n, sys_nz, sys_m, sys_p] = sysdimensions(sys); ! if(!isempty(st_c)) Acc = sys_a(st_c,st_c); stname = sys_stname(st_c); Bcc = sys_b(st_c,:); Ccc = sys_c(y_c,st_c); Acd = sys_a(st_c,st_d); else ! stname=[]; endif outname = sys_outname(y_c); Dcc = sys_d(y_c,:); Ccd = sys_c(y_c,st_d); inname = sys_inname; ! csys = ss(Acc,Bcc,Ccc,Dcc,0,sys_n,0,stname,inname,outname); endfunction --- 57,87 ---- ## assume there's nothing there; build partitions as appropriate Acc = Acd = Bcc = Ccc = Ccd = Dcc = []; ! if (isempty (st_c) && isempty (y_c)) ! error ("syscont: expecting continuous states and/or continuous outputs"); ! elseif (isempty (st_c)) ! warning ("syscont: no continuous states"); ! elseif (isempty (y_c)) ! warning ("syscont: no continuous outputs"); endif ! [sys_a, sys_b, sys_c, sys_d ] = sys2ss (sys); ! [sys_stname, sys_inname, sys_outname] = sysgetsignals (sys); ! [sys_n, sys_nz, sys_m, sys_p] = sysdimensions (sys); ! if (! isempty (st_c)) Acc = sys_a(st_c,st_c); stname = sys_stname(st_c); Bcc = sys_b(st_c,:); Ccc = sys_c(y_c,st_c); Acd = sys_a(st_c,st_d); else ! stname = []; endif outname = sys_outname(y_c); Dcc = sys_d(y_c,:); Ccd = sys_c(y_c,st_d); inname = sys_inname; ! csys = ss (Acc, Bcc, Ccc, Dcc, 0, sys_n, 0, stname, inname, outname); endfunction diff -cNr octave-2.9.16/scripts/control/system/sysdimensions.m octave-2.9.17/scripts/control/system/sysdimensions.m *** octave-2.9.16/scripts/control/system/sysdimensions.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysdimensions.m Thu Nov 8 15:18:26 2007 *************** *** 68,96 **** function [n, nz, m, p, yd] = sysdimensions (sys, opt) ! if(nargout > 5 | nargin < 1 | nargin > 2) print_usage (); ! elseif(!isstruct(sys)) ! print_usage (); ! elseif(nargin == 1) opt = "all"; endif n = sys.n; nz = sys.nz; ! m = length(sysgetsignals(sys,"in")); ! p = length(sysgetsignals(sys,"out")); yd = sys.yd; ! valid_options = {"all","cst","dst","st","in","out"}; valid_values = {n,n,nz,n+nz,m,p}; valid_opt = 0; ! for ii=1:length(valid_options) ! if(strcmp(valid_options{ii},opt)) n = valid_values{ii}; valid_opt = 1; ! if(ii > 1 & nargout > 1) ! warning("opt=%s, %d output arguments requested",opt,nargout); endif endif endfor --- 68,96 ---- function [n, nz, m, p, yd] = sysdimensions (sys, opt) ! if (nargin < 1 || nargin > 2) print_usage (); ! elseif (! isstruct (sys)) ! error ("sysdimensions: expecting system structure as first argument"); ! elseif (nargin == 1) opt = "all"; endif n = sys.n; nz = sys.nz; ! m = length (sysgetsignals (sys, "in")); ! p = length (sysgetsignals (sys, "out")); yd = sys.yd; ! valid_options = {"all", "cst", "dst", "st", "in", "out"}; valid_values = {n,n,nz,n+nz,m,p}; valid_opt = 0; ! for ii = 1:length(valid_options) ! if (strcmp(valid_options{ii}, opt)) n = valid_values{ii}; valid_opt = 1; ! if (ii > 1 && nargout > 1) ! warning ("opt=%s, %d output arguments requested", opt, nargout); endif endif endfor diff -cNr octave-2.9.16/scripts/control/system/sysdisc.m octave-2.9.17/scripts/control/system/sysdisc.m *** octave-2.9.16/scripts/control/system/sysdisc.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysdisc.m Thu Nov 8 15:18:26 2007 *************** *** 42,49 **** if (nargin != 1) print_usage (); ! elseif (!isstruct(sys)) ! error("sys must be in system data structure form"); endif sys = sysupdate (sys, "ss"); --- 42,49 ---- if (nargin != 1) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be in system data structure form"); endif sys = sysupdate (sys, "ss"); *************** *** 52,97 **** ## assume there's nothing there; build partitions as appropriate Add = Adc = Bdd = Cdd = Cdc = Ddd = []; ! if(isempty(st_d) & isempty(y_d)) ! error("sysdisc: expecting discrete states and/or continuous outputs"); ! elseif (isempty(st_d)) ! warning("sysdisc: no discrete states"); ! elseif(isempty(y_d)) ! warning("sysdisc: no discrete outputs"); endif ! [aa,bb,cc,dd] = sys2ss(sys); ! if(!isempty(st_d) ) ! Add = aa( st_d , st_d); ! stname = sysgetsignals(sys,"st",st_d); ! Bdd = bb( st_d , :); ! if(!isempty(st_c)) ! Adc = aa( st_d , st_c); endif ! if(!isempty(y_d)) ! Cdd = cc(y_d , st_d); endif else stname = []; endif ! if(!isempty(y_d)) Ddd = dd(y_d , :); ! outname = sysgetsignals(sys,"out",y_d); ! if(!isempty(st_c)) ! Cdc = cc(y_d , st_c); endif else ! outname=[]; endif ! inname = sysgetsignals(sys,"in"); outlist = 1:rows(outname); ! if(!isempty(outname)) ! tsam = sysgettsam(sys); ! [nc,nz] = sysdimensions(sys); ! dsys = ss(Add,Bdd,Cdd,Ddd,tsam,0,nz,stname,inname,outname,outlist); else ! dsys=[]; endif endfunction --- 52,98 ---- ## assume there's nothing there; build partitions as appropriate Add = Adc = Bdd = Cdd = Cdc = Ddd = []; ! if (isempty (st_d) && isempty (y_d)) ! error ("sysdisc: expecting discrete states and/or continuous outputs"); ! elseif (isempty (st_d)) ! warning ("sysdisc: no discrete states"); ! elseif (isempty (y_d)) ! warning ("sysdisc: no discrete outputs"); endif ! [aa, bb, cc, dd] = sys2ss (sys); ! if (! isempty(st_d)) ! Add = aa(st_d,st_d); ! stname = sysgetsignals (sys, "st", st_d); ! Bdd = bb(st_d,:); ! if (! isempty (st_c)) ! Adc = aa(st_d,st_c); endif ! if (! isempty (y_d)) ! Cdd = cc(y_d,st_d); endif else stname = []; endif ! if (! isempty (y_d)) Ddd = dd(y_d , :); ! outname = sysgetsignals (sys, "out", y_d); ! if (! isempty (st_c)) ! Cdc = cc(y_d,st_c); endif else ! outname = []; endif ! inname = sysgetsignals (sys, "in"); outlist = 1:rows(outname); ! if (! isempty (outname)) ! tsam = sysgettsam (sys); ! [nc, nz] = sysdimensions (sys); ! dsys = ss (Add, Bdd, Cdd, Ddd, tsam, 0, nz, stname, inname, ! outname, outlist); else ! dsys = []; endif endfunction diff -cNr octave-2.9.16/scripts/control/system/sysdup.m octave-2.9.17/scripts/control/system/sysdup.m *** octave-2.9.16/scripts/control/system/sysdup.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysdup.m Thu Nov 8 13:54:10 2007 *************** *** 61,132 **** function retsys = sysdup (Asys, output_list, input_list) ! if( nargin != 3) print_usage (); endif ! if( !isstruct(Asys)) ! error("Asys must be a system data structure (see ss, tf, or zp)") endif ! Asys = sysupdate(Asys,"ss"); ! [nn,nz,mm,pp] = sysdimensions(Asys); ! [aa,bb,cc,dd] = sys2ss(Asys); ## check for signal names ! if(is_signal_list(input_list) | ischar(input_list)) ! input_list = sysidx(Asys,"in",input_list); endif ! if(is_signal_list(output_list) | ischar(output_list)) ! output_list = sysidx(Asys,"out",output_list); endif ## first duplicate inputs ! if(isvector(input_list)) ! for ii=1:length(input_list); bb(:,mm+ii) = bb(:,input_list(ii)); dd(:,mm+ii) = dd(:,input_list(ii)); ! end ! elseif(!isempty(input_list)) ! error("input_list must be a vector or empty"); endif ## now duplicate outputs ! osize = min(size(output_list)); ! if(osize == 1) ! for ii=1:length(output_list); cc(pp+ii,:) = cc(output_list(ii),:); dd(pp+ii,:) = dd(output_list(ii),:); ! end ! elseif(osize != 0) ! error("output_list must be a vector or empty"); endif ! [stnam,innam,outnam,yd] = sysgetsignals(Asys); ! tsam = sysgettsam(Asys); ## pack system and then rename signals ! retsys = ss(aa,bb,cc,dd,tsam,nn,nz); ! retsys = syssetsignals(retsys,"in",innam,1:mm); ! retsys = syssetsignals(retsys,"out",outnam,1:pp); ! retsys = syssetsignals(retsys,"yd",yd,1:pp); ## update added input names ! for ii=(mm+1):(mm+length(input_list)) onum = input_list(ii-mm); ! strval = sprintf("%s(dup)",sysgetsignals(retsys,"in",onum,1) ); ! retsys = syssetsignals(retsys,"in",strval,ii); endfor ## update added output names/discrete flags ## give default names to the added outputs ! for jj=(pp+1):(pp+length(output_list)) onum = output_list(jj-pp); ! strval = sprintf("%s(dup)",sysgetsignals(retsys,"out",onum,1) ); ! retsys = syssetsignals(retsys,"out",strval,jj); ! dflg = sysgetsignals(retsys,"yd",onum); ! retsys = syssetsignals(retsys,"yd",dflg,jj); endfor endfunction --- 61,132 ---- function retsys = sysdup (Asys, output_list, input_list) ! if (nargin != 3) print_usage (); endif ! if (! isstruct (Asys)) ! error ("Asys must be a system data structure (see ss, tf, or zp)") endif ! Asys = sysupdate (Asys, "ss"); ! [nn, nz, mm, pp] = sysdimensions (Asys); ! [aa, bb, cc, dd] = sys2ss (Asys); ## check for signal names ! if (is_signal_list (input_list) || ischar (input_list)) ! input_list = sysidx (Asys, "in", input_list); endif ! if (is_signal_list (output_list) || ischar (output_list)) ! output_list = sysidx (Asys, "out", output_list); endif ## first duplicate inputs ! if (isvector (input_list)) ! for ii = 1:length(input_list); bb(:,mm+ii) = bb(:,input_list(ii)); dd(:,mm+ii) = dd(:,input_list(ii)); ! endfor ! elseif (! isempty (input_list)) ! error ("input_list must be a vector or empty"); endif ## now duplicate outputs ! osize = min (size (output_list)); ! if (osize == 1) ! for ii = 1:length(output_list); cc(pp+ii,:) = cc(output_list(ii),:); dd(pp+ii,:) = dd(output_list(ii),:); ! endfor ! elseif (osize != 0) ! error ("output_list must be a vector or empty"); endif ! [stnam, innam, outnam, yd] = sysgetsignals (Asys); ! tsam = sysgettsam (Asys); ## pack system and then rename signals ! retsys = ss (aa, bb, cc, dd, tsam, nn, nz); ! retsys = syssetsignals (retsys, "in", innam, 1:mm); ! retsys = syssetsignals (retsys, "out", outnam, 1:pp); ! retsys = syssetsignals (retsys, "yd", yd, 1:pp); ## update added input names ! for ii = (mm+1):(mm+length(input_list)) onum = input_list(ii-mm); ! strval = sprintf ("%s(dup)", sysgetsignals (retsys, "in", onum, 1)); ! retsys = syssetsignals (retsys, "in", strval, ii); endfor ## update added output names/discrete flags ## give default names to the added outputs ! for jj = (pp+1):(pp+length(output_list)) onum = output_list(jj-pp); ! strval = sprintf ("%s(dup)", sysgetsignals (retsys, "out", onum, 1)); ! retsys = syssetsignals (retsys, "out", strval, jj); ! dflg = sysgetsignals (retsys, "yd", onum); ! retsys = syssetsignals (retsys, "yd", dflg, jj); endfor endfunction diff -cNr octave-2.9.16/scripts/control/system/sysgetsignals.m octave-2.9.17/scripts/control/system/sysgetsignals.m *** octave-2.9.16/scripts/control/system/sysgetsignals.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysgetsignals.m Thu Nov 8 13:54:10 2007 *************** *** 146,199 **** ## Adapted from ss ! if(nargin < 1 | nargin > 4 | nargout > 4) print_usage (); ! elseif(nargin > 1 & nargout > 1) ! print_usage (); ! elseif( ! isstruct(sys) ) ! error("input argument must be a system data structure"); endif ! if(nargin < 4) strflg = 0; endif ! if(nargin == 1) ! sys = sysupdate(sys,"ss"); #make sure ss is up to date ! stname = sysgetsignals(sys,"st"); ! inname = sysgetsignals(sys,"in"); ! outname = sysgetsignals(sys,"out"); ! yd = sysgetsignals(sys,"yd"); ! elseif(!(ischar(sigid) & min(size(sigid)) == 1)) ! error(sprintf("sigid(%dx%d) must be a string)",rows(sigid),columns(sigid))); else ! if(strcmp("st",sigid)) stname = sys.stname; ! elseif(strcmp("in",sigid)) stname = sys.inname; ! elseif(strcmp("out",sigid)) stname = sys.outname; ! elseif(strcmp("yd",sigid)) stname = vec(sys.yd)'; else ! error(sprintf("sigid=%s must be \"st\", \"in\", \"out\", or \"yd\"", ... ! sigid)); endif ! if(nargin >= 3) ! if( is_signal_list(signum) | ischar(signum) ) ! signum = cellidx(stname,signum); ! end ! if(max(signum) > length(stname)) ! error(sprintf("sysgetsignals(sys,\"%s\",%d):only %d entries.\n", ... ! sigid,signum, rows(stname))); else ! if(!isscalar(strflg)) ! error("strflg must be a scalar"); endif ! switch(strflg) ! case(0), ! stname = stname(signum); ! case(1), ! if(length(signum) > 1) ! error("strflg=1, length(signum) = %d",length(signum)); endif stname = stname{signum}; ! otherwise, error ("invalid value of strflg = %e", strflg); endswitch - endif endif endif --- 146,202 ---- ## Adapted from ss ! if (nargin < 1 || nargin > 4) print_usage (); ! elseif (! isstruct (sys)) ! error ("input argument must be a system data structure"); ! endif ! if (nargin < 4) ! strflg = 0; endif ! ! if (nargin == 1) ! sys = sysupdate (sys, "ss"); #make sure ss is up to date ! stname = sysgetsignals (sys, "st"); ! inname = sysgetsignals (sys, "in"); ! outname = sysgetsignals (sys, "out"); ! yd = sysgetsignals (sys, "yd"); ! elseif (! (ischar (sigid) && min (size (sigid)) == 1)) ! error ("sigid(%dx%d) must be a string)", rows (sigid), columns (sigid)); else ! if (strcmp ("st", sigid)) ! stname = sys.stname; ! elseif (strcmp ("in", sigid)) ! stname = sys.inname; ! elseif (strcmp ("out", sigid)) ! stname = sys.outname; ! elseif (strcmp ("yd", sigid)) ! stname = vec(sys.yd)'; else ! error ("sigid=%s must be \"st\", \"in\", \"out\", or \"yd\"", sigid); endif ! if (nargin >= 3) ! if (is_signal_list (signum) || ischar (signum)) ! signum = cellidx (stname, signum); ! endif ! if (max (signum) > length (stname)) ! error ("sysgetsignals(sys,\"%s\",%d):only %d entries", ! sigid, signum, rows (stname)); else ! if (! isscalar (strflg)) ! error ("strflg must be a scalar"); endif ! switch (strflg) ! case 0 ! stname = stname (signum); ! case 1 ! if (length (signum) > 1) ! error ("strflg=1, length(signum) = %d", length (signum)); endif stname = stname{signum}; ! otherwise error ("invalid value of strflg = %e", strflg); endswitch endif endif endif diff -cNr octave-2.9.16/scripts/control/system/sysgettsam.m octave-2.9.17/scripts/control/system/sysgettsam.m *** octave-2.9.16/scripts/control/system/sysgettsam.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysgettsam.m Wed Nov 7 21:29:23 2007 *************** *** 24,33 **** function T = sysgettsam (sys) ! if (! isstruct (sys)) print_usage (); endif T = sys.tsam; endfunction --- 24,37 ---- function T = sysgettsam (sys) ! if (nargin != 1) print_usage (); endif + if (! isstruct (sys)) + error ("sysgettsam: expecting argument to be system structure"); + endif + T = sys.tsam; endfunction diff -cNr octave-2.9.16/scripts/control/system/sysgettype.m octave-2.9.17/scripts/control/system/sysgettype.m *** octave-2.9.16/scripts/control/system/sysgettype.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysgettype.m Wed Nov 7 21:29:23 2007 *************** *** 39,49 **** function systype = sysgettype (sys) if (! isstruct (sys)) error ("sysgettype: input sys is not a structure"); endif typestr = {"tf", "zp", "ss"}; ! systype = typestr{ sys.sys(1) + 1}; endfunction --- 39,53 ---- function systype = sysgettype (sys) + if (nargin != 1) + print_usage (); + endif + if (! isstruct (sys)) error ("sysgettype: input sys is not a structure"); endif typestr = {"tf", "zp", "ss"}; ! systype = typestr{sys.sys(1) + 1}; endfunction diff -cNr octave-2.9.16/scripts/control/system/sysgroup.m octave-2.9.17/scripts/control/system/sysgroup.m *** octave-2.9.16/scripts/control/system/sysgroup.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysgroup.m Thu Nov 8 13:54:10 2007 *************** *** 59,176 **** function sys = sysgroup (varargin) ! if(nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk=1:nargin arglist(kk) = varargin{kk}; ! if(!isstruct(arglist{kk})) ! error("sysgroup: argument %d is not a data structure",kk); endif endfor ! if(nargin == 2) ## the usual case; group the two systems together Asys = arglist{1}; Bsys = arglist{2}; ## extract information from Asys, Bsys to consruct sys ! Asys = sysupdate(Asys,"ss"); ! Bsys = sysupdate(Bsys,"ss"); ! [n1,nz1,m1,p1] = sysdimensions(Asys); ! [n2,nz2,m2,p2] = sysdimensions(Bsys); ! [Aa,Ab,Ac,Ad,Atsam,An,Anz,Ast,Ain,Aout,Ayd] = sys2ss(Asys); ! [Ba,Bb,Bc,Bd,Btsam,Bn,Bnz,Bst,Bin,Bout,Byd] = sys2ss(Bsys); nA = An + Anz; nB = Bn + Bnz; ! if(p1*m1*p2*m2 == 0) ! error("sysgroup: argument lacks inputs and/or outputs"); ! elseif((Atsam + Btsam > 0) & (Atsam * Btsam == 0) ) ! warning("sysgroup: creating combination of continuous and discrete systems") ! elseif(Atsam != Btsam) ! error("sysgroup: Asys.tsam=%e, Bsys.tsam =%e", Atsam, Btsam); endif ! if(nA*nB > 0) ! A12 = zeros(nA,nB); else A12 = []; endif ! A = [Aa,A12; A12', Ba]; ! if(nA*m2 > 0) ! B12 = zeros(nA,m2); else B12 = []; endif ! if(nB*m1 > 0) ! B21 = zeros(nB,m1); else B21 = []; endif ! if(isempty(Ab)) Ab = []; endif ! if(isempty(Bb)) Bb = []; endif B = [Ab, B12; B21, Bb]; ! if(p1*nB > 0) ! C12 = zeros(p1,nB); else C12 = []; endif ! if(p2*nA > 0) ! C21 = zeros(p2,nA); else C21 = []; endif ! C = [Ac, C12; C21,Bc]; ! if(p1*m2 > 0) ! D12 = zeros(p1,m2); else D12 = []; endif ! if(p2*m1 > 0) ! D21 = zeros(p2,m1); else D21 = []; endif D = [Ad, D12; D21, Bd]; ! tsam = max(Atsam,Btsam); ## construct combined signal names; stnames must check for pure gain blocks ! if(isempty(Ast)) ! stname = Bst; ! elseif(isempty(Bst)) ! stname = Ast; else ! stname= __sysconcat__(Ast,Bst); endif ! inname = __sysconcat__(Ain,Bin); ! outname = __sysconcat__(Aout,Bout); ## Sort states into continuous first, then discrete ! dstates = ones(1,(nA+nB)); ! if(An) ! dstates(1:(An)) = zeros(1,An); endif ! if(Bn) ! dstates((nA+1):(nA+Bn)) = zeros(1,Bn); endif ! [tmp,pv] = sort(dstates); A = A(pv,pv); B = B(pv,:); C = C(:,pv); ! stname = stname(pv); ## check for duplicate signal names inname = __sysgroupn__ (inname, "input"); --- 59,176 ---- function sys = sysgroup (varargin) ! if (nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk = 1:nargin arglist(kk) = varargin{kk}; ! if (! isstruct (arglist{kk})) ! error ("sysgroup: argument %d is not a data structure", kk); endif endfor ! if (nargin == 2) ## the usual case; group the two systems together Asys = arglist{1}; Bsys = arglist{2}; ## extract information from Asys, Bsys to consruct sys ! Asys = sysupdate (Asys, "ss"); ! Bsys = sysupdate (Bsys, "ss"); ! [n1, nz1, m1, p1] = sysdimensions (Asys); ! [n2, nz2, m2, p2] = sysdimensions (Bsys); ! [Aa, Ab, Ac, Ad, Atsam, An, Anz, Ast, Ain, Aout, Ayd] = sys2ss (Asys); ! [Ba, Bb, Bc, Bd, Btsam, Bn, Bnz, Bst, Bin, Bout, Byd] = sys2ss (Bsys); nA = An + Anz; nB = Bn + Bnz; ! if (p1*m1*p2*m2 == 0) ! error ("sysgroup: argument lacks inputs and/or outputs"); ! elseif (Atsam + Btsam > 0 && Atsam * Btsam == 0) ! warning ("sysgroup: creating combination of continuous and discrete systems") ! elseif (Atsam != Btsam) ! error ("sysgroup: Asys.tsam=%e, Bsys.tsam =%e", Atsam, Btsam); endif ! if (nA*nB > 0) ! A12 = zeros (nA, nB); else A12 = []; endif ! A = [Aa, A12; A12', Ba]; ! if (nA*m2 > 0) ! B12 = zeros (nA, m2); else B12 = []; endif ! if (nB*m1 > 0) ! B21 = zeros (nB, m1); else B21 = []; endif ! if (isempty(Ab)) Ab = []; endif ! if (isempty (Bb)) Bb = []; endif B = [Ab, B12; B21, Bb]; ! if (p1*nB > 0) ! C12 = zeros (p1, nB); else C12 = []; endif ! if (p2*nA > 0) ! C21 = zeros (p2, nA); else C21 = []; endif ! C = [Ac, C12; C21, Bc]; ! if (p1*m2 > 0) ! D12 = zeros (p1, m2); else D12 = []; endif ! if (p2*m1 > 0) ! D21 = zeros (p2, m1); else D21 = []; endif D = [Ad, D12; D21, Bd]; ! tsam = max (Atsam, Btsam); ## construct combined signal names; stnames must check for pure gain blocks ! if (isempty (Ast)) ! stname = Bst; ! elseif (isempty (Bst)) ! stname = Ast; else ! stname= __sysconcat__ (Ast, Bst); endif ! inname = __sysconcat__ (Ain, Bin); ! outname = __sysconcat__ (Aout, Bout); ## Sort states into continuous first, then discrete ! dstates = ones (1, (nA+nB)); ! if (An) ! dstates(1:(An)) = zeros (1, An); endif ! if (Bn) ! dstates((nA+1):(nA+Bn)) = zeros (1, Bn); endif ! [tmp, pv] = sort (dstates); A = A(pv,pv); B = B(pv,:); C = C(:,pv); ! stname = stname (pv); ## check for duplicate signal names inname = __sysgroupn__ (inname, "input"); *************** *** 178,194 **** outname = __sysgroupn__ (outname, "output"); ## mark discrete outputs ! outlist = find([Ayd, Byd]); ## build new system ! sys = ss(A,B,C,D,tsam,An+Bn,Anz+Bnz,stname,inname,outname); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk=2:length(arglist) ! printf("sysgroup: kk=%d\n",kk); ! sys = sysgroup(sys,arglist{kk}); endfor endif --- 178,194 ---- outname = __sysgroupn__ (outname, "output"); ## mark discrete outputs ! outlist = find ([Ayd, Byd]); ## build new system ! sys = ss (A, B, C, D, tsam, An+Bn, Anz+Bnz, stname, inname, outname); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk = 2:length(arglist) ! printf ("sysgroup: kk=%d\n", kk); ! sys = sysgroup (sys, arglist{kk}); endfor endif diff -cNr octave-2.9.16/scripts/control/system/sysmin.m octave-2.9.17/scripts/control/system/sysmin.m *** octave-2.9.16/scripts/control/system/sysmin.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysmin.m Thu Nov 8 13:54:10 2007 *************** *** 51,67 **** function [retsys, nc, no, cflg, oflg] = sysmin (sys, flg) ! switch(nargin) ! case(1), flg = 0; ! case(2), jnk = flg; # dummy operation otherwise, print_usage (); endswitch ! dflg = is_digital(sys,2); ! [n,nz,m,p] = sysdimensions(sys); ! if(n*nz > 0) # both continuous and discrete states ! [aa,bb,cc,dd,tsam,n,nz,stnam,innam,outnam,yd] = sys2ss(sys); crng = 1:n; drng = n+(1:nz); --- 51,72 ---- function [retsys, nc, no, cflg, oflg] = sysmin (sys, flg) ! switch (nargin) ! case 1 ! flg = 0; ! case 2 ! jnk = flg; # dummy operation otherwise, print_usage (); endswitch ! ! dflg = is_digital (sys, 2); ! ! [n, nz, m, p] = sysdimensions (sys); ! ! if (n*nz > 0) # both continuous and discrete states ! [aa, bb, cc, dd, tsam, n, nz, stnam, innam, outnam, yd] = sys2ss (sys); crng = 1:n; drng = n+(1:nz); *************** *** 77,100 **** cstnam = stnam(crng); dstnam = stnam(drng); ! cinnam = __sysconcat__(innam,stnam(drng)); ! coutnam = __sysconcat__(outnam,stnam(drng)); ! csys = ss(Ac,[Bc,Acd],[Cc;Adc]); ! csys = syssetsignals(csys,"st",cstnam); ! csys = syssetsignals(csys,"in",cinnam); ! csys = syssetsignals(csys,"out",coutnam); # reduce continuous system, recombine with discrete part ! csys = sysmin(csys,flg); ! cn = sysdimensions(csys); ! if(cn == 0) # continuous states are removed; just reduce the discrete part ! sys = sysprune(sys,1:p,1:m,drng); ! retsys = sysmin(sys,flg); else # extract updated parameters from reduced continuous system ! [caa,cbb,ccc,cdd,ctsam,cn,cnz,cstnam,cinnam,coutnam] = sys2ss(csys); crng = 1:cn; Ac = caa; Bc = cbb(:,1:m); --- 82,107 ---- cstnam = stnam(crng); dstnam = stnam(drng); ! cinnam = __sysconcat__ (innam, stnam(drng)); ! coutnam = __sysconcat__ (outnam, stnam(drng)); ! csys = ss (Ac, [Bc, Acd], [Cc; Adc]); ! csys = syssetsignals (csys, "st", cstnam); ! csys = syssetsignals (csys, "in", cinnam); ! csys = syssetsignals (csys, "out", coutnam); # reduce continuous system, recombine with discrete part ! csys = sysmin (csys, flg); ! cn = sysdimensions (csys); ! if (cn == 0) # continuous states are removed; just reduce the discrete part ! sys = sysprune (sys, 1:p, 1:m, drng); ! retsys = sysmin (sys, flg); else # extract updated parameters from reduced continuous system ! [caa, cbb, ccc, cdd, ctsam, cn, cnz, cstnam, cinnam, coutnam] ... ! = sys2ss (csys); ! crng = 1:cn; Ac = caa; Bc = cbb(:,1:m); *************** *** 103,147 **** Adc = ccc(p + (1:nz),:); # recombine to reduce discrete part of the system ! dinnam = __sysconcat__(innam,cstnam); ! doutnam = __sysconcat__(outnam,cstnam); ! dsys = ss(Ad,[Bd,Adc],[Cd;Acd],[],tsam); ! dsys = syssetsignals(dsys,"st",dstnam); ! dsys = syssetsignals(dsys,"in",dinnam); ! dsys = syssetsignals(dsys,"out",doutnam); # reduce discrete subsystem ! dsys = sysmin(dsys); ! [n1,nz] = sysdimensions(dsys); ! if(nz == 0) # discrete subsystem is not needed ! retsys = sysprune(csys,1:p,1:m); else # combine discrete, continuous subsystems ! [Ad,dbb,dcc] = sys2ss(dsys); ! dstnam = sysgetsignals(dsys,"st"); Bd = dbb(:,1:m); Adc = dbb(:,m+(1:cn)); Cd = dcc(1:p,:); Acd = dcc(p+(1:cn),:); ! stnam = __sysconcat__(cstnam,dstnam); aa = [Ac, Acd; Adc, Ad]; bb = [Bc; Bd]; cc = [Cc, Cd]; ! retsys = ss([Ac, Acd; Adc, Ad], [Bc ; Bd], [Cc, Cd], dd, tsam, ... ! cn, nz, stnam, innam, outnam, find(yd == 1)); ! end endif else ! Ts = sysgettsam(sys); ! switch(flg) ! case(0), ## reduce to a minimal system ! [aa,bb,cc,dd] = sys2ss(sys); ! [cflg,Uc] = is_controllable(aa,bb); ! if(!cflg) ## reduce to controllable states ! if(!isempty(Uc)) aa = Uc'*aa*Uc; bb = Uc'*bb; cc = cc*Uc; --- 110,154 ---- Adc = ccc(p + (1:nz),:); # recombine to reduce discrete part of the system ! dinnam = __sysconcat__ (innam, cstnam); ! doutnam = __sysconcat__ (outnam, cstnam); ! dsys = ss (Ad, [Bd, Adc], [Cd; Acd], [], tsam); ! dsys = syssetsignals (dsys, "st", dstnam); ! dsys = syssetsignals (dsys, "in", dinnam); ! dsys = syssetsignals (dsys, "out", doutnam); # reduce discrete subsystem ! dsys = sysmin (dsys); ! [n1, nz] = sysdimensions (dsys); ! if (nz == 0) # discrete subsystem is not needed ! retsys = sysprune (csys, 1:p, 1:m); else # combine discrete, continuous subsystems ! [Ad, dbb, dcc] = sys2ss (dsys); ! dstnam = sysgetsignals (dsys, "st"); Bd = dbb(:,1:m); Adc = dbb(:,m+(1:cn)); Cd = dcc(1:p,:); Acd = dcc(p+(1:cn),:); ! stnam = __sysconcat__ (cstnam, dstnam); aa = [Ac, Acd; Adc, Ad]; bb = [Bc; Bd]; cc = [Cc, Cd]; ! retsys = ss ([Ac, Acd; Adc, Ad], [Bc ; Bd], [Cc, Cd], dd, tsam, ! cn, nz, stnam, innam, outnam, find(yd == 1)); ! endif endif else ! Ts = sysgettsam (sys); ! switch (flg) ! case 0 ## reduce to a minimal system ! [aa, bb, cc, dd] = sys2ss (sys); ! [cflg, Uc] = is_controllable (aa, bb); ! if (! cflg) ## reduce to controllable states ! if (! isempty (Uc)) aa = Uc'*aa*Uc; bb = Uc'*bb; cc = cc*Uc; *************** *** 149,158 **** aa = bb = cc = []; endif endif ! if(!isempty(aa)) ! [oflg,Uo] = is_observable(aa,cc); ! if(!oflg) ! if(!isempty(Uo)) aa = Uo'*aa*Uo; bb = Uo'*bb; cc = cc*Uo; --- 156,165 ---- aa = bb = cc = []; endif endif ! if (! isempty (aa)) ! [oflg, Uo] = is_observable (aa, cc); ! if (! oflg) ! if (! isempty (Uo)) aa = Uo'*aa*Uo; bb = Uo'*bb; cc = cc*Uo; *************** *** 161,192 **** endif endif endif ! switch(dflg) ! case(0), ! nc = no = nn = columns(aa); nz = 0; ! case(1), ! nc = no = nz = columns(aa); nn = 0; endswitch ! innam = sysgetsignals(sys,"in"); ! outnam= sysgetsignals(sys,"out"); ! retsys = ss(aa,bb,cc,dd,Ts,nn,nz,[],innam,outnam); ! case(1), ## reduced model with physical states ! [cflg,Uc] = is_controllable(sys); xc = find(max(abs(Uc')) != 0); ! [oflg,Uo] = is_observable(sys); xo = find(max(abs(Uo')) != 0); ! xx = intersection(xc,xo); ! if(isempty(xx)) xx = 0; endif # signal no states in reduced model ! retsys = sysprune(sys,[],[],xx); ! otherwise, error ("invalid value of flg = %d", flg); endswitch ! if(sysdimensions(retsys,"st") > 0) ! [cflg,Uc] = is_controllable(retsys); nc = columns(Uc); ! [oflg,Uo] = is_observable(retsys); no = columns(Uo); else nc = no = 0; endif endif endfunction --- 168,207 ---- endif endif endif ! switch (dflg) ! case 0 ! nc = no = nn = columns (aa); nz = 0; ! case 1 ! nc = no = nz = columns (aa); nn = 0; endswitch ! innam = sysgetsignals (sys, "in"); ! outnam= sysgetsignals (sys, "out"); ! retsys = ss (aa, bb, cc, dd, Ts, nn, nz, [], innam, outnam); ! case 1 ## reduced model with physical states ! [cflg, Uc] = is_controllable (sys); ! xc = find (max (abs (Uc')) != 0); ! [oflg, Uo] = is_observable (sys); ! xo = find (max (abs (Uo')) != 0); ! xx = intersection (xc, xo); ! ## signal no states in reduced model ! if (isempty (xx)) ! xx = 0; ! endif ! retsys = sysprune (sys, [], [], xx); ! otherwise error ("invalid value of flg = %d", flg); endswitch ! if (sysdimensions (retsys, "st") > 0) ! [cflg, Uc] = is_controllable (retsys); ! nc = columns (Uc); ! [oflg, Uo] = is_observable (retsys); ! no = columns (Uo); else nc = no = 0; endif endif + endfunction diff -cNr octave-2.9.16/scripts/control/system/sysmult.m octave-2.9.17/scripts/control/system/sysmult.m *** octave-2.9.16/scripts/control/system/sysmult.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysmult.m Thu Nov 8 15:18:26 2007 *************** *** 39,113 **** function sys = sysmult (varargin) ! if(nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk=1:nargin arglist{kk} = varargin{kk}; ! if(!isstruct(arglist{kk})) ! error("sysadd: argument %d is not a data structure",kk); endif endfor ## check system dimensions ! [n,nz,mg,pg,Gyd] = sysdimensions(arglist{1}); ! for kk=2:nargin ! [n,nz,mh,ph,Hyd] = sysdimensions(arglist{kk}); if(ph != mg) ! error("arg %d has %d outputs; arg %d has %d inputs",kk,ph,kk-1,mg); endif ! [n,nz,mg,pg,Gyd] = sysdimensions(arglist{kk}); # for next iteration endfor ## perform the multiply ! if(nargin == 2) Asys = arglist{1}; Bsys = arglist{2}; ! [An,Anz,Am,Ap] = sysdimensions(Asys); ! [Bn,Bnz,Bm,Bp] = sysdimensions(Bsys); ! [Aa,Ab,Ac,Ad,Atsam,An,Anz,Astname,Ainname,Aoutname,Ayd] = sys2ss(Asys); ! [Ba,Bb,Bc,Bd,Btsam,Bn,Bnz,Bstname,Binname,Boutname,Byd] = sys2ss(Bsys); ! if(Byd) ## check direct feed-through of inputs through discrete outputs ! alist = find(Byd); ! if(An) ! bd = Ab(1:An)* Bd(alist,:); ! if(norm(bd,1)) ! warning("sysmult: inputs -> Bsys discrete outputs -> continuous states of Asys"); endif endif ## check direct feed-through of continuous state through discrete outputs ! if(Bn) ! bc = Ab(1:An)* Bc(alist,1:(Bn)); ! if( norm(bc,1) ) ! warning("sysmult: Bsys states -> Bsys discrete outputs -> continuous states of Asys"); endif endif endif ## change signal names to avoid spurious warnings from sysgroup ! Asys = syssetsignals(Asys,"in",__sysdefioname__(Am,"A_sysmult_tmp_name")); ! Bsys = syssetsignals(Bsys,"out",__sysdefioname__(Bp,"B_sysmult_tmp_name")); ! sys = sysgroup(Asys,Bsys); ## connect outputs of B to inputs of A ! sys = sysconnect(sys,Ap+(1:Bp),1:Am); ## now keep only outputs of A and inputs of B ! sys = sysprune(sys,1:Ap,Am+(1:Bm)); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk=2:length(arglist) ! sys = sysmult(sys,arglist{kk}); endfor endif --- 39,119 ---- function sys = sysmult (varargin) ! if (nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk = 1:nargin arglist{kk} = varargin{kk}; ! if (! isstruct (arglist{kk})) ! error ("sysadd: argument %d is not a data structure", kk); endif endfor ## check system dimensions ! [n, nz, mg, pg, Gyd] = sysdimensions (arglist{1}); ! for kk = 2:nargin ! [n, nz, mh, ph, Hyd] = sysdimensions (arglist{kk}); if(ph != mg) ! error ("arg %d has %d outputs; arg %d has %d inputs", kk, ph, kk-1, mg); endif ! [n, nz, mg, pg, Gyd] = sysdimensions (arglist{kk}); # for next iteration endfor ## perform the multiply ! if (nargin == 2) Asys = arglist{1}; Bsys = arglist{2}; ! [An, Anz, Am, Ap] = sysdimensions (Asys); ! [Bn, Bnz, Bm, Bp] = sysdimensions (Bsys); ! [Aa, Ab, Ac, Ad, Atsam, An, Anz, ... ! Astname, Ainname, Aoutname, Ayd] = sys2ss(Asys); ! [Ba, Bb, Bc, Bd, Btsam, Bn, Bnz, ... ! Bstname, Binname, Boutname, Byd] = sys2ss(Bsys); ! ! if (Byd) ## check direct feed-through of inputs through discrete outputs ! alist = find (Byd); ! if (An) ! bd = Ab(1:An) * Bd(alist,:); ! if (norm (bd, 1)) ! warning ("sysmult: inputs -> Bsys discrete outputs -> continuous states of Asys"); endif endif ## check direct feed-through of continuous state through discrete outputs ! if (Bn) ! bc = Ab(1:An) * Bc(alist,1:(Bn)); ! if (norm (bc, 1)) ! warning ("sysmult: Bsys states -> Bsys discrete outputs -> continuous states of Asys"); endif endif endif ## change signal names to avoid spurious warnings from sysgroup ! Asys = syssetsignals (Asys, "in", ! __sysdefioname__ (Am, "A_sysmult_tmp_name")); ! ! Bsys = syssetsignals (Bsys, "out", ! __sysdefioname__ (Bp, "B_sysmult_tmp_name")); ! sys = sysgroup (Asys, Bsys); ## connect outputs of B to inputs of A ! sys = sysconnect (sys, Ap+(1:Bp), 1:Am); ## now keep only outputs of A and inputs of B ! sys = sysprune (sys, 1:Ap, Am+(1:Bm)); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk = 2:length(arglist) ! sys = sysmult (sys, arglist{kk}); endfor endif diff -cNr octave-2.9.16/scripts/control/system/sysout.m octave-2.9.17/scripts/control/system/sysout.m *** octave-2.9.16/scripts/control/system/sysout.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysout.m Thu Nov 8 13:54:10 2007 *************** *** 45,152 **** function retsys = sysout (sys, opt) ! if( (nargin < 1) || (nargin > 2) ) print_usage (); endif ! if(isempty(sys)) retsys = sys; ! warning("sysout: empty system") return; endif ! if(! isstruct(sys)) ! disp("sysout: input must be a system structure") endif ## set up output type array ! if( nargin == 1 ) ! opt = sysgettype(sys); ! else ! if( ! (strcmp(opt,"ss") + strcmp(opt,"tf") + ... ! strcmp(opt,"zp") + strcmp(opt,"all") ) ) ! error("opt must be one of [], \"ss\", \"tf\", \"zp\", or \"all\""); ! endif endif ## now check output for each form: ! [nn,nz,mm,pp] = sysdimensions(sys); ! if( mm > 0) ! disp("Input(s)") ! disp(__outlist__(sysgetsignals(sys,"in")," ")); else ! disp("Input(s): none"); endif if (pp > 0) ! disp("Output(s):") ! disp(__outlist__(sysgetsignals(sys,"out"), ... ! " ",sysgetsignals(sys,"yd")) ); else ! disp("Output(s): none"); endif ! if(sysgettsam(sys) > 0) ! disp(["Sampling interval: ",num2str(sysgettsam(sys))]); str = "z"; else str = "s"; endif ## transfer function form ! if( strcmp(opt,"tf") + strcmp(opt,"all") ) ! sys = sysupdate(sys,"tf"); #make sure tf is up to date ! disp("transfer function form:") ! [num,den] = sys2tf(sys); ! tfout(num,den,str); endif ! if( strcmp(opt,"zp") + strcmp(opt,"all") ) ! sys = sysupdate(sys,"zp"); #make sure zp is up to date disp("zero-pole form:") ! [zer,pol,kk] = sys2zp(sys); ! zpout(zer, pol, kk,str) endif ! if( strcmp(opt,"ss") + strcmp(opt,"all") ) ! sys = sysupdate(sys,"ss"); ! disp("state-space form:"); ! disp([num2str(nn)," continuous states, ", num2str(nz)," discrete states"]); ! if( nn+nz > 0) ! disp("State(s):") xi = (nn+1):(nn+nz); ! xd = zeros(1,nn+nz); ! if(!isempty(xi)) xd(xi) = 1; endif ! disp(__outlist__(sysgetsignals(sys,"st")," ",xd)); else ! disp("State(s): none"); endif ## display matrix values? ! dmat = (max( [ (nn+nz), mm, pp ] ) <= 32); ! printf("A matrix: %d x %d\n",sysdimensions(sys,"st"), ! sysdimensions(sys,"st")); ! [aa,bb,cc,dd] = sys2ss(sys); ! if(dmat) disp(aa); endif ! printf("B matrix: %d x %d\n",sysdimensions(sys,"st"), ! sysdimensions(sys,"in")); ! if(dmat) disp(bb); endif ! printf("C matrix: %d x %d\n",sysdimensions(sys,"out"), ! sysdimensions(sys,"st")); ! if(dmat) disp(cc); endif ! printf("D matrix: %d x %d\n",sysdimensions(sys,"out"), ! sysdimensions(sys,"in")); ! if(dmat) disp(dd); endif endif ! if(nargout >= 1) retsys = sys; endif - ## restore global variable - endfunction --- 45,156 ---- function retsys = sysout (sys, opt) ! if (nargin < 1 || nargin > 2) print_usage (); endif ! if (isempty (sys)) retsys = sys; ! error ("sysout: empty system") return; endif ! if (! isstruct (sys)) ! error ("sysout: input must be a system structure") endif ## set up output type array ! if (nargin == 1) ! opt = sysgettype (sys); ! elseif (! (strcmp (opt, "ss") || strcmp (opt, "tf") ! || strcmp (opt, "zp") || strcmp (opt, "all"))) ! error ("opt must be one of [], \"ss\", \"tf\", \"zp\", or \"all\""); endif ## now check output for each form: ! [nn, nz, mm, pp] = sysdimensions(sys); ! if (mm > 0) ! disp ("Input(s)") ! disp (__outlist__ (sysgetsignals (sys, "in"), " ")); else ! disp ("Input(s): none"); endif if (pp > 0) ! disp ("Output(s):") ! disp (__outlist__ (sysgetsignals (sys, "out"), ! " ", sysgetsignals (sys, "yd")) ); else ! disp ("Output(s): none"); endif ! if (sysgettsam (sys) > 0) ! disp ("Sampling interval: %g", sysgettsam (sys)); str = "z"; else str = "s"; endif ## transfer function form ! if (strcmp (opt, "tf") || strcmp (opt, "all")) ! sys = sysupdate (sys, "tf"); #make sure tf is up to date ! disp ("transfer function form:") ! [num, den] = sys2tf (sys); ! tfout (num, den, str); endif ! if (strcmp(opt, "zp") || strcmp(opt, "all")) ! sys = sysupdate (sys, "zp"); #make sure zp is up to date disp("zero-pole form:") ! [zer, pol, kk] = sys2zp (sys); ! zpout (zer, pol, kk, str) endif ! if (strcmp(opt, "ss") || strcmp(opt, "all")) ! sys = sysupdate (sys, "ss"); ! disp ("state-space form:"); ! disp ("%d continuous states, %d discrete states", nn, nz); ! if (nn+nz > 0) ! disp ("State(s):") xi = (nn+1):(nn+nz); ! xd = zeros (1, nn+nz); ! if (! isempty (xi)) xd(xi) = 1; endif ! disp (__outlist__ (sysgetsignals (sys, "st"), " ", xd)); else ! disp ("State(s): none"); endif ## display matrix values? ! dmat = (max ([nn+nz, mm, pp]) <= 32); ! printf ("A matrix: %d x %d\n", sysdimensions (sys, "st"), ! sysdimensions (sys, "st")); ! [aa, bb, cc, dd] = sys2ss (sys); ! if (dmat) ! disp (aa); ! endif ! printf ("B matrix: %d x %d\n", sysdimensions (sys, "st"), ! sysdimensions (sys, "in")); ! if (dmat) ! disp (bb); ! endif ! printf ("C matrix: %d x %d\n", sysdimensions (sys, "out"), ! sysdimensions (sys, "st")); ! if (dmat) ! disp (cc); ! endif ! printf("D matrix: %d x %d\n", sysdimensions (sys, "out"), ! sysdimensions (sys, "in")); ! if (dmat) ! disp (dd); ! endif endif ! if (nargout >= 1) retsys = sys; endif endfunction diff -cNr octave-2.9.16/scripts/control/system/sysprune.m octave-2.9.17/scripts/control/system/sysprune.m *** octave-2.9.16/scripts/control/system/sysprune.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysprune.m Thu Nov 8 15:26:32 2007 *************** *** 60,162 **** function sys = sysprune (sys, output_idx, input_idx, state_idx) ! if( nargin < 3 | nargin > 4 ) print_usage (); ! elseif(nargin < 4) state_idx = []; endif ## default: no action ! [nn,nz,mm,pp] = sysdimensions(sys); ! if(isempty(output_idx)) output_idx = 1:pp; endif ! if(isempty(input_idx)) input_idx = 1:mm; endif ! if(isempty(state_idx)) state_idx = 1:(nn+nz); endif ## check for signal names ! if(is_signal_list(output_idx) | ischar(output_idx)) ! output_idx = sysidx(sys,"out",output_idx); endif ! if(is_signal_list(input_idx) | ischar(input_idx)) ! input_idx = sysidx(sys,"in",input_idx); endif ## check dimensions ! if( !(isvector(output_idx) | isempty(output_idx) ) ) ! if(!ismatrix(output_idx)) ! error("sysprune: bad argument passed for output_idx"); else ! error("sysprune: output_idx (%d x %d) must be a vector or empty", ... ! rows(output_idx),columns(output_idx)); endif ! elseif(is_duplicate_entry(output_idx)) ! error("sysprune: duplicate entries found in output_idx"); endif ! if( !(isvector(input_idx) | isempty(input_idx) ) ) ! if(!ismatrix(input_idx)) ! error("sysprune: bad argument passed for input_idx"); else ! error("sysprune: input_idx (%d x %d) must be a vector or empty", ... ! rows(input_idx),columns(input_idx)); endif ! elseif(is_duplicate_entry(input_idx)) ! error("sysprune: duplicate entries found in input_idx"); endif ! if( !(isvector(state_idx) | isempty(state_idx) ) ) ! if(!ismatrix(state_idx)) ! error("sysprune: bad argument passed for state_idx"); else ! error("sysprune: state_idx (%d x %d) must be a vector or empty", ... ! rows(state_idx),columns(state_idx)); endif ! elseif(nn+nz > 0) ! if(is_duplicate_entry(state_idx)) ! error("sysprune: duplicate entries found in state_idx"); endif endif ! lo = length(output_idx); ! li = length(input_idx); ! lst = length(state_idx); ! ! if( !isstruct(sys)) ! error("Asys must be a system data structure (see ss, tf, or zp)") ! elseif(pp < lo) ! error([num2str(lo)," output_idx entries, system has only ", ... ! num2str(pp)," outputs"]); ! elseif(mm < li) ! error([num2str(li)," input_idx entries, system has only ", ... ! num2str(mm)," inputs"]); ! elseif(nn+nz < lst) ! error([num2str(lst)," state_idx entries, system has only ", ... ! num2str(nn+nz)," states"]); endif ! [aa,bb,cc,dd,tsam,nn,nz,stnam,innam,outnam,yd] = sys2ss(sys); ## check for valid state permutation ! if(nn & nz) ! c_idx = find(state_idx <= nn); ! if(!isempty(c_idx)) max_c = max(c_idx); ! else max_c = 0; endif ! d_idx = find(state_idx > nn); ! if(!isempty(d_idx)) min_d = min(d_idx); ! else min_d = nn+nz; endif ! if(max_c > min_d) ! warning("sysprune: state_idx(%d)=%d (discrete) preceeds", ... ! min_d,state_idx(min_d)); ! warning(" state_idx(%d)=%d (continuous)",... ! max_c,state_idx(max_c)); ! warning("sysprune: sys has %d continuous states, %d discrete states", ... ! nn,nz); ! error("continuous/discrete state partition not preserved ; see ss"); endif endif idx = input_idx; odx = output_idx; ! if(isempty(state_idx)) idx = []; odx = []; endif --- 60,171 ---- function sys = sysprune (sys, output_idx, input_idx, state_idx) ! if (nargin < 3 || nargin > 4) print_usage (); ! elseif (nargin < 4) state_idx = []; endif ## default: no action ! [nn, nz, mm, pp] = sysdimensions (sys); ! if (isempty (output_idx)) ! output_idx = 1:pp; ! endif ! if (isempty (input_idx)) ! input_idx = 1:mm; ! endif ! if (isempty (state_idx)) ! state_idx = 1:(nn+nz); ! endif ## check for signal names ! if (is_signal_list (output_idx) || ischar (output_idx)) ! output_idx = sysidx (sys, "out", output_idx); endif ! if (is_signal_list (input_idx) || ischar (input_idx)) ! input_idx = sysidx (sys, "in", input_idx); endif ## check dimensions ! if (! (isvector (output_idx) || isempty (output_idx))) ! if (! ismatrix (output_idx)) ! error ("sysprune: bad argument passed for output_idx"); else ! error ("sysprune: output_idx (%d x %d) must be a vector or empty", ! rows (output_idx), columns (output_idx)); endif ! elseif (is_duplicate_entry (output_idx)) ! error ("sysprune: duplicate entries found in output_idx"); endif ! if (! (isvector (input_idx) || isempty (input_idx))) ! if (! ismatrix (input_idx)) ! error ("sysprune: bad argument passed for input_idx"); else ! error ("sysprune: input_idx (%d x %d) must be a vector or empty", ! rows (input_idx), columns(input_idx)); endif ! elseif (is_duplicate_entry (input_idx)) ! error ("sysprune: duplicate entries found in input_idx"); endif ! if (! (isvector (state_idx) || isempty (state_idx))) ! if (! ismatrix (state_idx)) ! error ("sysprune: bad argument passed for state_idx"); else ! error ("sysprune: state_idx (%d x %d) must be a vector or empty", ! rows (state_idx), columns (state_idx)); endif ! elseif (nn+nz > 0) ! if (is_duplicate_entry (state_idx)) ! error ("sysprune: duplicate entries found in state_idx"); endif endif ! lo = length (output_idx); ! li = length (input_idx); ! lst = length (state_idx); ! ! if (! isstruct (sys)) ! error ("Asys must be a system data structure (see ss, tf, or zp)"); ! elseif (pp < lo) ! error("%d output_idx entries, system has only %d outputs", lo, pp); ! elseif (mm < li) ! error("%d input_idx entries, system has only %d inputs", li, mm); ! elseif (nn+nz < lst) ! error("%d state_idx entries, system has only %d states", lst, nn+nz); endif ! [aa, bb, cc, dd, tsam, nn, nz, stnam, innam, outnam, yd] = sys2ss (sys); ## check for valid state permutation ! if (nn & nz) ! c_idx = find (state_idx <= nn); ! if (! isempty (c_idx)) ! max_c = max (c_idx); ! else ! max_c = 0; ! endif ! d_idx = find (state_idx > nn); ! if (! isempty (d_idx)) ! min_d = min (d_idx); ! else ! min_d = nn+nz; ! endif ! if (max_c > min_d) ! warning ("sysprune: state_idx(%d)=%d (discrete) preceeds", ! min_d, state_idx(min_d)); ! warning(" state_idx(%d)=%d (continuous)", ! max_c, state_idx(max_c)); ! warning ("sysprune: sys has %d continuous states, %d discrete states", ! nn, nz); ! error("continuous/discrete state partition not preserved; see ss"); endif endif idx = input_idx; odx = output_idx; ! if (isempty (state_idx)) idx = []; odx = []; endif *************** *** 169,175 **** innam = innam(input_idx); outnam = outnam(output_idx); stnam = stnam(state_idx); ! nn1 = length(find(state_idx <= nn)); ! nz1 = length(find(state_idx > nn)); ! sys = ss(aa,bb,cc,dd,tsam,nn1,nz1,stnam,innam,outnam,find(yd)); endfunction --- 178,186 ---- innam = innam(input_idx); outnam = outnam(output_idx); stnam = stnam(state_idx); ! nn1 = length (find (state_idx <= nn)); ! nz1 = length (find (state_idx > nn)); ! ! sys = ss (aa, bb, cc, dd, tsam, nn1, nz1, stnam, innam, outnam, find (yd)); ! endfunction diff -cNr octave-2.9.16/scripts/control/system/sysreorder.m octave-2.9.17/scripts/control/system/sysreorder.m *** octave-2.9.16/scripts/control/system/sysreorder.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysreorder.m Thu Nov 8 15:18:26 2007 *************** *** 44,64 **** function pv = sysreorder (vlen, list) ## disp('sysreorder: entry') pv = 1:vlen; ## make it a row vector list = reshape(list,1,length(list)); ! A = pv'*ones(size(list)); ! B = ones(size(pv'))*list; X = (A != B); ! if(!isvector(X)) ! y = min(X'); else y = X'; endif ! z = find(y == 1); ! if(!isempty(z)) pv = [z, list]; else pv = list; --- 44,68 ---- function pv = sysreorder (vlen, list) + if (nargin != 2) + print_usage (); + endif + ## disp('sysreorder: entry') pv = 1:vlen; ## make it a row vector list = reshape(list,1,length(list)); ! A = pv' * ones (size (list)); ! B = ones (size (pv')) * list; X = (A != B); ! if (! isvector (X)) ! y = min (X'); else y = X'; endif ! z = find (y == 1); ! if (! isempty (z)) pv = [z, list]; else pv = list; diff -cNr octave-2.9.16/scripts/control/system/sysscale.m octave-2.9.17/scripts/control/system/sysscale.m *** octave-2.9.16/scripts/control/system/sysscale.m Mon Oct 15 11:30:04 2007 --- octave-2.9.17/scripts/control/system/sysscale.m Thu Nov 8 13:54:10 2007 *************** *** 59,151 **** function sys = sysscale (sys, outscale, inscale, outname, inname) ! if( (nargin < 3) || (nargin > 5) ) print_usage (); ! elseif (!isstruct(sys)) ! error("sys must be a structured system"); endif ! [nn,nz,mm,pp] = sysdimensions(sys); ## check for omitted scales ! if(isempty(outscale)) outscale = eye(pp); endif ! if(isempty(inscale)) inscale = eye(mm); endif ## check dimensions of scaling matrices ! if(mm!=rows(inscale)) ! error("inscale(%dx%d) should have %d rows(# system inputs)", ... ! rows(inscale),columns(inscale),mm); ! elseif( pp != columns(outscale) ) ! error("outscale(%dx%d) should have %d columns(# system outputs)", ... ! rows(outscale), columns(outscale),pp); endif ! sysyd = sysgetsignals(sys,"yd"); ! outc = find(sysyd==0); ! outd = find(sysyd==1); ! if(length(outc) & length(outd)) for ii = 1:rows(outscale) ! nci = norm(outscale(ii,outc)); ! ndi = norm(outscale(ii,outd)); ! if( nci & ndi) ! warning("sysscale: outscale(%d,:) sums continuous and discrete outputs; setting output to cont",ii) sysyd(ii) = 0; else sysyd(ii) = (ndi != 0); endif endfor else ! sysyd = ones(1,rows(outscale))*( length(outd) > 0); endif ## check for SISO system type ! if strcmp(sysgettype(sys),"tf") ! [num,den,tsam,innam,outnam] = sys2tf(sys); num = num*inscale*outscale; ! sys = tf(num,den,tsam,innam,outnam); ! return ! elseif strcmp(sysgettype(sys),"zp") ! [zer,pol,kk,tsam,innam,outnam] = sys2zp(sys); kk = kk*inscale*outscale; ! sys = zp(zer,pol,k,tsam,innam,outnam); ! return endif ## it's a state space system... ! [sysa,sysb,sysc,sysd,systsam, ... ! sysn,sysnz,sysstname,sysinname,sysoutname,oldyd] = sys2ss(sys); sysb = sysb*inscale; sysc = outscale*sysc; sysd = outscale*sysd*inscale; ! if( !issquare(outscale) ) ## strip extra output names (if any) ! sysoutname = sysoutname(1:min(rows(outscale),columns(outscale))); ! if( nargin < 4) ! warning("sysscale: outscale not square, outname not specified"); ! warning("sysscale: using default output names"); ! outname = __sysdefioname__(rows(sysc),"y"); endif else outname = sysoutname; endif ! if( !issquare(inscale) ) ## strip extra output names (if any) ! sysinname = sysinname(1:min(rows(inscale),columns(inscale))); ! if(nargin < 5) ! warning("sysscale: inscale not square, inname not specified"); ! warning("sysscale: using default input names"); ! inname = __sysdefioname__(columns(sysb),"u"); endif else ! inname = sysgetsignals(sys,"in"); endif ! sys = ss(sysa,sysb,sysc,sysd,systsam,nn,nz,sysstname, ... ! inname,outname,find(sysyd==1)); endfunction --- 59,156 ---- function sys = sysscale (sys, outscale, inscale, outname, inname) ! if (nargin < 3 || nargin > 5) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be a structured system"); endif ! [nn, nz, mm, pp] = sysdimensions (sys); ## check for omitted scales ! if (isempty (outscale)) ! outscale = eye (pp); ! endif ! if (isempty (inscale)) ! inscale = eye (mm); ! endif ## check dimensions of scaling matrices ! if (mm != rows (inscale)) ! error ("inscale(%dx%d) should have %d rows(# system inputs)", ! rows (inscale), columns (inscale), mm); ! elseif (pp != columns (outscale) ) ! error ("outscale(%dx%d) should have %d columns(# system outputs)", ! rows (outscale), columns (outscale), pp); endif ! sysyd = sysgetsignals (sys, "yd"); ! outc = find (sysyd == 0); ! outd = find (sysyd == 1); ! if (length (outc) > 0 && length (outd) > 0) for ii = 1:rows(outscale) ! nci = norm (outscale (ii, outc)); ! ndi = norm (outscale (ii, outd)); ! if (nci > 0 && ndi > 0) ! warning ("sysscale: outscale(%d,:) sums continuous and discrete outputs; setting output to cont", ! ii) sysyd(ii) = 0; else sysyd(ii) = (ndi != 0); endif endfor else ! sysyd = ones (1, rows (outscale)) * (length(outd) > 0); endif ## check for SISO system type ! if (strcmp (sysgettype (sys), "tf")) ! [num, den, tsam, innam, outnam] = sys2tf (sys); num = num*inscale*outscale; ! sys = tf (num, den, tsam, innam, outnam); ! return; ! elseif (strcmp (sysgettype (sys), "zp")) ! [zer, pol, kk, tsam, innam, outnam] = sys2zp (sys); kk = kk*inscale*outscale; ! sys = zp (zer, pol, k, tsam, innam, outnam); ! return; endif ## it's a state space system... ! [sysa, sysb, sysc, sysd, systsam, ... ! sysn, sysnz, sysstname, sysinname, sysoutname, oldyd] = sys2ss(sys); sysb = sysb*inscale; sysc = outscale*sysc; sysd = outscale*sysd*inscale; ! if (! issquare (outscale)) ## strip extra output names (if any) ! sysoutname = sysoutname(1:min(rows(outscale), columns(outscale))); ! if (nargin < 4) ! warning ("sysscale: outscale not square, outname not specified"); ! warning ("sysscale: using default output names"); ! outname = __sysdefioname__ (rows (sysc), "y"); endif else outname = sysoutname; endif ! if (! issquare (inscale)) ## strip extra output names (if any) ! sysinname = sysinname(1:min(rows(inscale), columns(inscale))); ! if (nargin < 5) ! warning ("sysscale: inscale not square, inname not specified"); ! warning ("sysscale: using default input names"); ! inname = __sysdefioname__ (columns (sysb), "u"); endif else ! inname = sysgetsignals (sys, "in"); endif ! sys = ss (sysa, sysb, sysc, sysd, systsam, nn, nz, sysstname, ! inname, outname, find (sysyd == 1)); endfunction diff -cNr octave-2.9.16/scripts/control/system/syssetsignals.m octave-2.9.17/scripts/control/system/syssetsignals.m *** octave-2.9.16/scripts/control/system/syssetsignals.m Mon Oct 15 11:30:04 2007 --- octave-2.9.17/scripts/control/system/syssetsignals.m Thu Nov 8 13:54:10 2007 *************** *** 96,174 **** function retsys = syssetsignals (sys, opt, names, sig_idx) ! if (nargin < 3 | nargin > 4) print_usage (); ! elseif (!isstruct(sys)) ! error("sys must be a system data structure"); ! elseif (isempty(opt)) opt = "out"; ! elseif( ! ischar(opt) ) ! error("opt must be a string"); ! elseif( ! (strcmp(opt,"out") + strcmp(opt,"yd") + ... ! strcmp(opt,"in") + strcmp(opt,"st") ) ) ! error("opt must be one of [], ""out"", ""yd"", ""in"", or ""st"""); ! elseif(nargin == 4) ! if(is_signal_list(sig_idx) | ischar(sig_idx)) ## convert to vector of indices ! if(opt == "yd") ! sig_idx = sysidx(sys,"out",sig_idx); else ! sig_idx = sysidx(sys,opt,sig_idx); endif endif ## check index vector ! if(min(size(sig_idx)) > 1) ! disp("syssetsignals: sig_idx=") ! disp(sig_idx); ! error("sig_idx must be a vector") endif endif ! sig_vals = sysgetsignals(sys,opt); ## make sure it's in state space form if state names are given ! if(strcmp(opt,"st")) ! sys = sysupdate(sys,"ss"); endif ! if(strcmp(opt,"yd") == 0) ## it's a signal name list we're changing ! if(!iscell(names)) names = {names}; endif ! if( (!is_signal_list(names)) & (!isempty(names)) ) ! if(ischar(names{1})) ! warning("syssetsignals(opt=%s): converting string matrix \"names\" to a cell array of strings",opt); tmpstr = names{1}; for ii=1:rows(tmpstr) names{ii} = deblank(tmpstr(ii,:)); endfor else ! names ! error("parameter \"names\" must be a cell array of strings"); endif endif ! nsigs = length(sig_vals); ! if(nargin == 3) ## replace all signal names ! if(length(names) != nsigs) ! error("opt=%s, sig_idx omitted: names(len=%d) should have %d entries ", ... ! opt,length(names),nsigs); endif sig_idx = 1:nsigs; ! elseif(length(names) != length(sig_idx)) ## replace specified signal names ! error("opt=%s, sig_idx(len=%d), names(len=%d) mismatch",opt, ... ! length(sig_idx), length(names)); endif ! for ii=1:length(sig_idx) jj = sig_idx(ii); ! if(jj < 1 | jj > nsigs | jj != floor(jj+0.5)) ! error("opt=%s, sig_idx(%d)=%d, %e: must be an integer between 1 and %d", ... ! opt, ii, jj, jj, nsigs); endif sig_vals{jj} = names{ii}; endfor --- 96,172 ---- function retsys = syssetsignals (sys, opt, names, sig_idx) ! if (nargin < 3 || nargin > 4) print_usage (); ! elseif (! isstruct (sys)) ! error ("sys must be a system data structure"); ! elseif (isempty (opt)) opt = "out"; ! elseif (! ischar (opt)) ! error ("opt must be a string"); ! elseif (! (strcmp (opt, "out") || strcmp (opt, "yd") ! || strcmp (opt, "in") || strcmp (opt, "st"))) ! error ("opt must be one of [], \"out\", \"yd\", \"in\", or \"st\""); ! elseif (nargin == 4) ! if (is_signal_list (sig_idx) || ischar (sig_idx)) ## convert to vector of indices ! if (opt == "yd") ! sig_idx = sysidx (sys, "out", sig_idx); else ! sig_idx = sysidx (sys, opt, sig_idx); endif endif ## check index vector ! if (min (size (sig_idx)) > 1) ! disp ("syssetsignals: sig_idx=") ! disp (sig_idx); ! error ("sig_idx must be a vector") endif endif ! sig_vals = sysgetsignals (sys, opt); ## make sure it's in state space form if state names are given ! if (strcmp (opt, "st")) ! sys = sysupdate (sys, "ss"); endif ! if (strcmp (opt, "yd") == 0) ## it's a signal name list we're changing ! if (! iscell (names)) names = {names}; endif ! if (! is_signal_list (names) && ! isempty (names)) ! if (ischar (names{1})) tmpstr = names{1}; for ii=1:rows(tmpstr) names{ii} = deblank(tmpstr(ii,:)); endfor else ! error ("parameter \"names\" must be a cell array of strings"); endif endif ! nsigs = length (sig_vals); ! if (nargin == 3) ## replace all signal names ! if (length (names) != nsigs) ! error ("opt=%s, sig_idx omitted: names(len=%d) should have %d entries ", ! opt, length (names), nsigs); endif sig_idx = 1:nsigs; ! elseif (length (names) != length (sig_idx)) ## replace specified signal names ! error ("opt=%s, sig_idx(len=%d), names(len=%d) mismatch", ! opt, length (sig_idx), length (names)); endif ! for ii = 1:length(sig_idx) jj = sig_idx(ii); ! if (jj < 1 || jj > nsigs || jj != floor (jj+0.5)) ! error ("opt=%s, sig_idx(%d)=%d, %e: must be an integer between 1 and %d", ! opt, ii, jj, jj, nsigs); endif sig_vals{jj} = names{ii}; endfor *************** *** 176,243 **** else ## update yd ## 1st check pathological case: no outputs ! nout = sysdimensions(sys,"out"); ! if(nout == 0) ! if(nargin != 3) ! error("opt=%s, %d outputs, sysgetsignals cannot take 4 arguments", ... ! yd,nout); endif ! if(!isempty(names)) ! error("opt=%s, %d outputs, names is not empty"); endif sigvals = []; else ! nsigs = length(sig_vals); ! if(!isvector(names)) ! error("syssetsignals: opt=yd, names(%dx%d) must be a vector", ... ! rows(names), columns(names)); ! endif ! if(nargin == 3) ! if(length(names) != nsigs) ! error("opt=yd, sig_idx omitted: names(%d) should be length(%d)", ... ! length(names), nsigs); endif sig_idx = 1:nsigs; ! elseif(length(names) != length(sig_idx)) ! error("opt=yd: length(names)=%d, length(sig_idx)=%d",length(names), ... ! length(sig_idx) ); endif ! badidx = find(names != 0 & names != 1); ! if(! isempty(badidx) ) ! for ii=1:length(badidx) ! warning("syssetsignals: opt=yd: names(%d)=%e, must be 0 or 1", ... ! badidx(ii), names(badidx(ii)) ); endfor ! error ("opt=yd: invalid values in names"); endif ! for ii=1:length(sig_idx) jj = sig_idx(ii); ! if(jj < 1 | jj > nsigs | jj != floor(jj)) ! error("sig_idx(%d)=%d, %e: must be an integer between 1 and %d", ... ! ii,jj, jj, nsigs); endif sig_vals(jj) = names(ii); endfor ! if(any(sig_vals == 1) & sysgettsam(sys) == 0) ! warning("Setting system sampling time to 1"); ! printf("syssetsignals: original system sampling time=0 but output(s)\n"); ! disp(find(sig_vals==1)) ! printf("are digital\n"); ! sys = syschtsam(sys,1); endif endif endif ! if(strcmp(opt,"st")) sys.stname = sig_vals; ! elseif(strcmp(opt,"in")) sys.inname = sig_vals; ! elseif(strcmp(opt,"out")) sys.outname = sig_vals; ! elseif(strcmp(opt,"yd")) sys.yd = sig_vals; endif --- 174,241 ---- else ## update yd ## 1st check pathological case: no outputs ! nout = sysdimensions (sys, "out"); ! if (nout == 0) ! if (nargin != 3) ! error ("opt=%s, %d outputs, sysgetsignals cannot take 4 arguments", ! opt, nout); endif ! if (! isempty (names)) ! error ("opt=%s, %d outputs, names is not empty", opt, nout); endif sigvals = []; else ! nsigs = length (sig_vals); ! if (! isvector (names)) ! error ("syssetsignals: opt=%s, names(%dx%d) must be a vector", ! opt, rows (names), columns (names)); ! endif ! if (nargin == 3) ! if (length (names) != nsigs) ! error ("opt=%s, sig_idx omitted: names(%d) should be length(%d)", ! opt, length (names), nsigs); endif sig_idx = 1:nsigs; ! elseif (length(names) != length (sig_idx)) ! error ("opt=%s: length(names)=%d, length(sig_idx)=%d", ! opt, length (names), length (sig_idx)); endif ! badidx = find (names != 0 & names != 1); ! if (! isempty (badidx)) ! for ii = 1:length(badidx) ! warning ("syssetsignals: opt=%s: names(%d)=%e, must be 0 or 1", ! opt, badidx(ii), names(badidx(ii)) ); endfor ! error ("opt=%s: invalid values in names", opt); endif ! for ii = 1:length(sig_idx) jj = sig_idx(ii); ! if (jj < 1 || jj > nsigs || jj != floor (jj)) ! error ("sig_idx(%d)=%d, %e: must be an integer between 1 and %d", ! ii, jj, jj, nsigs); endif sig_vals(jj) = names(ii); endfor ! if (any (sig_vals == 1) && sysgettsam (sys) == 0) ! warning ("Setting system sampling time to 1"); ! printf ("syssetsignals: original system sampling time=0 but output(s)\n"); ! disp (find (sig_vals == 1)) ! printf ("are digital\n"); ! sys = syschtsam (sys, 1); endif endif endif ! if (strcmp (opt, "st")) sys.stname = sig_vals; ! elseif (strcmp (opt, "in")) sys.inname = sig_vals; ! elseif (strcmp (opt, "out")) sys.outname = sig_vals; ! elseif (strcmp (opt, "yd")) sys.yd = sig_vals; endif diff -cNr octave-2.9.16/scripts/control/system/syssub.m octave-2.9.17/scripts/control/system/syssub.m *** octave-2.9.16/scripts/control/system/syssub.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/syssub.m Thu Nov 8 15:18:26 2007 *************** *** 47,118 **** function sys = syssub (varargin) ! if(nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk=1:nargin arglist{kk} = varargin{kk}; ! if(!isstruct(arglist{kk})) ! error("syssub: argument %d is not a data structure",kk); endif endfor ## check system dimensions ! [n,nz,mg,pg,Gyd] = sysdimensions(arglist{1}); ! for kk=2:nargin ! [n,nz,mh,ph,Hyd] = sysdimensions(arglist{kk}); ! if(mg != mh) ! error("arg 1 has %d inputs; arg %d has vs %d inputs",mg,kk,mh); ! elseif(pg != ph) ! error("arg 1 has %d outputs; arg %d has vs %d outputs",pg,kk,ph); ! elseif(norm(Gyd - Hyd)) ! warning("cannot add a discrete output to a continuous output"); ! error("Output type mismatch: arguments 1 and %d\n",kk); endif endfor ## perform the subtract ! if(nargin == 2) Gsys = arglist{1}; Hsys = arglist{2}; ! if( strcmp(sysgettype(Gsys),"tf") | strcmp(sysgettype(Hsys),"tf") ) ## see if subtracting transfer functions with identical denominators ! [Gnum,Gden,GT,Gin,Gout] = sys2tf(Gsys); ! [Hnum,Hden,HT,Hin,Hout] = sys2tf(Hsys); ! if(length(Hden) == length(Gden) ) ! if( (Hden == Gden) & (HT == GT) ) ! sys = tf(Gnum-Hnum,Gden,GT,Gin,Gout); ! return endif ## if not, we go on and do the usual thing... endif endif ## make sure in ss form ! Gsys = sysupdate(Gsys,"ss"); ! Hsys = sysupdate(Hsys,"ss"); ## change signal names to avoid warning messages from sysgroup ! Gsys = syssetsignals(Gsys,"in",__sysdefioname__(length(Gin),"Gin_u")); ! Gsys = syssetsignals(Gsys,"out",__sysdefioname__(length(Gout),"Gout_u")); ! Hsys = syssetsignals(Hsys,"in",__sysdefioname__(length(Hin),"Hin_u")); ! Hsys = syssetsignals(Hsys,"out",__sysdefioname__(length(Hout),"Hout_u")); ! sys = sysgroup(Gsys,Hsys); ! eyin = eye(mg); ! eyout = eye(pg); sys = sysscale (sys, [eyout, -eyout], [eyin; eyin], Gout, Gin); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk=2:length(arglist) ! sys = syssub(sys,arglist{kk}); endfor endif --- 47,125 ---- function sys = syssub (varargin) ! if (nargin < 1) print_usage (); endif ## collect all arguments arglist = {}; ! for kk = 1:nargin arglist{kk} = varargin{kk}; ! if (! isstruct (arglist{kk})) ! error ("syssub: argument %d is not a data structure", kk); endif endfor ## check system dimensions ! [n, nz, mg, pg, Gyd] = sysdimensions (arglist{1}); ! for kk = 2:nargin ! [n, nz, mh, ph, Hyd] = sysdimensions (arglist{kk}); ! if (mg != mh) ! error ("arg 1 has %d inputs; arg %d has vs %d inputs", mg, kk, mh); ! elseif (pg != ph) ! error ("arg 1 has %d outputs; arg %d has vs %d outputs", pg, kk, ph); ! elseif (norm (Gyd - Hyd)) ! warning ("cannot add a discrete output to a continuous output"); ! error ("Output type mismatch: arguments 1 and %d", kk); endif endfor ## perform the subtract ! if (nargin == 2) Gsys = arglist{1}; Hsys = arglist{2}; ! if (strcmp (sysgettype (Gsys), "tf") || strcmp (sysgettype (Hsys), "tf")) ## see if subtracting transfer functions with identical denominators ! [Gnum, Gden, GT, Gin, Gout] = sys2tf (Gsys); ! [Hnum, Hden, HT, Hin, Hout] = sys2tf (Hsys); ! if (length (Hden) == length (Gden)) ! if ((Hden == Gden) & (HT == GT)) ! sys = tf (Gnum-Hnum, Gden, GT, Gin, Gout); ! return; endif ## if not, we go on and do the usual thing... endif endif ## make sure in ss form ! Gsys = sysupdate (Gsys, "ss"); ! Hsys = sysupdate (Hsys, "ss"); ## change signal names to avoid warning messages from sysgroup ! Gsys = syssetsignals (Gsys, "in", ! __sysdefioname__(length(Gin), "Gin_u")); ! Gsys = syssetsignals (Gsys, "out", ! __sysdefioname__(length(Gout), "Gout_u")); ! Hsys = syssetsignals (Hsys, "in", ! __sysdefioname__(length(Hin), "Hin_u")); ! ! Hsys = syssetsignals (Hsys, "out", ! __sysdefioname__(length(Hout), "Hout_u")); ! ! sys = sysgroup (Gsys, Hsys); ! ! eyin = eye (mg); ! eyout = eye (pg); sys = sysscale (sys, [eyout, -eyout], [eyin; eyin], Gout, Gin); else ## multiple systems (or a single system); combine together one by one sys = arglist{1}; ! for kk = 2:length(arglist) ! sys = syssub (sys, arglist{kk}); endfor endif diff -cNr octave-2.9.16/scripts/control/system/sysupdate.m octave-2.9.17/scripts/control/system/sysupdate.m *** octave-2.9.16/scripts/control/system/sysupdate.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/sysupdate.m Thu Nov 8 15:18:26 2007 *************** *** 59,121 **** ## check for correct number of inputs if (nargin != 2) print_usage (); ! elseif(! isstruct(sys) ) ! error("1st argument must be system data structure") ! elseif(! (strcmp(opt,"tf") + strcmp(opt,"zp") + ... ! strcmp(opt,"ss") + strcmp(opt,"all")) ) ! error("2nd argument must be \"tf\", \"zp\", \"ss\", or \"all\""); endif ## check to make sure not trying to make a SISO system out of a MIMO sys ! if ( (strcmp(opt,"tf") + strcmp(opt,"zp") + strcmp(opt,"all")) ... ! & strcmp(sysgettype(sys),"ss") & (! is_siso(sys) ) ) ! error("MIMO -> SISO update requested"); endif ## update transfer function if desired ! if ( (strcmp(opt, "tf") + strcmp(opt,"all"))&& (!sys.sys(2))) ## check to make sure the system is not discrete and continuous ! is_digital(sys); ## if original system zero-pole ! if strcmp(sysgettype(sys),"zp") ! [sys.num,sys.den] = zp2tf(sys.zer,sys.pol,sys.k); sys.sys(2) = 1; ## if original system is state-space ! elseif(sys.sys(1) == 2) ! [sys.num,sys.den] = ss2tf(sys.a,sys.b,sys.c,sys.d); sys.sys(2) = 1; endif endif ## update zero-pole if desired ! if ( (strcmp(opt, "zp") + strcmp(opt,"all")) && (! sys.sys(3)) ) ## check to make sure the system is not discrete and continuous ! is_digital(sys); ## original system is transfer function if (sys.sys(1) == 0) ! [sys.zer,sys.pol,sys.k] = tf2zp(sys.num,sys.den); sys.sys(3) = 1; ## original system is state-space ! ! elseif(sys.sys(1) == 2) ! [sys.zer,sys.pol,sys.k] = ss2zp(sys.a,sys.b,sys.c,sys.d); sys.sys(3) = 1; endif - endif ## update state-space if desired ! if ( (strcmp(opt, "ss") + strcmp(opt,"all")) && (! sys.sys(4)) ) ## original system is transfer function if (sys.sys(1) == 0) ! [sys.a,sys.b,sys.c,sys.d] = tf2ss(sys.num,sys.den); sys.sys(4) = 1; ## original system is zero-pole ! elseif(sys.sys(1) == 1) ! [sys.a,sys.b,sys.c,sys.d] = zp2ss(sys.zer,sys.pol,sys.k); sys.sys(4) = 1; endif --- 59,119 ---- ## check for correct number of inputs if (nargin != 2) print_usage (); ! elseif (! isstruct (sys)) ! error ("first argument must be system data structure"); ! elseif (! (strcmp (opt, "tf") || strcmp (opt, "zp") ! || strcmp (opt, "ss") || strcmp (opt, "all"))) ! error ("second argument must be \"tf\", \"zp\", \"ss\", or \"all\""); endif ## check to make sure not trying to make a SISO system out of a MIMO sys ! if ((strcmp (opt, "tf") || strcmp(opt,"zp") || strcmp (opt, "all")) ! && strcmp (sysgettype (sys), "ss") && ! is_siso (sys)) ! error ("MIMO -> SISO update requested"); endif ## update transfer function if desired ! if ((strcmp (opt, "tf") || strcmp (opt, "all")) && (! sys.sys(2))) ## check to make sure the system is not discrete and continuous ! is_digital (sys); ## if original system zero-pole ! if (strcmp (sysgettype (sys), "zp")) ! [sys.num, sys.den] = zp2tf (sys.zer, sys.pol, sys.k); sys.sys(2) = 1; ## if original system is state-space ! elseif (sys.sys(1) == 2) ! [sys.num, sys.den] = ss2tf (sys.a, sys.b, sys.c, sys.d); sys.sys(2) = 1; endif endif ## update zero-pole if desired ! if ((strcmp (opt, "zp") || strcmp (opt, "all")) && ! sys.sys(3)) ## check to make sure the system is not discrete and continuous ! is_digital (sys); ## original system is transfer function if (sys.sys(1) == 0) ! [sys.zer, sys.pol, sys.k] = tf2zp (sys.num, sys.den); sys.sys(3) = 1; ## original system is state-space ! elseif (sys.sys(1) == 2) ! [sys.zer, sys.pol, sys.k] = ss2zp (sys.a, sys.b, sys.c, sys.d); sys.sys(3) = 1; endif endif ## update state-space if desired ! if ((strcmp (opt, "ss") || strcmp (opt, "all")) && ! sys.sys(4)) ## original system is transfer function if (sys.sys(1) == 0) ! [sys.a, sys.b, sys.c, sys.d] = tf2ss (sys.num, sys.den); sys.sys(4) = 1; ## original system is zero-pole ! elseif (sys.sys(1) == 1) ! [sys.a, sys.b, sys.c, sys.d] = zp2ss (sys.zer, sys.pol, sys.k); sys.sys(4) = 1; endif diff -cNr octave-2.9.16/scripts/control/system/tf.m octave-2.9.17/scripts/control/system/tf.m *** octave-2.9.16/scripts/control/system/tf.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/tf.m Thu Nov 8 13:54:10 2007 *************** *** 61,92 **** function outsys = tf (num, den, tsam, inname, outname) ## Test for the correct number of input arguments ! if ((nargin < 2) || (nargin > 5)) print_usage (); - return endif ## check input format ! if( ! ( (isvector(num) || isscalar(num)) && ... ! (isvector(den) || isscalar(den))) ) ! error(["num (",num2str(rows(num)),"x",num2str(columns(num)), ... ! ") and den (",num2str(rows(den)),"x",num2str(columns(den)), ... ! ") must be vectors"]) endif ## strip leading zero coefficients num = __tfl__ (num); den = __tfl__ (den); ! if (length(num) > length(den)) ! error("# of poles (%d) < # of zeros (%d)",length(den)-1, length(num)-1); endif ## check sampling interval (if any) ! if(nargin <= 2) tsam = 0; # default ! elseif (isempty(tsam)) tsam = 0; endif ! if ( (! (isscalar(tsam) && (imag(tsam) == 0) )) || (tsam < 0) ) ! error("tsam must be a positive real scalar") endif outsys.num = num; --- 61,93 ---- function outsys = tf (num, den, tsam, inname, outname) ## Test for the correct number of input arguments ! if (nargin < 2 || nargin > 5) print_usage (); endif ## check input format ! if (! ((isvector (num) || isscalar (num)) ! && (isvector (den) || isscalar (den)))) ! error ("num (%dx%d) and den (%dx%d) must be vectors", ! rows (num), columns (num), rows (den), columns (den)); endif ## strip leading zero coefficients num = __tfl__ (num); den = __tfl__ (den); ! if (length (num) > length (den)) ! error ("# of poles (%d) < # of zeros (%d)", length(den)-1, length(num)-1); endif ## check sampling interval (if any) ! if (nargin <= 2) ! tsam = 0; # default ! elseif (isempty (tsam)) ! tsam = 0; ! endif ! if (! (isscalar (tsam) && imag (tsam) == 0) || tsam < 0) ! error ("tsam must be a positive real scalar") endif outsys.num = num; *************** *** 97,108 **** ## Set defaults outsys.tsam = tsam; ! outsys.n = length(den)-1; outsys.nz = 0; outsys.yd = 0; # assume discrete-time ## check discrete time ! if(tsam > 0) ! [outsys.n,outsys.nz] = swap(outsys.n, outsys.nz); outsys.yd = 1; endif --- 98,109 ---- ## Set defaults outsys.tsam = tsam; ! outsys.n = length (den) - 1; outsys.nz = 0; outsys.yd = 0; # assume discrete-time ## check discrete time ! if (tsam > 0) ! [outsys.n, outsys.nz] = swap (outsys.n, outsys.nz); outsys.yd = 1; endif *************** *** 113,143 **** ## Set name of input if (nargin > 3) ## make sure it's a cell array of a single string ! if(!isempty(inname)) ! if(!iscell(inname)) inname = {inname}; endif ! if( !is_signal_list(inname) ) ! error("inname must be a string or cell array of strings"); endif ! if(length(inname) > 1) ! warning("tf: %d input names provided; first used",length(inname)); inname = inname(1); endif ! outsys = syssetsignals(outsys,"in",inname); endif endif ## Set name of output if (nargin > 4) ! if(!isempty(outname)) ! if(!iscell(outname)) outname = {outname}; endif ! if(!is_signal_list(outname)) ! error("outname must be a string or a cell array of strings"); endif ! if(length(outname) > 1) ! warning("tf: %d output names provided; first used",length(outname)); outname = outname(1); endif ! outsys = syssetsignals(outsys,"out",outname); endif endif --- 114,148 ---- ## Set name of input if (nargin > 3) ## make sure it's a cell array of a single string ! if (! isempty (inname)) ! if (! iscell (inname)) ! inname = {inname}; ! endif ! if (! is_signal_list (inname)) ! error ("inname must be a string or cell array of strings"); endif ! if (length (inname) > 1) ! warning ("tf: %d input names provided; first used", length (inname)); inname = inname(1); endif ! outsys = syssetsignals (outsys, "in", inname); endif endif ## Set name of output if (nargin > 4) ! if (! isempty (outname)) ! if (! iscell (outname)) ! outname = {outname}; ! endif ! if (! is_signal_list (outname)) ! error ("outname must be a string or a cell array of strings"); endif ! if (length (outname) > 1) ! warning ("tf: %d output names provided; first used", length(outname)); outname = outname(1); endif ! outsys = syssetsignals (outsys, "out", outname); endif endif diff -cNr octave-2.9.16/scripts/control/system/tf2ss.m octave-2.9.17/scripts/control/system/tf2ss.m *** octave-2.9.16/scripts/control/system/tf2ss.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/tf2ss.m Thu Nov 8 15:26:32 2007 *************** *** 61,108 **** function [a, b, c, d] = tf2ss (num, den) ! if(nargin != 2) error("tf2ss: wrong number of input arguments") ! elseif(isempty(num)) error("tf2ss: empty numerator"); ! elseif(isempty(den)) error("tf2ss: empy denominator"); ! elseif(!isvector(num)) ! error(sprintf("num(%dx%d) must be a vector",rows(num),columns(num))); ! elseif(!isvector(den)) ! error(sprintf("den(%dx%d) must be a vector",rows(den),columns(den))); endif ## strip leading zeros from num, den ! nz = find(num != 0); ! if(isempty(nz)) num = 0; ! else num = num(nz(1):length(num)); endif ! nz = find(den != 0); ! if(isempty(nz)) error("denominator is 0."); ! else den = den(nz(1):length(den)); endif ## force num, den to be row vectors ! num = vec(num)'; den = vec(den)'; ! nn = length(num); nd = length(den); ! if(nn > nd) error(sprintf("deg(num)=%d > deg(den)= %d",nn,nd)); endif ## Check sizes ! if (nd == 1) a = []; b = []; c = []; d = num(:,1) / den(1); else ## Pad num so that length(num) = length(den) ! if (nd-nn > 0) num = [zeros(1,nd-nn), num]; endif ## Normalize the numerator and denominator vector w.r.t. the leading ## coefficient ! d1 = den(1); num = num / d1; den = den(2:nd)/d1; sw = nd-1:-1:1; ## Form the A matrix ! if(nd > 2) a = [zeros(nd-2,1),eye(nd-2,nd-2);-den(sw)]; ! else a = -den(sw); endif ## Form the B matrix ! b = zeros(nd-1,1); b(nd-1,1) = 1; ## Form the C matrix ! c = num(:,2:nd)-num(:,1)*den; c = c(:,sw); ## Form the D matrix d = num(:,1); --- 61,132 ---- function [a, b, c, d] = tf2ss (num, den) ! if (nargin != 2) ! print_usage (); ! elseif (isempty (num)) ! error ("tf2ss: empty numerator"); ! elseif (isempty (den)) ! error ("tf2ss: empy denominator"); ! elseif (! isvector (num)) ! error ("num(%dx%d) must be a vector", rows (num), columns (num)); ! elseif (! isvector (den)) ! error ("den(%dx%d) must be a vector", rows (den), columns (den)); endif ## strip leading zeros from num, den ! nz = find (num != 0); ! if (isempty (nz)) ! num = 0; ! else ! num = num(nz(1):length(num)); ! endif ! nz = find (den != 0); ! if (isempty (nz)) ! error ("denominator is 0."); ! else ! den = den(nz(1):length(den)); ! endif ## force num, den to be row vectors ! num = vec (num)'; ! den = vec (den)'; ! nn = length (num); ! nd = length (den); ! if (nn > nd) ! error ("deg(num)=%d > deg(den)= %d", nn, nd); ! endif ## Check sizes ! if (nd == 1) ! a = b = c = []; ! d = num(:,1) / den(1); else ## Pad num so that length(num) = length(den) ! if (nd-nn > 0) ! num = [zeros(1,nd-nn), num]; ! endif ## Normalize the numerator and denominator vector w.r.t. the leading ## coefficient ! d1 = den(1); ! num = num / d1; ! den = den(2:nd)/d1; sw = nd-1:-1:1; ## Form the A matrix ! if (nd > 2) ! a = [zeros(nd-2,1), eye(nd-2,nd-2); -den(sw)]; ! else ! a = -den(sw); ! endif ## Form the B matrix ! b = zeros (nd-1, 1); ! b(nd-1,1) = 1; ## Form the C matrix ! c = num(:,2:nd)-num(:,1)*den; ! c = c(:,sw); ## Form the D matrix d = num(:,1); diff -cNr octave-2.9.16/scripts/control/system/tf2sys.m octave-2.9.17/scripts/control/system/tf2sys.m *** octave-2.9.16/scripts/control/system/tf2sys.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/tf2sys.m Thu Nov 8 15:18:26 2007 *************** *** 63,70 **** ## name changed to tf Feb 2004 function outsys = tf2sys (varargin) ! ! warning("tf2sys is deprecated. Use tf() instead."); ! outsys = tf(varargin{:}); endfunction --- 63,70 ---- ## name changed to tf Feb 2004 function outsys = tf2sys (varargin) ! ! warning ("tf2sys is deprecated. Use tf instead."); ! outsys = tf (varargin{:}); endfunction diff -cNr octave-2.9.16/scripts/control/system/tfout.m octave-2.9.17/scripts/control/system/tfout.m *** octave-2.9.16/scripts/control/system/tfout.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/tfout.m Fri Nov 9 14:34:17 2007 *************** *** 30,59 **** function tfout (num, denom, x) ! if (nargin < 2 ) | (nargin > 3) | (nargout != 0 ) print_usage (); endif ! if ( (!isvector(num)) | (!isvector(denom)) ) ! error("tfout: first two argument must be vectors"); endif if (nargin == 2) x = "s"; ! elseif( ! ischar(x) ) ! error("tfout: third argument must be a string"); endif ! numstring = polyout(num,x); ! denomstring = polyout(denom,x); ! len = max(length(numstring),length(denomstring)); ! if(len > 0) ! y = strrep(blanks(len)," ","-"); ! disp(numstring) ! disp(y) ! disp(denomstring) else error ("tfout: empty transfer function") ! end endfunction --- 30,59 ---- function tfout (num, denom, x) ! if (nargin < 2 || nargin > 3) print_usage (); endif ! if (! isvector (num) || ! isvector (denom)) ! error ("tfout: first two argument must be vectors"); endif if (nargin == 2) x = "s"; ! elseif (! ischar (x)) ! error ("tfout: third argument must be a string"); endif ! numstring = polyout (num, x); ! denomstring = polyout (denom, x); ! len = max (length (numstring), length (denomstring)); ! if (len > 0) ! y = strrep (blanks (len), " ", "-"); ! disp (numstring) ! disp (y) ! disp (denomstring) else error ("tfout: empty transfer function") ! endif endfunction diff -cNr octave-2.9.16/scripts/control/system/ugain.m octave-2.9.17/scripts/control/system/ugain.m *** octave-2.9.16/scripts/control/system/ugain.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/ugain.m Thu Nov 8 11:25:44 2007 *************** *** 31,37 **** function outsys = ugain (n) ! if (nargin != 1 || nargout > 1) print_usage (); endif outsys = ss ([], [], [], eye (n)); --- 31,37 ---- function outsys = ugain (n) ! if (nargin != 1) print_usage (); endif outsys = ss ([], [], [], eye (n)); diff -cNr octave-2.9.16/scripts/control/system/zp.m octave-2.9.17/scripts/control/system/zp.m *** octave-2.9.16/scripts/control/system/zp.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/zp.m Thu Nov 8 15:18:26 2007 *************** *** 59,92 **** function outsys = zp (zer, pol, k, tsam, inname, outname) ## Test for the correct number of input arguments ! if ((nargin < 3) || (nargin > 6)) print_usage (); endif ## check input format ! if( ! (isvector(zer) | isempty(zer) ) ) ! error("zer must be a vector or empty"); endif ! if(!isempty(zer)) ! zer = reshape(zer,1,length(zer)); # make it a row vector endif ! if( ! (isvector(pol) | isempty(pol))) ! error("pol must be a vector"); endif ! if(!isempty(pol)) ! pol = reshape(pol,1,length(pol)); endif ! if (! isscalar(k)) ! error("k must be a scalar"); endif ## Test proper numbers of poles and zeros. The number of poles must be ## greater than or equal to the number of zeros. ! if (length(zer) > length(pol)) ! error(["number of poles (", num2str(length(pol)), ... ! ") < number of zeros (", num2str(length(zer)),")"]); endif ## Set the system transfer function --- 59,92 ---- function outsys = zp (zer, pol, k, tsam, inname, outname) ## Test for the correct number of input arguments ! if (nargin < 3 || nargin > 6) print_usage (); endif ## check input format ! if (! (isvector (zer) || isempty (zer))) ! error ("zer must be a vector or empty"); endif ! if (! isempty (zer)) ! zer = reshape (zer, 1, length (zer)); # make it a row vector endif ! if (! (isvector (pol) || isempty (pol))) ! error ("pol must be a vector"); endif ! if (! isempty (pol)) ! pol = reshape (pol, 1, length (pol)); endif ! if (! isscalar (k)) ! error ("k must be a scalar"); endif ## Test proper numbers of poles and zeros. The number of poles must be ## greater than or equal to the number of zeros. ! if (length (zer) > length (pol)) ! error ("number of poles (%d) < number of zeros (%d)", ! length (pol), length (zer)); endif ## Set the system transfer function *************** *** 99,117 **** ## Set defaults outsys.tsam = 0; ! outsys.n = length(pol); outsys.nz = 0; outsys.yd = 0; # assume (for now) continuous time outputs ## Set the type of system if (nargin > 3) ! if( !isscalar(tsam) ) ! error("tsam must be a nonnegative scalar"); endif if (tsam < 0) ! error("sampling time must be positve") elseif (tsam > 0) ! [outsys.n,outsys.nz] = swap(outsys.n, outsys.nz); outsys.yd = 1; # discrete-time output endif --- 99,117 ---- ## Set defaults outsys.tsam = 0; ! outsys.n = length (pol); outsys.nz = 0; outsys.yd = 0; # assume (for now) continuous time outputs ## Set the type of system if (nargin > 3) ! if (! isscalar (tsam)) ! error ("tsam must be a nonnegative scalar"); endif if (tsam < 0) ! error ("sampling time must be positve") elseif (tsam > 0) ! [outsys.n, outsys.nz] = swap (outsys.n, outsys.nz); outsys.yd = 1; # discrete-time output endif *************** *** 125,136 **** ## Set name of input if (nargin > 4) ## make sure its a string ! if(!isempty(inname)) ! if(!iscell(inname)) inname = {inname}; endif ! if(!is_signal_list(inname)) ! error("inname must be a single signal name"); endif outsys.inname = inname(1); endif --- 125,136 ---- ## Set name of input if (nargin > 4) ## make sure its a string ! if (! isempty (inname)) ! if (! iscell (inname)) inname = {inname}; endif ! if (! is_signal_list (inname)) ! error ("inname must be a single signal name"); endif outsys.inname = inname(1); endif *************** *** 138,149 **** ## Set name of output if (nargin > 5) ! if(!isempty(outname)) ! if(!iscell(outname)) outname = {outname}; endif ! if(!is_signal_list(outname)) ! error("outname must be a single signal name"); endif outsys.outname = outname(1); endif --- 138,149 ---- ## Set name of output if (nargin > 5) ! if (! isempty (outname)) ! if (! iscell (outname)) outname = {outname}; endif ! if (! is_signal_list (outname)) ! error ("outname must be a single signal name"); endif outsys.outname = outname(1); endif diff -cNr octave-2.9.16/scripts/control/system/zp2ss.m octave-2.9.17/scripts/control/system/zp2ss.m *** octave-2.9.16/scripts/control/system/zp2ss.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/zp2ss.m Thu Nov 8 13:54:10 2007 *************** *** 61,146 **** function [a, b, c, d] = zp2ss (zer, pol, k) ! if(nargin != 3) ! error("Incorrect number of input arguments"); endif ! ! if(! (isvector(zer) | isempty(zer)) ) ! error(["zer(",num2str(rows(zer)),",",num2str(columns(zer)), ... ! ") should be a vector"]); ! elseif(! (isvector(pol) | isempty(pol) ) ) ! error(["pol(",num2str(rows(pol)),",",num2str(columns(pol)), ... ! ") should be a vector"]); ! elseif(! isscalar(k)) ! error(["k(",num2str(rows(k)),",",num2str(columns(k)), ... ! ") should be a scalar"]); ! elseif( k != real(k)) ! warning("zp2ss: k is complex") endif ! zpsys = ss (zeros (0, 0), zeros (0, 1), zeros (1, 0), k); ! ! ## Find the number of zeros and the number of poles ! nzer=length(zer); ! npol =length(pol); ! ! if(nzer > npol) ! error([num2str(nzer)," zeros, exceeds number of poles=",num2str(npol)]); endif ! ## Sort to place complex conjugate pairs together ! zer=sortcom(zer); ! pol=sortcom(pol); ! ! ## construct the system as a series connection of poles and zeros ! ## problem: poles and zeros may come in conjugate pairs, and not ! ## matched up! ! ! ## approach: remove poles/zeros from the list as they are included in ! ## the ss system ! ! while(length(pol)) ! ! ## search for complex poles, zeros ! cpol=[]; czer = []; ! if(!isempty(pol)) ! cpol = find(imag(pol) != 0); ! endif ! if(!isempty(zer)) ! czer = find(imag(zer) != 0); ! endif ! ! if(isempty(cpol) & isempty(czer)) ! pcnt = 1; ! else ! pcnt = 2; ! endif ! ! num=1; # assume no zeros left. ! switch(pcnt) ! case(1) ## real pole/zero combination ! if(length(zer)) num = [1, -zer(1)]; zer = zer(2:length(zer)); endif den = [1, -pol(1)]; pol = pol(2:length(pol)); ! case(2) ## got a complex pole or zero, need two roots (if available) ! if(length(zer) > 1) [num, zer] = __zp2ssg2__ (zer); # get two zeros ! elseif(length(zer) == 1) num = [1, -zer]; # use last zero (better be real!) zer = []; endif [den, pol] = __zp2ssg2__ (pol); # get two poles otherwise ! error(["pcnt = ",num2str(pcnt)]) endswitch ## pack tf into system form and put in series with earlier realization ! zpsys1 = tf(num,den,0,"u","yy"); ## change names to avoid warning messages from sysgroup zpsys = syssetsignals (zpsys, "in", "u1", 1); --- 61,144 ---- function [a, b, c, d] = zp2ss (zer, pol, k) ! if (nargin != 3) ! print_usage (); ! endif ! ! if (! (isvector (zer) || isempty (zer))) ! error ("zer(%d,%d) should be a vector", rows (zer), columns (zer)); ! elseif (! (isvector (pol) || isempty (pol))) ! error ("pol(%d,%d) should be a vector", rows (pol), columns (pol)); ! elseif (! isscalar(k)) ! error ("k(%d,%d) should be a scalar", rows (k), columns (k)); ! elseif (k != real (k)) ! warning ("zp2ss: k is complex") ! endif ! ! zpsys = ss (zeros (0, 0), zeros (0, 1), zeros (1, 0), k); ! ! ## Find the number of zeros and the number of poles ! nzer = length (zer); ! npol = length (pol); ! ! if (nzer > npol) ! error ("%d zeros, exceeds number of poles=%d", nzer, npol); ! endif ! ! ## Sort to place complex conjugate pairs together ! zer = sortcom (zer); ! pol = sortcom (pol); ! ! ## construct the system as a series connection of poles and zeros ! ## problem: poles and zeros may come in conjugate pairs, and not ! ## matched up! ! ! ## approach: remove poles/zeros from the list as they are included in ! ## the ss system ! ! while (length (pol)) ! ! ## search for complex poles, zeros ! cpol = []; ! czer = []; ! if (! isempty (pol)) ! cpol = find (imag (pol) != 0); endif ! if (! isempty (zer)) ! czer = find (imag (zer) != 0); endif ! if (isempty (cpol) && isempty (czer)) ! pcnt = 1; ! else ! pcnt = 2; endif ! num = 1; # assume no zeros left. ! switch (pcnt) ! case 1 ## real pole/zero combination ! if (length (zer)) num = [1, -zer(1)]; zer = zer(2:length(zer)); endif den = [1, -pol(1)]; pol = pol(2:length(pol)); ! case 2 ## got a complex pole or zero, need two roots (if available) ! if (length (zer) > 1) [num, zer] = __zp2ssg2__ (zer); # get two zeros ! elseif (length (zer) == 1) num = [1, -zer]; # use last zero (better be real!) zer = []; endif [den, pol] = __zp2ssg2__ (pol); # get two poles otherwise ! error ("pcnt = %d", pcnt); endswitch ## pack tf into system form and put in series with earlier realization ! zpsys1 = tf (num, den, 0, "u", "yy"); ## change names to avoid warning messages from sysgroup zpsys = syssetsignals (zpsys, "in", "u1", 1); *************** *** 150,160 **** nn1 = sysdimensions (zpsys1); zpsys1 = syssetsignals (zpsys1, "st", __sysdefioname__ (nn1, "xx")); ! zpsys = sysmult(zpsys,zpsys1); endwhile ! [a,b,c,d] = sys2ss(zpsys); endfunction --- 148,158 ---- nn1 = sysdimensions (zpsys1); zpsys1 = syssetsignals (zpsys1, "st", __sysdefioname__ (nn1, "xx")); ! zpsys = sysmult (zpsys, zpsys1); endwhile ! [a, b, c, d] = sys2ss (zpsys); endfunction diff -cNr octave-2.9.16/scripts/control/system/zp2sys.m octave-2.9.17/scripts/control/system/zp2sys.m *** octave-2.9.16/scripts/control/system/zp2sys.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/zp2sys.m Thu Nov 8 15:18:26 2007 *************** *** 61,67 **** function outsys = zp2sys ( varargin ) ! warning("zp2sys is deprecated. Use zp() instead."); ! outsys = zp(varargin{:}); endfunction --- 61,67 ---- function outsys = zp2sys ( varargin ) ! warning ("zp2sys is deprecated. Use zp instead."); ! outsys = zp (varargin{:}); endfunction diff -cNr octave-2.9.16/scripts/control/system/zp2tf.m octave-2.9.17/scripts/control/system/zp2tf.m *** octave-2.9.16/scripts/control/system/zp2tf.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/zp2tf.m Thu Nov 8 15:18:26 2007 *************** *** 37,75 **** function [num, den] = zp2tf (zer, pol, k) ## Find out whether data was entered as a row or a column vector and ## convert to a column vector if necessary. ! [rp,cp] = size(pol); ! [rz,cz] = size(zer); ! if(!(isvector(zer) | isempty(zer)) ) ! error(sprintf("zer(%dx%d) must be a vector",rz,cz)); ! elseif(!(isvector(pol) | isempty(pol)) ) ! error(sprintf("pol(%dx%d) must be a vector",rp,cp)); ! elseif(length(zer) > length(pol)) ! error(sprintf("zer(%dx%d) longer than pol(%dx%d)",rz,cz,rp,cp)); endif ## initialize converted polynomials ! num = k; den = 1; ## call __zp2ssg2__ if there are complex conjugate pairs left, otherwise ## construct real zeros one by one. Repeat for poles. ! while(!isempty(zer)) ! if( max(abs(imag(zer))) ) [poly, zer] = __zp2ssg2__ (zer); ! else poly = [1, -zer(1)]; ! zer = zer(2:length(zer)); endif ! num = conv(num,poly); endwhile ! while(!isempty(pol)) ! if( max(abs(imag(pol))) ) [poly, pol] = __zp2ssg2__ (pol); ! else poly = [1, -pol(1)]; ! pol = pol(2:length(pol)); endif ! den = conv(den,poly); endwhile endfunction --- 37,86 ---- function [num, den] = zp2tf (zer, pol, k) + if (nargin != 3) + print_usage (); + endif + ## Find out whether data was entered as a row or a column vector and ## convert to a column vector if necessary. ! [rp, cp] = size (pol); ! [rz, cz] = size (zer); ! if (! (isvector (zer) || isempty (zer))) ! error ("zer(%dx%d) must be a vector", rz, cz); ! elseif (! (isvector (pol) || isempty (pol))) ! error ("pol(%dx%d) must be a vector", rp, cp); ! elseif (length (zer) > length (pol)) ! error ("zer(%dx%d) longer than pol(%dx%d)", rz, cz, rp, cp); endif ## initialize converted polynomials ! num = k; ! den = 1; ## call __zp2ssg2__ if there are complex conjugate pairs left, otherwise ## construct real zeros one by one. Repeat for poles. ! while (! isempty (zer)) ! if (max (abs (imag (zer)))) ! [poly, zer] = __zp2ssg2__ (zer); ! else ! poly = [1, -zer(1)]; ! zer = zer(2:length(zer)); ! endif ! num = conv (num, poly); endwhile ! while (! isempty (pol)) ! if (max (abs (imag (pol)))) ! [poly, pol] = __zp2ssg2__ (pol); ! else ! poly = [1, -pol(1)]; ! pol = pol(2:length(pol)); ! endif ! den = conv (den, poly); endwhile endfunction diff -cNr octave-2.9.16/scripts/control/system/zpout.m octave-2.9.17/scripts/control/system/zpout.m *** octave-2.9.16/scripts/control/system/zpout.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/system/zpout.m Thu Nov 8 15:18:26 2007 *************** *** 30,103 **** function zpout (zer, pol, k, x) ! if (nargin < 3 ) | (nargin > 4) | (nargout != 0 ) print_usage (); endif ! if( !(isvector(zer) | isempty(zer)) | !(isvector(pol) | isempty(pol)) ) ! error("zer, pol must be vectors or empty"); endif ! if(!isscalar(k)) error("zpout: argument k must be a scalar.") endif if (nargin == 3) x = "s"; ! elseif( ! ischar(x) ) ! error("zpout: third argument must be a string"); endif ! numstring = num2str(k); ! if(length(zer)) ## find roots at z,s = 0 ! nzr = sum(zer == 0); ! if(nzr) ! if(nzr > 1) ! numstring = [numstring,sprintf(" %s^%d",x,nzr)]; ! else ! numstring = [numstring,sprintf(" %s",x)]; ! endif endif ! zer = sortcom(-zer); ! for ii=1:length(zer) ! if(zer(ii) != 0) ! numstring = [numstring,sprintf(" (%s %s)",x,com2str(zer(ii),1) ) ]; ! endif endfor endif ! if(length(pol)) ## find roots at z,s = 0 ! nzr = sum(pol == 0); ! if(nzr) ! if(nzr > 1) ! denomstring = [sprintf("%s^%d",x,nzr)]; ! else ! denomstring = [sprintf("%s",x)]; ! endif else ! denomstring = " "; endif ! pol = sortcom(-pol); ! for ii=1:length(pol) ! if(pol(ii) != 0) ! denomstring = [denomstring,sprintf(" (%s %s)",x,com2str(pol(ii),1))]; ! endif endfor endif ! len = max(length(numstring),length(denomstring)); if(len > 0) ! y = strrep(blanks(len)," ","-"); ! disp(numstring) ! if(length(denomstring)) ! disp(y) ! disp(denomstring) endif else error ("zpout: empty transfer function") ! end endfunction --- 30,105 ---- function zpout (zer, pol, k, x) ! if (nargin < 3 || nargin > 4) print_usage (); endif ! if (! (isvector (zer) || isempty (zer)) ! || ! (isvector (pol) || isempty(pol))) ! error ("zer, pol must be vectors or empty"); endif ! if (! isscalar(k)) error("zpout: argument k must be a scalar.") endif if (nargin == 3) x = "s"; ! elseif (! ischar (x)) ! error ("zpout: third argument must be a string"); endif ! numstring = num2str (k); ! if (length (zer)) ## find roots at z,s = 0 ! nzr = sum (zer == 0); ! if (nzr) ! if (nzr > 1) ! numstring = sprintf ("%s %s^%d", numstring, x, nzr); ! else ! numstring = strcat (numstring, x); ! endif endif ! zer = sortcom (-zer); ! for ii = 1:length(zer) ! if (zer(ii) != 0) ! numstring = sprintf ("%s (%s %s)", numstring, x, com2str (zer(ii), 1)); ! endif endfor endif ! if (length (pol)) ## find roots at z,s = 0 ! nzr = sum (pol == 0); ! if (nzr) ! if (nzr > 1) ! denomstring = sprintf("%s^%d", x, nzr); ! else ! denomstring = sprintf ("%s", x); ! endif else ! denomstring = " "; endif ! pol = sortcom (-pol); ! for ii = 1:length(pol) ! if (pol(ii) != 0) ! denomstring = sprintf ("%s (%s %s)", denomstring, x, ! com2str (pol(ii), 1)); ! endif endfor endif ! len = max (length (numstring), length (denomstring)); if(len > 0) ! y = strrep (blanks (len), " ", "-"); ! disp (numstring) ! if (length (denomstring)) ! disp (y) ! disp (denomstring) endif else error ("zpout: empty transfer function") ! endif endfunction diff -cNr octave-2.9.16/scripts/control/util/__outlist__.m octave-2.9.17/scripts/control/util/__outlist__.m *** octave-2.9.16/scripts/control/util/__outlist__.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/__outlist__.m Thu Nov 8 11:17:34 2007 *************** *** 49,81 **** function str_val = __outlist__ (name_list, tabchar, yd, ilist) ! if( nargin < 1 | nargin > 4 ) print_usage (); endif ! m = length(name_list); ! if(nargin < 4) ilist = 1:m; endif ! if(nargin ==1) tabchar = ""; endif ! if(nargin < 3) ! yd = zeros(1,m); ! elseif(isempty(yd)) ! yd = zeros(1,m); endif str_val = ""; ! dstr = {""," (discrete)"}; ! if((m >= 1) && (iscell(name_list))) ! for ii=1:m ! str_val = sprintf("%s%s%d: %s%s\n",str_val,tabchar, ilist(ii), ... ! name_list{ii},dstr{yd(ii)+1}); endfor else ! str_val = sprintf("%sNone",tabchar); endif endfunction --- 49,81 ---- function str_val = __outlist__ (name_list, tabchar, yd, ilist) ! if (nargin < 1 || nargin > 4) print_usage (); endif ! m = length (name_list); ! if (nargin < 4) ilist = 1:m; endif ! if (nargin == 1) tabchar = ""; endif ! if (nargin < 3) ! yd = zeros (1, m); ! elseif (isempty (yd)) ! yd = zeros (1, m); endif str_val = ""; ! dstr = {"", " (discrete)"}; ! if (m >= 1 && iscell (name_list)) ! for ii = 1:m ! str_val = sprintf ("%s%s%d: %s%s\n", str_val, tabchar, ilist(ii), ! name_list{ii}, dstr{yd(ii)+1}); endfor else ! str_val = sprintf ("%sNone", tabchar); endif endfunction diff -cNr octave-2.9.16/scripts/control/util/__zgpbal__.m octave-2.9.17/scripts/control/util/__zgpbal__.m *** octave-2.9.16/scripts/control/util/__zgpbal__.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/__zgpbal__.m Thu Nov 8 11:17:34 2007 *************** *** 47,113 **** function retsys = __zgpbal__ (Asys) ! if( (nargin != 1) | (!isstruct(Asys))) print_usage (); endif ! Asys = sysupdate(Asys,"ss"); ! [a,b,c,d] = sys2ss(Asys); ! [nn,mm,pp] = abcddim(a,b,c,d); np1 = nn+1; nmp = nn+mm+pp; ## set up log vector zz, incidence matrix ff ! zz = zginit(a,b,c,d); ## disp("__zgpbal__: zginit returns") ## zz ## disp("/__zgpbal__") ! if (norm(zz)) ## generalized conjugate gradient approach ! xx = zgscal(a,b,c,d,zz,nn,mm,pp); ! for i=1:nmp ! xx(i) = floor(xx(i)+0.5); xx(i) = 2.0^xx(i); endfor ## now scale a ## block 1: a = sigma a inv(sigma) ! for i=1:nn a(i,1:nn) = a(i,1:nn)*xx(i); a(1:nn,i) = a(1:nn,i)/xx(i); endfor ## block 2: b= sigma a phi ! for j=1:mm j1 = j+nn; b(1:nn,j) = b(1:nn,j)*xx(j1); endfor ! for i=1:nn b(i,1:mm) = b(i,1:mm)*xx(i); endfor ! for i=1:pp i1 = i+nn+mm; ## block 3: c = psi C inv(sigma) c(i,1:nn) = c(i,1:nn)*xx(i1); endfor ! for j=1:nn c(1:pp,j) = c(1:pp,j)/xx(j); endfor ## block 4: d = psi D phi ! for j=1:mm j1 = j+nn; d(1:pp,j) = d(1:pp,j)*xx(j1); endfor ! for i=1:pp i1 = i + nn + mm; d(i,1:mm) = d(i,1:mm)*xx(i1); endfor endif ! retsys = ss(a,b,c,d); ! endfunction --- 47,113 ---- function retsys = __zgpbal__ (Asys) ! if (nargin != 1 || ! isstruct (Asys)) print_usage (); endif ! Asys = sysupdate (Asys, "ss"); ! [a, b, c, d] = sys2ss (Asys); ! [nn, mm, pp] = abcddim (a, b, c, d); np1 = nn+1; nmp = nn+mm+pp; ## set up log vector zz, incidence matrix ff ! zz = zginit (a, b, c, d); ## disp("__zgpbal__: zginit returns") ## zz ## disp("/__zgpbal__") ! if (norm (zz)) ## generalized conjugate gradient approach ! xx = zgscal (a, b, c, d, zz, nn, mm, pp); ! for i = 1:nmp ! xx(i) = floor (xx(i)+0.5); xx(i) = 2.0^xx(i); endfor ## now scale a ## block 1: a = sigma a inv(sigma) ! for i = 1:nn a(i,1:nn) = a(i,1:nn)*xx(i); a(1:nn,i) = a(1:nn,i)/xx(i); endfor ## block 2: b= sigma a phi ! for j = 1:mm j1 = j+nn; b(1:nn,j) = b(1:nn,j)*xx(j1); endfor ! for i = 1:nn b(i,1:mm) = b(i,1:mm)*xx(i); endfor ! for i = 1:pp i1 = i+nn+mm; ## block 3: c = psi C inv(sigma) c(i,1:nn) = c(i,1:nn)*xx(i1); endfor ! for j = 1:nn c(1:pp,j) = c(1:pp,j)/xx(j); endfor ## block 4: d = psi D phi ! for j = 1:mm j1 = j+nn; d(1:pp,j) = d(1:pp,j)*xx(j1); endfor ! for i = 1:pp i1 = i + nn + mm; d(i,1:mm) = d(i,1:mm)*xx(i1); endfor endif ! retsys = ss (a, b, c, d); + endfunction diff -cNr octave-2.9.16/scripts/control/util/axis2dlim.m octave-2.9.17/scripts/control/util/axis2dlim.m *** octave-2.9.16/scripts/control/util/axis2dlim.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/axis2dlim.m Thu Nov 8 11:17:34 2007 *************** *** 39,72 **** function axvec = axis2dlim (axdata) ! if(isempty(axdata)) axdata = 0; endif ## compute axis limits ! minv = min(axdata); ! maxv = max(axdata); delv = (maxv-minv)/2; # breadth of the plot midv = (minv + maxv)/2; # midpoint of the plot axmid = [midv(1), midv(1), midv(2), midv(2)]; ! axdel = [-0.1, 0.1,-0.1,0.1]; # default plot width (if less than 2-d data) ! if(max(delv) == 0) ! if(midv(1) != 0) ! axdel(1:2) = [-0.1*midv(1),0.1*midv(1)]; endif ! if(midv(2) != 0) ! axdel(3:4) = [-0.1*midv(2),0.1*midv(2)]; endif else ## they're at least one-dimensional tolv = max(1e-8, 1e-8*abs(midv)); ! if(abs(delv(1)) >= tolv(1)) axdel(1:2) = 1.1*[-delv(1),delv(1)]; endif ! if(abs(delv(2)) >= tolv(2)) axdel(3:4) = 1.1*[-delv(2),delv(2)]; endif endif axvec = axmid + axdel; - endfunction --- 39,72 ---- function axvec = axis2dlim (axdata) ! if (nargin < 1 || isempty (axdata)) axdata = 0; endif ## compute axis limits ! minv = min (axdata); ! maxv = max (axdata); delv = (maxv-minv)/2; # breadth of the plot midv = (minv + maxv)/2; # midpoint of the plot axmid = [midv(1), midv(1), midv(2), midv(2)]; ! axdel = [-0.1, 0.1, -0.1, 0.1]; # default plot width (if less than 2-d data) ! if (max (delv) == 0) ! if (midv(1) != 0) ! axdel(1:2) = [-0.1*midv(1), 0.1*midv(1)]; endif ! if (midv(2) != 0) ! axdel(3:4) = [-0.1*midv(2), 0.1*midv(2)]; endif else ## they're at least one-dimensional tolv = max(1e-8, 1e-8*abs(midv)); ! if (abs (delv(1)) >= tolv(1)) axdel(1:2) = 1.1*[-delv(1),delv(1)]; endif ! if (abs (delv(2)) >= tolv(2)) axdel(3:4) = 1.1*[-delv(2),delv(2)]; endif endif axvec = axmid + axdel; + endfunction diff -cNr octave-2.9.16/scripts/control/util/prompt.m octave-2.9.17/scripts/control/util/prompt.m *** octave-2.9.16/scripts/control/util/prompt.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/prompt.m Thu Nov 8 11:17:34 2007 *************** *** 41,47 **** print_usage (); elseif (nargin == 0) str = "\n ---- Press a key to continue ---"; ! elseif (! ischar (str) ) error ("prompt: input must be a string"); endif --- 41,47 ---- print_usage (); elseif (nargin == 0) str = "\n ---- Press a key to continue ---"; ! elseif (! ischar (str)) error ("prompt: input must be a string"); endif diff -cNr octave-2.9.16/scripts/control/util/sortcom.m octave-2.9.17/scripts/control/util/sortcom.m *** octave-2.9.16/scripts/control/util/sortcom.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/sortcom.m Thu Nov 8 11:17:34 2007 *************** *** 53,94 **** function [yy, idx] = sortcom (xx, opt) ! if( nargin < 1 | nargin > 2 ) print_usage (); ! elseif( !(isvector(xx) | isempty(xx) )) ! error("sortcom: first argument must be a vector"); endif ! if(nargin == 1) opt = "re"; else ! if (!ischar(opt)) ! error("sortcom: second argument must be a string"); endif endif ! if(isempty(xx)) yy = idx = []; else ! if(strcmp(opt,"re")) datavec = real(xx); ! elseif(strcmp(opt,"im")) datavec = imag(xx); ! elseif(strcmp(opt,"mag")) datavec = abs(xx); ! else error(["sortcom: invalid option = ", opt]) endif ! [datavec,idx] = sort(datavec); yy= xx(idx); ! if(strcmp(opt,"re") | strcmp(opt,"mag")) ## sort so that complex conjugate pairs appear together ! ddiff = diff(datavec); ! zidx = find(ddiff == 0); ## sort common datavec values ! if(!isempty(zidx)) ! for iv=create_set(datavec(zidx)) ! vidx = find(datavec == iv); ! [vals,imidx] = sort(imag(yy(vidx))); yy(vidx) = yy(vidx(imidx)); idx(vidx) = idx(vidx(imidx)); endfor --- 53,99 ---- function [yy, idx] = sortcom (xx, opt) ! if (nargin < 1 || nargin > 2) print_usage (); ! elseif (! (isvector (xx) || isempty (xx))) ! error ("sortcom: first argument must be a vector"); endif ! if (nargin == 1) ! opt = "re"; else ! if (! ischar (opt)) ! error ("sortcom: second argument must be a string"); endif endif ! if (isempty (xx)) yy = idx = []; else ! if (strcmp (opt, "re")) ! datavec = real (xx); ! elseif (strcmp (opt, "im")) ! datavec = imag (xx); ! elseif (strcmp (opt, "mag")) ! datavec = abs (xx); ! else ! error ("sortcom: invalid option = %s", opt); endif ! [datavec, idx] = sort (datavec); yy= xx(idx); ! if (strcmp (opt, "re") || strcmp (opt, "mag")) ## sort so that complex conjugate pairs appear together ! ddiff = diff (datavec); ! zidx = find (ddiff == 0); ## sort common datavec values ! if (! isempty (zidx)) ! for iv = create_set (datavec(zidx)) ! vidx = find (datavec == iv); ! [vals, imidx] = sort (imag (yy(vidx))); yy(vidx) = yy(vidx(imidx)); idx(vidx) = idx(vidx(imidx)); endfor diff -cNr octave-2.9.16/scripts/control/util/strappend.m octave-2.9.17/scripts/control/util/strappend.m *** octave-2.9.16/scripts/control/util/strappend.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/strappend.m Thu Nov 8 11:25:44 2007 *************** *** 24,30 **** function retval = strappend (strlist, suffix); ! if (nargin != 2 || nargout > 1) print_usage (); elseif (! is_signal_list (strlist)) error ("strlist must be a list of strings (see is_signal_list)"); --- 24,30 ---- function retval = strappend (strlist, suffix); ! if (nargin != 2) print_usage (); elseif (! is_signal_list (strlist)) error ("strlist must be a list of strings (see is_signal_list)"); diff -cNr octave-2.9.16/scripts/control/util/swap.m octave-2.9.17/scripts/control/util/swap.m *** octave-2.9.16/scripts/control/util/swap.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/swap.m Wed Nov 7 21:29:23 2007 *************** *** 31,36 **** --- 31,40 ---- function [a1, b1] = swap (a, b) + if (nargin != 2) + print_usage (); + endif + a1 = b; b1 = a; diff -cNr octave-2.9.16/scripts/control/util/zgfmul.m octave-2.9.17/scripts/control/util/zgfmul.m *** octave-2.9.16/scripts/control/util/zgfmul.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zgfmul.m Thu Nov 8 11:17:34 2007 *************** *** 33,80 **** function y = zgfmul (a, b, c, d, x) ! [n,m] = size(b); ! [p,m1] = size(c); nm = n+m; ! y = zeros(nm+p,1); ## construct F column by column ! for jj=1:n ! Fj = zeros(nm+p,1); ## rows 1:n: F1 ! aridx = complement(jj,find(a(jj,:) != 0)); ! acidx = complement(jj,find(a(:,jj) != 0)); ! bidx = find(b(jj,:) != 0); ! cidx = find(c(:,jj) != 0); Fj(aridx) = Fj(aridx) - 1; # off diagonal entries of F1 Fj(acidx) = Fj(acidx) - 1; ## diagonal entry of F1 ! Fj(jj) = length(aridx)+length(acidx) + length(bidx) + length(cidx); ! if(!isempty(bidx)) Fj(n+bidx) = 1; endif # B' incidence ! if(!isempty(cidx)) Fj(n+m+cidx) = -1; endif # -C incidence y = y + x(jj)*Fj; # multiply by corresponding entry of x endfor ! for jj=1:m ! Fj = zeros(nm+p,1); ! bidx = find(b(:,jj) != 0); ! if(!isempty(bidx)) Fj(bidx) = 1; endif # B incidence ! didx = find(d(:,jj) != 0); ! if(!isempty(didx)) Fj(n+m+didx) = 1; endif # D incidence Fj(n+jj) = length(bidx) + length(didx); # F2 is diagonal y = y + x(n+jj)*Fj; # multiply by corresponding entry of x endfor ! for jj=1:p ! Fj = zeros(nm+p,1); ! cidx = find(c(jj,:) != 0); ! if(!isempty(cidx)) Fj(cidx) = -1; endif # -C' incidence didx = find(d(jj,:) != 0); ! if(!isempty(didx)) Fj(n+didx) = 1; endif # D' incidence ! Fj(n+m+jj) = length(cidx) + length(didx); # F2 is diagonal y = y + x(n+m+jj)*Fj; # multiply by corresponding entry of x endfor --- 33,103 ---- function y = zgfmul (a, b, c, d, x) ! if (nargin != 5) ! print_usage (); ! endif ! ! [n, m] = size (b); ! [p, m1] = size (c); nm = n+m; ! y = zeros (nm+p, 1); ## construct F column by column ! for jj = 1:n ! Fj = zeros (nm+p, 1); ## rows 1:n: F1 ! aridx = complement (jj, find (a(jj,:) != 0)); ! acidx = complement (jj, find (a(:,jj) != 0)); ! bidx = find (b(jj,:) != 0); ! cidx = find (c(:,jj) != 0); Fj(aridx) = Fj(aridx) - 1; # off diagonal entries of F1 Fj(acidx) = Fj(acidx) - 1; ## diagonal entry of F1 ! Fj(jj) = length (aridx) + length (acidx) + length (bidx) + length (cidx); ! ## B' incidence ! if (! isempty (bidx)) ! Fj(n+bidx) = 1; ! endif ! ! ## -C incidence ! if (! isempty (cidx)) ! Fj(n+m+cidx) = -1; ! endif y = y + x(jj)*Fj; # multiply by corresponding entry of x endfor ! for jj = 1:m ! Fj = zeros (nm+p, 1); ! bidx = find (b(:,jj) != 0); ! ## B incidence ! if (! isempty (bidx)) ! Fj(bidx) = 1; ! endif ! didx = find (d(:,jj) != 0); ! ## D incidence ! if (! isempty (didx)) ! Fj(n+m+didx) = 1; ! endif Fj(n+jj) = length(bidx) + length(didx); # F2 is diagonal y = y + x(n+jj)*Fj; # multiply by corresponding entry of x endfor ! for jj = 1:p ! Fj = zeros (nm+p, 1); ! cidx = find (c(jj,:) != 0); ! ## -C' incidence ! if (! isempty (cidx)) ! Fj(cidx) = -1; ! endif didx = find(d(jj,:) != 0); ! ## D' incidence ! if (! isempty (didx)) ! Fj(n+didx) = 1; ! endif ! Fj(n+m+jj) = length (cidx) + length (didx); # F2 is diagonal y = y + x(n+m+jj)*Fj; # multiply by corresponding entry of x endfor diff -cNr octave-2.9.16/scripts/control/util/zgfslv.m octave-2.9.17/scripts/control/util/zgfslv.m *** octave-2.9.16/scripts/control/util/zgfslv.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zgfslv.m Thu Nov 8 11:17:34 2007 *************** *** 27,68 **** function x = zgfslv (n, m, p, b) nmp = n+m+p; ! gam1 = (2*n)+m+p; gam2 = n+p; gam3 = n+m; ! G1 = givens(sqrt(m),-sqrt(p))'; ! G2 = givens(m+p,sqrt(n*(m+p)))'; x = b; ## 1) U1 e^n = sqrt(n)e_1^n ## 2) U2 e^m = sqrt(m)e_1^m ## 3) U3 e^p = sqrt(p)e_1^p ! xdx1 = 1:n; xdx2 = n+(1:m); xdx3 = n+m+(1:p); ! x(xdx1,1) = zgshsr(x(xdx1,1)); ! x(xdx2,1) = zgshsr(x(xdx2,1)); ! x(xdx3,1) = zgshsr(x(xdx3,1)); ## 4) Givens rotations to reduce stray non-zero elements ! idx1 = [n+1,n+m+1]; idx2 = [1,n+1]; x(idx1) = G1'*x(idx1); x(idx2) = G2'*x(idx2); ## 6) Scale x, then back-transform to get x ! en = ones(n,1); em = ones(m,1); ep = ones(p,1); ! lam = [gam1*en;gam2*em;gam3*ep]; lam(1) = n+m+p; lam(n+1) = 1; # dummy value to avoid divide by zero ! lam(n+m+1)=n+m+p; ! x = x ./ lam; x(n+1) = 0; # minimum norm solution ## back transform now. x(idx2) = G2*x(idx2); x(idx1) = G1*x(idx1); ! x(xdx3,1) = zgshsr(x(xdx3,1)); ! x(xdx2,1) = zgshsr(x(xdx2,1)); ! x(xdx1,1) = zgshsr(x(xdx1,1)); endfunction --- 27,82 ---- function x = zgfslv (n, m, p, b) + if (nargin != 4) + print_usage (); + endif + nmp = n+m+p; ! gam1 = (2*n)+m+p; ! gam2 = n+p; ! gam3 = n+m; ! G1 = givens (sqrt (m), -sqrt (p))'; ! G2 = givens (m+p, sqrt (n*(m+p)))'; x = b; ## 1) U1 e^n = sqrt(n)e_1^n ## 2) U2 e^m = sqrt(m)e_1^m ## 3) U3 e^p = sqrt(p)e_1^p ! xdx1 = 1:n; ! xdx2 = n+(1:m); ! xdx3 = n+m+(1:p); ! ! x(xdx1,1) = zgshsr (x(xdx1,1)); ! x(xdx2,1) = zgshsr (x(xdx2,1)); ! x(xdx3,1) = zgshsr (x(xdx3,1)); ## 4) Givens rotations to reduce stray non-zero elements ! idx1 = [n+1, n+m+1]; ! idx2 = [1, n+1]; ! x(idx1) = G1'*x(idx1); x(idx2) = G2'*x(idx2); ## 6) Scale x, then back-transform to get x ! en = ones (n, 1); ! em = ones (m, 1); ! ep = ones (p, 1); ! lam = [gam1*en; gam2*em; gam3*ep]; lam(1) = n+m+p; lam(n+1) = 1; # dummy value to avoid divide by zero ! lam(n+m+1) = n+m+p; ! x = x ./ lam; ! x(n+1) = 0; # minimum norm solution ## back transform now. x(idx2) = G2*x(idx2); x(idx1) = G1*x(idx1); ! x(xdx3,1) = zgshsr (x(xdx3,1)); ! x(xdx2,1) = zgshsr (x(xdx2,1)); ! x(xdx1,1) = zgshsr (x(xdx1,1)); endfunction diff -cNr octave-2.9.16/scripts/control/util/zginit.m octave-2.9.17/scripts/control/util/zginit.m *** octave-2.9.16/scripts/control/util/zginit.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zginit.m Thu Nov 8 11:17:34 2007 *************** *** 34,91 **** function zz = zginit (a, b, c, d) ! [nn,mm] = size(b); ! [pp,mm] = size(d); nmp = nn+mm+pp; ## set up log vector zz ! zz = zeros(nmp,1); ## zz part 1: ! for i=1:nn ## nonzero off diagonal entries of a ! if(nn > 1) ! nidx = complement(i,1:nn); ! a_row_i = a(i,nidx); a_col_i = a(nidx,i); ! arnz = a_row_i(find(a_row_i != 0)); acnz = a_col_i(find(a_col_i != 0)); else arnz = acnz = []; endif ## row of b ! bidx = find(b(i,:) != 0); b_row_i = b(i,bidx); ## column of c ! cidx = find(c(:,i) != 0); c_col_i = c(cidx,i); ## sum the entries ! zz(i) = sum(log(abs(acnz))) - sum(log(abs(arnz))) ... ! - sum(log(abs(b_row_i))) + sum(log(abs(c_col_i))); endfor ## zz part 2: ! bd = [b;d]; ! for i=1:mm i1 = i+nn; ## column of [b;d] ! bdidx = find(bd(:,i) != 0); bd_col_i = bd(bdidx,i); ! zz(i1) = sum(log(abs(bd_col_i))); endfor ## zz part 3: cd = [c, d]; ! for i=1:pp i1 = i+nn+mm; ! cdidx = find(cd(i,:) != 0); cd_row_i = cd(i,cdidx); ! zz(i1) = -sum(log(abs(cd_row_i))); endfor ## now set zz as log base 2 ! zz = zz*(1/log(2)); endfunction --- 34,98 ---- function zz = zginit (a, b, c, d) ! if (nargin != 4) ! print_usage (); ! endif ! ! [nn, mm] = size (b); ! [pp, mm] = size (d); nmp = nn+mm+pp; ## set up log vector zz ! zz = zeros (nmp, 1); ## zz part 1: ! for i = 1:nn ## nonzero off diagonal entries of a ! if (nn > 1) ! nidx = complement (i, 1:nn); ! a_row_i = a(i,nidx); ! a_col_i = a(nidx,i); ! arnz = a_row_i(find (a_row_i != 0)); ! acnz = a_col_i(find (a_col_i != 0)); else arnz = acnz = []; endif ## row of b ! bidx = find (b(i,:) != 0); b_row_i = b(i,bidx); ## column of c ! cidx = find (c(:,i) != 0); c_col_i = c(cidx,i); ## sum the entries ! zz(i) = sum (log (abs (acnz))) - sum (log (abs (arnz))) ... ! - sum (log (abs (b_row_i))) + sum (log (abs (c_col_i))); endfor ## zz part 2: ! bd = [b; d]; ! for i = 1:mm i1 = i+nn; ## column of [b;d] ! bdidx = find (bd(:,i) != 0); bd_col_i = bd(bdidx,i); ! zz(i1) = sum (log (abs(bd_col_i))); endfor ## zz part 3: cd = [c, d]; ! for i = 1:pp i1 = i+nn+mm; ! cdidx = find (cd(i,:) != 0); cd_row_i = cd(i,cdidx); ! zz(i1) = -sum (log (abs (cd_row_i))); endfor ## now set zz as log base 2 ! zz *= (1 / log (2)); ! endfunction diff -cNr octave-2.9.16/scripts/control/util/zgreduce.m octave-2.9.17/scripts/control/util/zgreduce.m *** octave-2.9.16/scripts/control/util/zgreduce.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zgreduce.m Thu Nov 8 11:17:34 2007 *************** *** 25,69 **** function retsys = zgreduce (Asys, meps) ## SYS_INTERNAL accesses members of system data structure ! is_digital(Asys); # make sure it's pure digital/continuous exit_1 = 0; # exit_1 = 1 or 2 on exit of loop ! if(Asys.n + Asys.nz == 0) exit_1 = 2; # there are no finite zeros endif while (! exit_1) ! [Q,R,Pi] = qr(Asys.d); # compress rows of D Asys.d = Q'*Asys.d; Asys.c = Q'*Asys.c; ## check row norms of Asys.d ! [sig,tau] = zgrownorm(Asys.d,meps); ## disp("=======================================") ## disp(["zgreduce: meps=",num2str(meps), ", sig=",num2str(sig), ... ## ", tau=",num2str(tau)]) ## sysout(Asys) ! if(tau == 0) exit_1 = 1; # exit_1 - reduction complete and correct else Cb = Db = []; ! if(sig) Cb = Asys.c(1:sig,:); Db = Asys.d(1:sig,:); endif ! Ct =Asys.c(sig+(1:tau),:); ## compress columns of Ct ! [pp,nn] = size(Ct); rvec = nn:-1:1; ! [V,Sj,Pi] = qr(Ct'); V = V(:,rvec); ! [rho,gnu] = zgrownorm(Sj,meps); ## disp(["zgreduce: rho=",num2str(rho),", gnu=",num2str(gnu)]) ## Cb --- 25,73 ---- function retsys = zgreduce (Asys, meps) + if (nargin != 2) + print_usage (); + endif + ## SYS_INTERNAL accesses members of system data structure ! is_digital (Asys); # make sure it's pure digital/continuous exit_1 = 0; # exit_1 = 1 or 2 on exit of loop ! if (Asys.n + Asys.nz == 0) exit_1 = 2; # there are no finite zeros endif while (! exit_1) ! [Q, R, Pi] = qr (Asys.d); # compress rows of D Asys.d = Q'*Asys.d; Asys.c = Q'*Asys.c; ## check row norms of Asys.d ! [sig, tau] = zgrownorm (Asys.d, meps); ## disp("=======================================") ## disp(["zgreduce: meps=",num2str(meps), ", sig=",num2str(sig), ... ## ", tau=",num2str(tau)]) ## sysout(Asys) ! if (tau == 0) exit_1 = 1; # exit_1 - reduction complete and correct else Cb = Db = []; ! if (sig) Cb = Asys.c(1:sig,:); Db = Asys.d(1:sig,:); endif ! Ct = Asys.c(sig+(1:tau),:); ## compress columns of Ct ! [pp, nn] = size (Ct); rvec = nn:-1:1; ! [V, Sj, Pi] = qr (Ct'); V = V(:,rvec); ! [rho, gnu] = zgrownorm (Sj, meps); ## disp(["zgreduce: rho=",num2str(rho),", gnu=",num2str(gnu)]) ## Cb *************** *** 71,92 **** ## Ct ## Sj' ! if(rho == 0) exit_1 = 1; # exit_1 - reduction complete and correct ! elseif(gnu == 0) exit_1 = 2; # there are no zeros at all else mu = rho + sig; ## update system with Q ! M = [Asys.a , Asys.b ]; ! [nn,mm] = size(Asys.b); pp = rows(Asys.d); ! Vm =[V,zeros(nn,mm) ; zeros(mm,nn), eye(mm)]; ! if(sig) M = [M; Cb, Db]; ! Vs =[V',zeros(nn,sig) ; zeros(sig,nn), eye(sig)]; else Vs = V'; endif --- 75,96 ---- ## Ct ## Sj' ! if (rho == 0) exit_1 = 1; # exit_1 - reduction complete and correct ! elseif (gnu == 0) exit_1 = 2; # there are no zeros at all else mu = rho + sig; ## update system with Q ! M = [Asys.a, Asys.b ]; ! [nn, mm] = size (Asys.b); pp = rows(Asys.d); ! Vm =[V, zeros(nn,mm); zeros(mm,nn), eye(mm)]; ! if (sig) M = [M; Cb, Db]; ! Vs =[V', zeros(nn,sig); zeros(sig,nn), eye(sig)]; else Vs = V'; endif *************** *** 126,141 **** ## disp(["zgreduce: while loop done: exit_1=",num2str(exit_1)]); ! if(exit_1 == 2) ## there are no zeros at all! Asys.a = Asys.b = Asys.c = []; endif ## update dimensions ! if(is_digital(Asys)) ! Asys.nz = rows(Asys.a); else ! Asys.n = rows(Asys.a); endif retsys = Asys; --- 130,145 ---- ## disp(["zgreduce: while loop done: exit_1=",num2str(exit_1)]); ! if (exit_1 == 2) ## there are no zeros at all! Asys.a = Asys.b = Asys.c = []; endif ## update dimensions ! if (is_digital (Asys)) ! Asys.nz = rows (Asys.a); else ! Asys.n = rows (Asys.a); endif retsys = Asys; diff -cNr octave-2.9.16/scripts/control/util/zgrownorm.m octave-2.9.17/scripts/control/util/zgrownorm.m *** octave-2.9.16/scripts/control/util/zgrownorm.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zgrownorm.m Thu Nov 8 11:17:34 2007 *************** *** 26,31 **** --- 26,35 ---- function [sig, tau] = zgrownorm (mat, meps) + if (nargin != 2) + print_usage (); + endif + rownorm = []; for ii = 1:rows (mat) rownorm(ii) = norm (mat(ii,:)); *************** *** 34,37 **** tau = sum (rownorm <= meps); endfunction - --- 38,40 ---- diff -cNr octave-2.9.16/scripts/control/util/zgscal.m octave-2.9.17/scripts/control/util/zgscal.m *** octave-2.9.16/scripts/control/util/zgscal.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zgscal.m Thu Nov 8 11:17:34 2007 *************** *** 34,66 **** function x = zgscal (a, b, c, d, z, n, m, p) ## initialize parameters: ## Givens rotations, diagonalized 2x2 block of F, gcg vector initialization nmp = n+m+p; ## x_0 = x_{-1} = 0, r_0 = z ! x = zeros(nmp,1); xk1 = x; xk2 = x; rk1 = z; k = 0; ## construct balancing least squares problem ! F = eye(nmp); ! for kk=1:nmp ! F(1:nmp,kk) = zgfmul(a,b,c,d,F(:,kk)); endfor ! [U,H,k1] = krylov(F,z,nmp,1e-12,1); ! if(!issquare(H)) ! if(columns(H) != k1) ! error("zgscal(tzero): k1=%d, columns(H)=%d",k1,columns(H)); ! elseif(rows(H) != k1+1) ! error("zgscal: k1=%d, rows(H) = %d",k1,rows(H)); ! elseif ( norm(H(k1+1,:)) > 1e-12*norm(H,"inf") ) zgscal_last_row_of_H = H(k1+1,:) ! error("zgscal: last row of H nonzero (norm(H)=%e)",norm(H,"inf")) endif H = H(1:k1,1:k1); U = U(:,1:k1); --- 34,70 ---- function x = zgscal (a, b, c, d, z, n, m, p) + if (nargin != 8) + print_usage (); + endif + ## initialize parameters: ## Givens rotations, diagonalized 2x2 block of F, gcg vector initialization nmp = n+m+p; ## x_0 = x_{-1} = 0, r_0 = z ! x = zeros (nmp, 1); xk1 = x; xk2 = x; rk1 = z; k = 0; ## construct balancing least squares problem ! F = eye (nmp); ! for kk = 1:nmp ! F(1:nmp,kk) = zgfmul (a, b, c, d, F(:,kk)); endfor ! [U, H, k1] = krylov (F, z, nmp, 1e-12, 1); ! if (! issquare (H)) ! if (columns (H) != k1) ! error ("zgscal(tzero): k1=%d, columns(H)=%d", k1, columns (H)); ! elseif (rows (H) != k1+1) ! error ("zgscal: k1=%d, rows(H) = %d", k1, rows (H)); ! elseif (norm (H(k1+1,:)) > 1e-12*norm (H, "inf")) zgscal_last_row_of_H = H(k1+1,:) ! error ("zgscal: last row of H nonzero (norm(H)=%e)", norm (H, "inf")) endif H = H(1:k1,1:k1); U = U(:,1:k1); *************** *** 68,75 **** ## tridiagonal H can still be rank deficient, so do permuted qr ## factorization ! [qq,rr,pp] = qr(H); # H = qq*rr*pp' ! nn = rank(rr); qq = qq(:,1:nn); rr = rr(1:nn,:); # rr may not be square, but "\" does least xx = U*pp*(rr\qq'*(U'*z)); # squares solution, so this works --- 72,79 ---- ## tridiagonal H can still be rank deficient, so do permuted qr ## factorization ! [qq, rr, pp] = qr (H); # H = qq*rr*pp' ! nn = rank (rr); qq = qq(:,1:nn); rr = rr(1:nn,:); # rr may not be square, but "\" does least xx = U*pp*(rr\qq'*(U'*z)); # squares solution, so this works *************** *** 82,119 **** ## so for now I'm solving it with the krylov routine. ## initialize residual error norm ! rnorm = norm(rk1,1); xnorm = 0; ! fnorm = 1e-12 * norm([a,b;c,d],1); ! ## dummy defines for MATHTOOLS compiler ! gamk2 = 0; omega1 = 0; ztmz2 = 0; ## do until small changes to x len_x = length(x); ! while ((k < 2*len_x) & (xnorm> 0.5) & (rnorm>fnorm))|(k == 0) ! k = k+1; ## solve F_d z_{k-1} = r_{k-1} ! zk1= zgfslv(n,m,p,rk1); ## Generalized CG iteration ## gamk1 = (zk1'*F_d*zk1)/(zk1'*F*zk1); ztMz1 = zk1'*rk1; ! gamk1 = ztMz1/(zk1'*zgfmul(a,b,c,d,zk1)); ! if(rem(k,len_x) == 1) omega = 1; ! else omega = 1/(1-gamk1*ztMz1/(gamk2*omega1*ztmz2)); endif ## store x in xk2 to save space xk2 = xk2 + omega*(gamk1*zk1 + xk1 - xk2); ## compute new residual error: rk = z - F xk, check end conditions ! rk1 = z - zgfmul(a,b,c,d,xk2); ! rnorm = norm(rk1); ! xnorm = max(abs(xk1 - xk2)); ## printf("zgscal: k=%d, gamk1=%e, gamk2=%e, \nztMz1=%e ztmz2=%e\n", ... ## k,gamk1, gamk2, ztMz1, ztmz2); --- 86,126 ---- ## so for now I'm solving it with the krylov routine. ## initialize residual error norm ! rnorm = norm (rk1, 1); xnorm = 0; ! fnorm = 1e-12 * norm ([a, b; c, d], 1); ! gamk2 = 0; ! omega1 = 0; ! ztmz2 = 0; ## do until small changes to x len_x = length(x); ! while ((k < 2*len_x && xnorm > 0.5 && rnorm > fnorm) || k == 0) ! k++; ## solve F_d z_{k-1} = r_{k-1} ! zk1= zgfslv (n, m, p, rk1); ## Generalized CG iteration ## gamk1 = (zk1'*F_d*zk1)/(zk1'*F*zk1); ztMz1 = zk1'*rk1; ! gamk1 = ztMz1/(zk1'*zgfmul (a, b, c, d, zk1)); ! if (rem (k, len_x) == 1) ! omega = 1; ! else ! omega = 1/(1-gamk1*ztMz1/(gamk2*omega1*ztmz2)); endif ## store x in xk2 to save space xk2 = xk2 + omega*(gamk1*zk1 + xk1 - xk2); ## compute new residual error: rk = z - F xk, check end conditions ! rk1 = z - zgfmul (a, b, c, d, xk2); ! rnorm = norm (rk1); ! xnorm = max (abs (xk1 - xk2)); ## printf("zgscal: k=%d, gamk1=%e, gamk2=%e, \nztMz1=%e ztmz2=%e\n", ... ## k,gamk1, gamk2, ztMz1, ztmz2); *************** *** 125,145 **** gamk2 = gamk1; omega1 = omega; ztmz2 = ztMz1; ! [xk1,xk2] = swap(xk1,xk2); endwhile x = xk2; ## check convergence ! if (xnorm> 0.5 & rnorm>fnorm) ! warning("zgscal(tzero): GCG iteration failed; solving with pinv"); ## perform brute force least squares; construct F ! Am = eye(nmp); ! for ii=1:nmp ! Am(:,ii) = zgfmul(a,b,c,d,Am(:,ii)); endfor ## now solve with qr factorization ! x = pinv(Am)*z; endif endfunction --- 132,153 ---- gamk2 = gamk1; omega1 = omega; ztmz2 = ztMz1; ! [xk1, xk2] = swap (xk1, xk2); endwhile x = xk2; ## check convergence ! if (xnorm> 0.5 && rnorm > fnorm) ! warning ("zgscal(tzero): GCG iteration failed; solving with pinv"); ## perform brute force least squares; construct F ! Am = eye (nmp); ! for ii = 1:nmp ! Am(:,ii) = zgfmul (a, b, c, d, Am(:,ii)); endfor ## now solve with qr factorization ! x = pinv (Am) * z; endif + endfunction diff -cNr octave-2.9.16/scripts/control/util/zgsgiv.m octave-2.9.17/scripts/control/util/zgsgiv.m *** octave-2.9.16/scripts/control/util/zgsgiv.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zgsgiv.m Wed Nov 7 21:29:23 2007 *************** *** 30,35 **** --- 30,39 ---- function [a, b] = zgsgiv (c, s, a, b) + if (nargin != 4) + print_usage (); + endif + t1 = c*a + s*b; t2 = -s*a + c*b; a = t1; diff -cNr octave-2.9.16/scripts/control/util/zgshsr.m octave-2.9.17/scripts/control/util/zgshsr.m *** octave-2.9.16/scripts/control/util/zgshsr.m Fri Oct 12 17:27:19 2007 --- octave-2.9.17/scripts/control/util/zgshsr.m Wed Nov 7 21:29:23 2007 *************** *** 38,45 **** function x = zgshsr (y) if (! isvector (y)) ! error (sprintf ("y(%dx%d) must be a vector", rows (y), columns (y))); endif x = vec (y); m = length (x); --- 38,49 ---- function x = zgshsr (y) + if (nargin != 1) + print_usage (); + endif + if (! isvector (y)) ! error ("y(%dx%d) must be a vector", rows (y), columns (y)); endif x = vec (y); m = length (x); diff -cNr octave-2.9.16/scripts/general/gradient.m octave-2.9.17/scripts/general/gradient.m *** octave-2.9.16/scripts/general/gradient.m Fri Oct 12 17:27:21 2007 --- octave-2.9.17/scripts/general/gradient.m Wed Nov 7 16:26:43 2007 *************** *** 87,103 **** endif else for i=1:nd ! if (isscalar (varargin{1})) ! d{i} = varargin{i} * ones (sz(i), 1); else ! d{i} = varargin{i}; endif endfor - - ## Why the hell did matlab decide to swap these two values? - tmp = d{1}; - d{1} = d{2}; - d{2} = tmp; endif for i = 1:max (2, min (nd, nargout)) --- 87,112 ---- endif else for i=1:nd ! if (isscalar (varargin{i})) ! ## Why the hell did matlab decide to swap these two values? ! if (i == 1) ! d{2} = varargin{1} * ones (sz(2), 1); ! elseif (i == 2) ! d{1} = varargin{2} * ones (sz(1), 1); ! else ! d{i} = varargin{i} * ones (sz(i), 1); ! endif else ! ## Why the hell did matlab decide to swap these two values? ! if (i == 1) ! d{2} = varargin{1}; ! elseif (i == 2) ! d{1} = varargin{2}; ! else ! d{i} = varargin{i}; ! endif endif endfor endif for i = 1:max (2, min (nd, nargout)) diff -cNr octave-2.9.16/scripts/general/isa.m octave-2.9.17/scripts/general/isa.m *** octave-2.9.16/scripts/general/isa.m Fri Oct 12 17:27:21 2007 --- octave-2.9.17/scripts/general/isa.m Wed Nov 7 21:29:23 2007 *************** *** 25,29 **** --- 25,35 ---- ## Adapted-by: jwe function retval = isa (x, cname) + + if (nargin != 2) + print_usage (); + endif + retval = strcmp (class (x), cname); + endfunction diff -cNr octave-2.9.16/scripts/general/isdefinite.m octave-2.9.17/scripts/general/isdefinite.m *** octave-2.9.16/scripts/general/isdefinite.m Fri Oct 12 17:27:21 2007 --- octave-2.9.17/scripts/general/isdefinite.m Fri Nov 9 14:34:17 2007 *************** *** 45,51 **** retval = 0; else retval = -1; ! end else error ("isdefinite: matrix x must be symmetric"); endif --- 45,51 ---- retval = 0; else retval = -1; ! endif else error ("isdefinite: matrix x must be symmetric"); endif diff -cNr octave-2.9.16/scripts/general/structfun.m octave-2.9.17/scripts/general/structfun.m *** octave-2.9.16/scripts/general/structfun.m Fri Oct 12 17:27:22 2007 --- octave-2.9.17/scripts/general/structfun.m Fri Nov 2 13:24:23 2007 *************** *** 42,48 **** ## @group ## s.name1 = "John Smith"; ## s.name2 = "Jill Jones"; ! ## structfun (@{x@} regexp (x, '(\w+)$', 'matches')@{1@}, s, ## 'UniformOutput', false) ## @end group ## @end example --- 42,48 ---- ## @group ## s.name1 = "John Smith"; ## s.name2 = "Jill Jones"; ! ## structfun (@@(x) regexp (x, '(\w+)$', 'matches')@{1@}, s, ## 'UniformOutput', false) ## @end group ## @end example diff -cNr octave-2.9.16/scripts/geometry/inpolygon.m octave-2.9.17/scripts/geometry/inpolygon.m *** octave-2.9.16/scripts/geometry/inpolygon.m Fri Oct 12 17:27:22 2007 --- octave-2.9.17/scripts/geometry/inpolygon.m Wed Nov 7 21:29:23 2007 *************** *** 38,52 **** function [IN, ON] = inpolygon (X, Y, xv, yv) ! if ( !(isreal(X) && isreal(Y) && ismatrix(Y) && ... ! ismatrix(Y) && size_equal(X,Y)) ) error ("inpolygon: first two arguments must be real matrices of same size"); ! elseif ( !(isreal(xv) && isreal(yv) && isvector(xv) && ... ! isvector(yv) && size_equal(xv,yv)) ) error ("inpolygon: last two arguments must be real vectors of same size"); endif ! npol = length(xv); do_boundary = (nargout >= 2); IN = zeros (size(X), "logical"); --- 38,56 ---- function [IN, ON] = inpolygon (X, Y, xv, yv) ! if (nargin != 4) ! print_usage (); ! endif ! ! if (! (isreal (X) && isreal (Y) && ismatrix (Y) && ismatrix (Y) ! && size_equal (X, Y))) error ("inpolygon: first two arguments must be real matrices of same size"); ! elseif (! (isreal (xv) && isreal (yv) && isvector (xv) && isvector (yv) ! && size_equal (xv, yv))) error ("inpolygon: last two arguments must be real vectors of same size"); endif ! npol = length (xv); do_boundary = (nargout >= 2); IN = zeros (size(X), "logical"); *************** *** 76,81 **** --- 80,86 ---- endif j = i; endfor + endfunction %!demo diff -cNr octave-2.9.16/scripts/image/colormap.m octave-2.9.17/scripts/image/colormap.m *** octave-2.9.16/scripts/image/colormap.m Fri Oct 12 17:27:22 2007 --- octave-2.9.17/scripts/image/colormap.m Tue Nov 6 17:05:18 2007 *************** *** 70,76 **** endif ## Return current color map. ! if (nargout > 0) cmap = get (gcf (), "colormap"); endif --- 70,76 ---- endif ## Return current color map. ! if (nargout > 0 || (nargout == 0 && nargin == 0)) cmap = get (gcf (), "colormap"); endif diff -cNr octave-2.9.16/scripts/linear-algebra/__norm__.m octave-2.9.17/scripts/linear-algebra/__norm__.m *** octave-2.9.16/scripts/linear-algebra/__norm__.m Fri Oct 12 17:27:22 2007 --- octave-2.9.17/scripts/linear-algebra/__norm__.m Tue Nov 6 12:02:11 2007 *************** *** 40,50 **** endif ## Do we have a vector or matrix as the first argument? - if (ndims(x) == 2 && (rows (x) == 1 || columns (x) == 1)) if (ischar (p)) if (strcmp (p, "fro")) ! retval = sqrt (sum (abs (x) .^ 2)); elseif (strcmp (p, "inf")) retval = max (abs (x)); else --- 40,50 ---- endif ## Do we have a vector or matrix as the first argument? if (ndims(x) == 2 && (rows (x) == 1 || columns (x) == 1)) if (ischar (p)) if (strcmp (p, "fro")) ! inf_norm = norm (x, "inf"); ! retval = inf_norm .* sqrt (sum (abs (x ./ inf_norm) .^ 2)); elseif (strcmp (p, "inf")) retval = max (abs (x)); else *************** *** 69,75 **** else if (ischar (p)) if (strcmp (p, "fro")) ! retval = sqrt (sum (sum (abs (x) .^ 2))); elseif (strcmp (p, "inf")) retval = max (sum (abs (x'))); else --- 69,76 ---- else if (ischar (p)) if (strcmp (p, "fro")) ! inf_norm = norm (x, "inf"); ! retval = inf_norm .* sqrt (sum (sum (abs (x ./ inf_norm) .^ 2))); elseif (strcmp (p, "inf")) retval = max (sum (abs (x'))); else diff -cNr octave-2.9.16/scripts/linear-algebra/housh.m octave-2.9.17/scripts/linear-algebra/housh.m *** octave-2.9.16/scripts/linear-algebra/housh.m Fri Oct 12 17:27:22 2007 --- octave-2.9.17/scripts/linear-algebra/housh.m Wed Nov 7 21:29:23 2007 *************** *** 35,42 **** function [housv, beta, zer] = housh (x, j, z) ! ## check for valid inputs ! if (!isvector (x) && ! isscalar (x)) error ("housh: first input must be a vector") elseif (! isscalar(j)) error ("housh: second argment must be an integer scalar") --- 35,46 ---- function [housv, beta, zer] = housh (x, j, z) ! if (nargin != 3) ! print_usage (); ! endif ! ! ## Check for valid inputs. ! if (! isvector (x) && ! isscalar (x)) error ("housh: first input must be a vector") elseif (! isscalar(j)) error ("housh: second argment must be an integer scalar") diff -cNr octave-2.9.16/scripts/linear-algebra/krylov.m octave-2.9.17/scripts/linear-algebra/krylov.m *** octave-2.9.16/scripts/linear-algebra/krylov.m Fri Oct 12 17:27:22 2007 --- octave-2.9.17/scripts/linear-algebra/krylov.m Fri Nov 9 14:34:17 2007 *************** *** 200,206 **** av = alpha(i); V = V - av*hv*(hv'*V); H(i,nu-columns(V)+(1:columns(V))) = V(pivot_vec(i),:); ! end endwhile --- 200,206 ---- av = alpha(i); V = V - av*hv*(hv'*V); H(i,nu-columns(V)+(1:columns(V))) = V(pivot_vec(i),:); ! endfor endwhile diff -cNr octave-2.9.16/scripts/miscellaneous/compare_versions.m octave-2.9.17/scripts/miscellaneous/compare_versions.m *** octave-2.9.16/scripts/miscellaneous/compare_versions.m Thu Oct 25 03:16:07 2007 --- octave-2.9.17/scripts/miscellaneous/compare_versions.m Fri Nov 9 14:34:17 2007 *************** *** 70,75 **** --- 70,79 ---- function out = compare_versions (v1, v2, operator) + if (nargin != 3) + print_usage (); + endif + ## Make sure that the version numbers are valid. if (! (ischar (v1) && ischar (v2))) error ("compare_versions: both version numbers must be strings"); *************** *** 137,143 **** equal_op = true; else equal_op = false; ! end if any (ismember (operator, "~!")) not_op = true; else --- 141,147 ---- equal_op = true; else equal_op = false; ! endif if any (ismember (operator, "~!")) not_op = true; else *************** *** 184,189 **** --- 188,194 ---- ## Reverse the output if not is given. out = xor (not_op, out); + endfunction ## tests diff -cNr octave-2.9.16/scripts/miscellaneous/inputname.m octave-2.9.17/scripts/miscellaneous/inputname.m *** octave-2.9.16/scripts/miscellaneous/inputname.m Fri Oct 12 17:27:23 2007 --- octave-2.9.17/scripts/miscellaneous/inputname.m Wed Nov 7 21:29:23 2007 *************** *** 25,31 **** --- 25,37 ---- ## @end deftypefn function s = inputname (n) + + if (nargin != 1) + print_usage (); + endif + s = evalin ("caller", sprintf ("deblank (argn(%d,:));", n)); + endfunction ## Warning: heap big magic in the following tests!!! diff -cNr octave-2.9.16/scripts/miscellaneous/run.m octave-2.9.17/scripts/miscellaneous/run.m *** octave-2.9.16/scripts/miscellaneous/run.m Fri Oct 12 17:27:23 2007 --- octave-2.9.17/scripts/miscellaneous/run.m Wed Nov 7 21:29:23 2007 *************** *** 29,34 **** --- 29,39 ---- ## PKG_ADD: mark_as_command run function run (s) + + if (nargin != 1) + print_usage (); + endif + [d, f, ext] = fileparts (s); if (! isempty (d)) if (exist (d, "dir")) diff -cNr octave-2.9.16/scripts/optimization/glpk.m octave-2.9.17/scripts/optimization/glpk.m *** octave-2.9.16/scripts/optimization/glpk.m Fri Oct 12 17:27:23 2007 --- octave-2.9.17/scripts/optimization/glpk.m Fri Nov 9 14:34:17 2007 *************** *** 115,140 **** ## following values ## @table @code ## @item "F" ! ## Free (unbounded) variable (the constraint is ignored). ## @item "U" ! ## Variable with upper bound (@code{A(i,:)*x <= b(i)}). ## @item "S" ! ## Fixed Variable (@code{A(i,:)*x = b(i)}). ## @item "L" ! ## Variable with lower bound (@code{A(i,:)*x >= b(i)}). ## @item "D" ! ## Double-bounded variable (@code{A(i,:)*x >= -b(i)} @emph{and} ! ## (@code{A(i,:)*x <= b(i)}). ## @end table ## ## @item vartype ## A column array containing the types of the variables. ## @table @code ! ## @item "F" ! ## "C" ! ## Continuous variable. ! ## "I" ! ## Integer variable ## @end table ## ## @item sense --- 115,139 ---- ## following values ## @table @code ## @item "F" ! ## A free (unbounded) constraint (the constraint is ignored). ## @item "U" ! ## An inequality constraint with an upper bound (@code{A(i,:)*x <= b(i)}). ## @item "S" ! ## An equality constraint (@code{A(i,:)*x = b(i)}). ## @item "L" ! ## An inequality with a lower bound (@code{A(i,:)*x >= b(i)}). ## @item "D" ! ## An inequality constraint with both upper and lower bounds ! ## (@code{A(i,:)*x >= -b(i)} @emph{and} (@code{A(i,:)*x <= b(i)}). ## @end table ## ## @item vartype ## A column array containing the types of the variables. ## @table @code ! ## @item "C" ! ## A continuous variable. ! ## @item "I" ! ## An integer variable. ## @end table ## ## @item sense *************** *** 478,484 **** endif else lb = zeros (nx, 1); ! end ## 5) Vector with the upper bound of each variable --- 477,483 ---- endif else lb = zeros (nx, 1); ! endif ## 5) Vector with the upper bound of each variable *************** *** 491,497 **** endif else ub = repmat (Inf, nx, 1); ! end ## 6) Sense of each constraint --- 490,496 ---- endif else ub = repmat (Inf, nx, 1); ! endif ## 6) Sense of each constraint *************** *** 508,514 **** endif else ctype = repmat ("S", nc, 1); ! end ## 7) Vector with the type of variables --- 507,513 ---- endif else ctype = repmat ("S", nc, 1); ! endif ## 7) Vector with the type of variables diff -cNr octave-2.9.16/scripts/path/savepath.m octave-2.9.17/scripts/path/savepath.m *** octave-2.9.16/scripts/path/savepath.m Fri Oct 12 17:27:23 2007 --- octave-2.9.17/scripts/path/savepath.m Fri Nov 9 14:34:17 2007 *************** *** 102,108 **** [fid, msg] = fopen (savefile, "wt"); if (fid < 0) error ("savepath: unable to open file for writing, %s, %s", savefile, msg); ! end for i = 1:length (pre) fprintf (fid, "%s\n", pre{i}) endfor --- 102,108 ---- [fid, msg] = fopen (savefile, "wt"); if (fid < 0) error ("savepath: unable to open file for writing, %s, %s", savefile, msg); ! endif for i = 1:length (pre) fprintf (fid, "%s\n", pre{i}) endfor diff -cNr octave-2.9.16/scripts/pkg/pkg.m octave-2.9.17/scripts/pkg/pkg.m *** octave-2.9.16/scripts/pkg/pkg.m Fri Oct 26 12:09:12 2007 --- octave-2.9.17/scripts/pkg/pkg.m Tue Nov 6 17:47:35 2007 *************** *** 1019,1030 **** src = fullfile (packdir, "src"); ## configure if (exist (fullfile (src, "configure"), "file")) [status, output] = shell (strcat ("cd ", src, "; ./configure --prefix=\"", ! desc.dir, "\"", ! " CC=", octave_config_info ("CC"), ! " CXX=", octave_config_info ("CXX"), ! " AR=", octave_config_info ("AR"), ! " RANLIB=", octave_config_info ("RANLIB"))); if (status != 0) rm_rf (desc.dir); error ("the configure script returned the following error: %s", output); --- 1019,1039 ---- src = fullfile (packdir, "src"); ## configure if (exist (fullfile (src, "configure"), "file")) + flags = ""; + if (isempty (getenv ("CC"))) + flags = strcat (flags, " CC=\"", octave_config_info ("CC"), "\""); + endif + if (isempty (getenv ("CXX"))) + flags = strcat (flags, " CXX=\"", octave_config_info ("CXX"), "\""); + endif + if (isempty (getenv ("AR"))) + flags = strcat (flags, " AR=\"", octave_config_info ("AR"), "\""); + endif + if (isempty (getenv ("RANLIB"))) + flags = strcat (flags, " RANLIB=\"", octave_config_info ("RANLIB"), "\""); + endif [status, output] = shell (strcat ("cd ", src, "; ./configure --prefix=\"", ! desc.dir, "\"", flags)); if (status != 0) rm_rf (desc.dir); error ("the configure script returned the following error: %s", output); diff -cNr octave-2.9.16/scripts/plot/Makefile.in octave-2.9.17/scripts/plot/Makefile.in *** octave-2.9.16/scripts/plot/Makefile.in Tue Oct 23 04:19:49 2007 --- octave-2.9.17/scripts/plot/Makefile.in Fri Nov 9 13:15:40 2007 *************** *** 34,39 **** --- 34,40 ---- INSTALL_DATA = @INSTALL_DATA@ SOURCES = \ + __area__.m \ __axes_limits__.m \ __axis_label__.m \ __bar__.m \ *************** *** 61,66 **** --- 62,68 ---- __pltopt1__.m \ __pltopt__.m \ ancestor.m \ + area.m \ axes.m \ axis.m \ bar.m \ *************** *** 81,86 **** --- 83,89 ---- gca.m \ gcf.m \ grid.m \ + hidden.m \ hist.m \ hold.m \ isfigure.m \ *************** *** 96,116 **** --- 99,126 ---- newplot.m \ orient.m \ patch.m \ + pcolor.m \ peaks.m \ + pie.m \ plot.m \ plot3.m \ polar.m \ print.m \ + quiver.m \ replot.m \ semilogx.m \ semilogxerr.m \ semilogy.m \ semilogyerr.m \ + shading.m \ shg.m \ sombrero.m \ stairs.m \ stem.m \ subplot.m \ + surf.m \ + surface.m \ + surfc.m \ text.m \ title.m \ view.m \ diff -cNr octave-2.9.16/scripts/plot/__area__.m octave-2.9.17/scripts/plot/__area__.m *** octave-2.9.16/scripts/plot/__area__.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/__area__.m Fri Nov 9 12:56:34 2007 *************** *** 0 **** --- 1,39 ---- + ## Copyright (C) 2007 David Bateman + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## Undocumented internal function. + + function retval = __area__ (ax, x, y, bv, varargin) + + colors = [1, 0, 0; 0, 1, 0; 0, 0, 1; 1, 1, 0; 1, 0, 1; 0, 1, 1]; + + x = [x(1,:); x; x(end,:)]; + + y = cumsum ([[bv, ones(1, size (y, 2) - 1)]; y; + [bv, ones(1, size (y, 2) - 1)]], 2); + + retval = patch (ax, x(:,1), y(:,1), colors(1,:), varargin{:}); + + for i = 2:size(y,2) + tmp = patch (ax, [x(:,i); flipud(x(:,i))], + [y(:,i) ; flipud(y(:, i-1))], colors(i,:), varargin{:}); + + retval = [retval; tmp]; + endfor + + endfunction diff -cNr octave-2.9.16/scripts/plot/__bar__.m octave-2.9.17/scripts/plot/__bar__.m *** octave-2.9.16/scripts/plot/__bar__.m Fri Oct 19 12:12:05 2007 --- octave-2.9.17/scripts/plot/__bar__.m Fri Nov 9 13:01:44 2007 *************** *** 22,28 **** function varargout = __bar__ (vertical, func, varargin) ! width = 0.8; group = true; if (nargin < 3) --- 22,29 ---- function varargout = __bar__ (vertical, func, varargin) ! ## Slightly smaller than 0.8 to avoid clipping issue in gnuplot 4.0 ! width = 0.8 - 10 * eps; group = true; if (nargin < 3) *************** *** 133,165 **** yb(3:4:4*ylen,:) = y1; yb(4:4:4*ylen,:) = y0; ! xb = reshape (xb, 4, numel (xb) / 4); ! yb = reshape (yb, 4, numel (yb) / 4); ! ! if (! have_line_spec) ! colors = [1, 0, 0; 0, 1, 0; 0, 0, 1; 1, 1, 0; 1, 0, 1; 0, 1, 1]; ! newargs = [{shiftdim(colors (mod (floor ([0 : (ycols * ylen - 1)] / ylen), ! 6) + 1, :), -1)}, newargs]; ! endif if (vertical) ! if (nargout < 1) newplot (); ! patch (xb, yb, newargs {:}); ! elseif (nargout < 2) ! newplot (); ! varargout{1} = patch (xb, yb, newargs {:}); else varargout{1} = xb; varargout{2} = yb; endif else ! if (nargout < 1) ! newplot (); ! patch (yb, xb, newargs{:}); ! elseif (nargout < 2) newplot (); ! varargout{1} = patch (yb, xb, newargs{:}); else varargout{1} = yb; varargout{2} = xb; --- 134,175 ---- yb(3:4:4*ylen,:) = y1; yb(4:4:4*ylen,:) = y0; ! xb = reshape (xb, [4, numel(xb) / 4 / ycols, ycols]); ! yb = reshape (yb, [4, numel(yb) / 4 / ycols, ycols]); + color = [1, 0, 0; 0, 1, 0; 0, 0, 1; 1, 1, 0; 1, 0, 1; 0, 1, 1]; if (vertical) ! if (nargout < 2) newplot (); ! tmp = []; ! for i = 1 : ycols ! if (! have_line_spec) ! tmp = [tmp; patch(xb(:,:,i), yb(:,:,i), color(i,:), newargs {:})]; ! else ! tmp = [tmp; patch(xb(:,:,i), yb(:,:,i), newargs {:})]; ! endif ! endfor ! if (nargout == 1) ! varargout{1} = tmp; ! endif else varargout{1} = xb; varargout{2} = yb; endif else ! if (nargout < 2) newplot (); ! tmp = []; ! for i = 1 : ycols ! if (! have_line_spec) ! tmp = [tmp; patch(yb(:,:,i), xb(:,:,i), color(i,:), newargs {:})]; ! else ! tmp = [tmp; patch(yb(:,:,i), xb(:,:,i), newargs {:})]; ! endif ! endfor ! if (nargout == 1) ! varargout{1} = tmp; ! endif else varargout{1} = yb; varargout{2} = xb; diff -cNr octave-2.9.16/scripts/plot/__go_draw_axes__.m octave-2.9.17/scripts/plot/__go_draw_axes__.m *** octave-2.9.16/scripts/plot/__go_draw_axes__.m Wed Oct 31 12:23:25 2007 --- octave-2.9.17/scripts/plot/__go_draw_axes__.m Fri Nov 9 16:28:46 2007 *************** *** 193,198 **** --- 193,199 ---- xautoscale = strcmpi (axis_obj.xlimmode, "auto"); yautoscale = strcmpi (axis_obj.ylimmode, "auto"); zautoscale = strcmpi (axis_obj.zlimmode, "auto"); + cautoscale = strcmpi (axis_obj.climmode, "auto"); kids = axis_obj.children; *************** *** 200,209 **** data_idx = 0; data = cell (); is_image_data = []; ! xminp = yminp = zminp = Inf; ! xmax = ymax = zmax = -Inf; ! xmin = ymin = zmin = Inf; [view_cmd, view_fcn, view_zoom] = image_viewer (); use_gnuplot_for_images = (ischar (view_fcn) --- 201,211 ---- data_idx = 0; data = cell (); is_image_data = []; + hidden_removal = true; ! xminp = yminp = zminp = cminp = Inf; ! xmax = ymax = zmax = cmax = -Inf; ! xmin = ymin = zmin = cmin = Inf; [view_cmd, view_fcn, view_zoom] = image_viewer (); use_gnuplot_for_images = (ischar (view_fcn) *************** *** 236,241 **** --- 238,244 ---- data_idx++; is_image_data(data_idx) = true; parametric(data_idx) = false; + have_cdata(data_idx) = false; [y_dim, x_dim] = size (img_data(:,:,1)); if (x_dim > 1) *************** *** 296,308 **** endif case "line" data_idx++; is_image_data(data_idx) = false; parametric(data_idx) = true; if (isempty (obj.keylabel)) titlespec{data_idx} = "title \"\""; else ! titlespec{data_idx} = strcat ("title \"", obj.keylabel, "\""); endif [style, typ, with] = do_linestyle_command (obj, data_idx, plot_stream); usingclause{data_idx} = ""; --- 299,319 ---- endif case "line" + if (strncmp (obj.linestyle, "none", 4) + && (! isfield (obj, "marker") + || (isfield (obj, "marker") + && strncmp (obj.marker, "none", 4)))) + continue; + endif data_idx++; is_image_data(data_idx) = false; parametric(data_idx) = true; + have_cdata(data_idx) = false; if (isempty (obj.keylabel)) titlespec{data_idx} = "title \"\""; else ! tmp = undo_string_escapes (obj.keylabel); ! titlespec{data_idx} = strcat ("title \"", tmp, "\""); endif [style, typ, with] = do_linestyle_command (obj, data_idx, plot_stream); usingclause{data_idx} = ""; *************** *** 318,323 **** --- 329,335 ---- xdat = obj.xdata(:); ydat = obj.ydata(:); zdat = obj.zdata(:); + if (xautoscale) [xmin, xmax, xminp] = get_data_limits (xmin, xmax, xminp, xdat); endif *************** *** 330,336 **** data{data_idx} = [xdat, ydat, zdat]'; usingclause{data_idx} = "using ($1):($2):($3)"; fputs (plot_stream, "set parametric;\n"); - fputs (plot_stream, "unset hidden3d;\n"); fputs (plot_stream, "set style data lines;\n"); fputs (plot_stream, "set surface;\n"); fputs (plot_stream, "unset contour;\n"); --- 342,347 ---- *************** *** 444,461 **** data_idx++; is_image_data(data_idx) = false; parametric(data_idx) = false; ! titlespec{data_idx} = "title \"\""; usingclause{data_idx} = ""; if (isfield (obj, "facecolor") && isfield (obj, "cdata")) if (strncmp (obj.facecolor, "none", 4)) color = [1, 1, 1]; ! elseif (strncmp (obj.facecolor, "flat", 4) || ! strncmp (obj.facecolor, "interp", 6)) ! if (ndims (obj.cdata) == 2 && ... ! ((nr > 3 && size (obj.cdata, 2) == nc) ... ! || (size (obj.cdata, 1) > 1 && ... ! size (obj.cdata, 2) == nc))) ccol = obj.cdata (:, i); elseif (ndims (obj.cdata) == 3) ccol = permute (obj.cdata (:, i, :), [1, 3, 2]); --- 455,478 ---- data_idx++; is_image_data(data_idx) = false; parametric(data_idx) = false; ! have_cdata(data_idx) = false; ! if (i > 1 || isempty (obj.keylabel)) ! titlespec{data_idx} = "title \"\""; ! else ! tmp = undo_string_escapes (obj.keylabel); ! titlespec{data_idx} = strcat ("title \"", tmp, "\""); ! endif usingclause{data_idx} = ""; if (isfield (obj, "facecolor") && isfield (obj, "cdata")) if (strncmp (obj.facecolor, "none", 4)) color = [1, 1, 1]; ! elseif (strncmp (obj.facecolor, "flat", 4) ! || strncmp (obj.facecolor, "interp", 6)) ! if (ndims (obj.cdata) == 2 ! && ((nr > 3 && size (obj.cdata, 2) == nc) ! || (size (obj.cdata, 1) > 1 ! && size (obj.cdata, 2) == nc))) ccol = obj.cdata (:, i); elseif (ndims (obj.cdata) == 3) ccol = permute (obj.cdata (:, i, :), [1, 3, 2]); *************** *** 466,473 **** if (numel(ccol) == 3) color = ccol; else ! r = 1 + round ((size (cmap, 1) - 1) * ... ! (ccol - clim(1))/(clim(2) - clim(1))); r = max (1, min (r, size (cmap, 1))); color = cmap(r, :); endif --- 483,490 ---- if (numel(ccol) == 3) color = ccol; else ! r = 1 + round ((size (cmap, 1) - 1) ! * (ccol - clim(1))/(clim(2) - clim(1))); r = max (1, min (r, size (cmap, 1))); color = cmap(r, :); endif *************** *** 485,493 **** endif if (have_newer_gnuplot) ! withclause{data_idx} = ... ! sprintf ("with filledcurve lc rgb \"#%02x%02x%02x\"", ... ! round (255*color)); else if (isequal (color, [0,0,0])) typ = -1; --- 502,510 ---- endif if (have_newer_gnuplot) ! withclause{data_idx} ... ! = sprintf ("with filledcurve lc rgb \"#%02x%02x%02x\"", ! round (255*color)); else if (isequal (color, [0,0,0])) typ = -1; *************** *** 518,523 **** --- 535,541 ---- data_idx++; is_image_data(data_idx) = false; parametric(data_idx) = false; + have_cdata(data_idx) = false; titlespec{data_idx} = "title \"\""; usingclause{data_idx} = ""; if (isfield (obj, "edgecolor")) *************** *** 536,544 **** color = [0, 0, 0]; endif if (have_newer_gnuplot) ! withclause{data_idx} = ... ! sprintf ("with lines lc rgb \"#%02x%02x%02x\"", ... ! round (255*color)); else if (isequal (color, [0,0,0])) typ = -1; --- 554,562 ---- color = [0, 0, 0]; endif if (have_newer_gnuplot) ! withclause{data_idx} ... ! = sprintf ("with lines lc rgb \"#%02x%02x%02x\"", ! round (255*color)); else if (isequal (color, [0,0,0])) typ = -1; *************** *** 562,568 **** withclause{data_idx} = sprintf ("with lines lt %d", typ); endif ! if (!isnan (xcol) && !isnan (ycol)) data{data_idx} = [[xcol; xcol(1)], [ycol; ycol(1)]]'; else data{data_idx} = [xcol, ycol]'; --- 580,586 ---- withclause{data_idx} = sprintf ("with lines lt %d", typ); endif ! if (!isnan (xcol) && ! isnan (ycol)) data{data_idx} = [[xcol; xcol(1)], [ycol; ycol(1)]]'; else data{data_idx} = [xcol, ycol]'; *************** *** 571,665 **** endfor case "surface" - data_idx++; - is_image_data(data_idx) = false; - parametric(data_idx) = false; - [style, typ, with] = do_linestyle_command (obj, data_idx, plot_stream); - if (isempty (obj.keylabel)) - titlespec{data_idx} = "title \"\""; - else - titlespec{data_idx} = strcat ("title \"", obj.keylabel, "\""); - endif - usingclause{data_idx} = ""; - if (have_newer_gnuplot || isnan (typ)) - withclause{data_idx} = sprintf ("with %s linestyle %d", - style, data_idx); - else - withclause{data_idx} = sprintf ("with %s linetype %d %s", - style, typ, with); - endif nd = 3; ! xdat = obj.xdata; ! ydat = obj.ydata; ! zdat = obj.zdata; ! if (xautoscale) ! tx = xdat(:); ! [xmin, xmax, xminp] = get_data_limits (xmin, xmax, xminp, tx); ! endif ! if (yautoscale) ! ty = ydat(:); ! [ymin, ymax, yminp] = get_data_limits (ymin, ymax, yminp, ty); ! endif ! if (zautoscale) ! tz = zdat(:); ! [zmin, zmax, zminp] = get_data_limits (zmin, zmax, zminp, tz); ! endif ! err = false; ! if (isvector (xdat) && isvector (ydat) && ismatrix (zdat)) ! if (rows (zdat) == length (ydat) && columns (zdat) == length (xdat)) ! [xdat, ydat] = meshgrid (xdat, ydat); else ! err = true; endif ! elseif (ismatrix (xdat) && ismatrix (ydat) && ismatrix (zdat)) ! if (! (size_equal (xdat, ydat) && size_equal (xdat, zdat))) err = true; endif ! else ! err = true; ! endif ! if (err) ! error ("__go_draw_axes__: invalid grid data"); ! endif ! xlen = columns (zdat); ! ylen = rows (zdat); ! if (xlen == columns (xdat) && xlen == columns (ydat) ! && ylen == rows (xdat) && ylen == rows (ydat)) ! len = 3 * xlen; ! zz = zeros (ylen, len); ! k = 1; ! for kk = 1:3:len ! zz(:,kk) = xdat(:,k); ! zz(:,kk+1) = ydat(:,k); ! zz(:,kk+2) = zdat(:,k); ! k++; ! endfor ! data{data_idx} = zz; ! endif ! usingclause{data_idx} = "using ($1):($2):($3)"; ! withclause{data_idx} = "with line palette"; ! fputs (plot_stream, "unset parametric;\n"); ! fputs (plot_stream, "set hidden3d;\n"); ! fputs (plot_stream, "set style data lines;\n"); ! fputs (plot_stream, "set surface;\n"); ! fputs (plot_stream, "unset contour;\n"); ! fprintf (plot_stream, "set cbrange [%g:%g];\n", zmin, zmax); ! ! if (have_newer_gnuplot) ! surf_colormap = parent_figure_obj.colormap; ! palette_size = rows (surf_colormap); ! fprintf (plot_stream, ! "set palette positive color model RGB maxcolors %i;\n", ! palette_size); ! fprintf (plot_stream, ! "set palette file \"-\" binary record=%d using 1:2:3:4;\n", ! palette_size); ! fwrite (plot_stream, [1:palette_size; surf_colormap'], "float32"); ! else ! fputs (plot_stream, "set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n"); endif - fputs (plot_stream, "unset colorbox;\n"); case "text" lpos = obj.position; --- 589,774 ---- endfor case "surface" nd = 3; ! if (! (strncmp (obj.edgecolor, "none", 4) ! && strncmp (obj.facecolor, "none", 4))) ! data_idx++; ! is_image_data(data_idx) = false; ! parametric(data_idx) = false; ! have_cdata(data_idx) = true; ! [style, typ, with] = do_linestyle_command (obj, data_idx, plot_stream); ! if (isempty (obj.keylabel)) ! titlespec{data_idx} = "title \"\""; else ! tmp = undo_string_escapes (obj.keylabel); ! titlespec{data_idx} = strcat ("title \"", tmp, "\""); ! endif ! usingclause{data_idx} = ""; ! if (have_newer_gnuplot || isnan (typ)) ! withclause{data_idx} = sprintf ("with %s linestyle %d", ! style, data_idx); ! else ! withclause{data_idx} = sprintf ("with %s linetype %d %s", ! style, typ, with); ! endif ! ! xdat = obj.xdata; ! ydat = obj.ydata; ! zdat = obj.zdata; ! cdat = obj.cdata; ! ! if (xautoscale) ! tx = xdat(:); ! [xmin, xmax, xminp] = get_data_limits (xmin, xmax, xminp, tx); ! endif ! if (yautoscale) ! ty = ydat(:); ! [ymin, ymax, yminp] = get_data_limits (ymin, ymax, yminp, ty); ! endif ! if (zautoscale) ! tz = zdat(:); ! [zmin, zmax, zminp] = get_data_limits (zmin, zmax, zminp, tz); endif ! if (cautoscale) ! tc = cdat(:); ! [cmin, cmax, cminp] = get_data_limits (cmin, cmax, cminp, tc); ! endif ! ! err = false; ! if (! size_equal(zdat, cdat)) err = true; + endif + if (isvector (xdat) && isvector (ydat) && ismatrix (zdat)) + if (rows (zdat) == length (ydat) + && columns (zdat) == length (xdat)) + [xdat, ydat] = meshgrid (xdat, ydat); + else + err = true; + endif + elseif (ismatrix (xdat) && ismatrix (ydat) && ismatrix (zdat)) + if (! (size_equal (xdat, ydat) && size_equal (xdat, zdat))) + err = true; + endif + else + err = true; endif ! if (err) ! error ("__go_draw_axes__: invalid grid data"); ! endif ! xlen = columns (zdat); ! ylen = rows (zdat); ! if (xlen == columns (xdat) && xlen == columns (ydat) ! && ylen == rows (xdat) && ylen == rows (ydat)) ! len = 4 * xlen; ! zz = zeros (ylen, len); ! k = 1; ! for kk = 1:4:len ! zz(:,kk) = xdat(:,k); ! zz(:,kk+1) = ydat(:,k); ! zz(:,kk+2) = zdat(:,k); ! zz(:,kk+3) = cdat(:,k); ! k++; ! endfor ! data{data_idx} = zz; ! endif ! usingclause{data_idx} = "using ($1):($2):($3):($4)"; ! withclause{data_idx} = "with line palette"; ! fputs (plot_stream, "unset parametric;\n"); ! fputs (plot_stream, "set style data lines;\n"); ! fputs (plot_stream, "set surface;\n"); ! fputs (plot_stream, "unset contour;\n"); ! fprintf (plot_stream, "set cbrange [%g:%g];\n", cmin, cmax); ! ! ## Interpolation does not work for flat surfaces (e.g. pcolor) ! ## and color mapping --> currently set empty. ! interp_str = ""; ! surf_colormap = parent_figure_obj.colormap; ! flat_interp_face = (strncmp (obj.facecolor, "flat", 4) ! || strncmp (obj.facecolor, "interp", 6)); ! flat_interp_edge = (strncmp (obj.edgecolor, "flat", 4) ! || strncmp (obj.edgecolor, "interp", 6)); ! ! facecolor_none_or_white = (strncmp (obj.facecolor, "none", 4) ! || (isnumeric (obj.facecolor) ! && all (obj.facecolor == 1))); ! palette_data = []; ! ! if (strncmp (obj.facecolor, "none", 4)) ! hidden_removal = false; ! endif ! ! if (flat_interp_face ! || (flat_interp_edge && facecolor_none_or_white)) ! palette_data = [1:rows(surf_colormap); surf_colormap']; ! elseif (isnumeric (obj.facecolor)) ! palette_data = [1:2; [obj.facecolor; obj.facecolor]']; ! endif ! ! if (facecolor_none_or_white && isnumeric (obj.edgecolor)) ! palette_data = [1:2; [obj.edgecolor; obj.edgecolor]']; ! endif ! ! if (facecolor_none_or_white) ! ## Do nothing. ! elseif (flat_interp_face && strncmp (obj.edgecolor, "flat", 4)) ! fprintf (plot_stream, "set pm3d at s %s;\n", interp_str); ! else ! if (strncmp (obj.edgecolor, "none", 4)) ! fprintf (plot_stream, "set pm3d at s %s;\n", interp_str); ! else ! edgecol = obj.edgecolor; ! if (ischar (obj.edgecolor)) ! edgecol = [0,0,0]; ! endif ! fprintf (plot_stream, "set pm3d at s hidden3d %d %s;\n", data_idx, interp_str); ! ! if (have_newer_gnuplot) ! fprintf (plot_stream, ! "set style line %d linecolor rgb \"#%02x%02x%02x\" lw %f;\n", ! data_idx, round (255*edgecol), obj.linewidth); ! else ! if (isequal (edgecol, [0,0,0])) ! typ = -1; ! elseif (isequal (edgecol, [1,0,0])) ! typ = 1; ! elseif (isequal (edgecol, [0,1,0])) ! typ = 2; ! elseif (isequal (edgecol, [0,0,1])) ! typ = 3; ! elseif (isequal (edgecol, [1,0,1])) ! typ = 4; ! elseif (isequal (edgecol, [0,1,1])) ! typ = 5; ! elseif (isequal (edgecol, [1,1,1])) ! typ = -1; ! elseif (isequal (edgecol, [1,1,0])) ! typ = 7; ! else ! typ = -1; ! endif ! fprintf (plot_stream, ! "set style line %d lt %d lw %f;\n", ! data_idx, typ, obj.linewidth); ! endif ! endif ! endif ! ! if (have_newer_gnuplot) ! if (length(palette_data) > 0) ! fprintf (plot_stream, ! "set palette positive color model RGB maxcolors %i;\n", ! columns(palette_data)); ! fprintf (plot_stream, ! "set palette file \"-\" binary record=%d using 1:2:3:4;\n", ! columns(palette_data)); ! fwrite (plot_stream, palette_data, "float32"); ! endif ! else ! fputs (plot_stream, "set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n"); ! endif ! fputs (plot_stream, "unset colorbox;\n"); endif case "text" lpos = obj.position; *************** *** 721,727 **** endfor ! have_data = ! isempty (data); if (xautoscale && have_data) xlim = get_axis_limits (xmin, xmax, xminp, xlogscale); --- 830,842 ---- endfor ! if (hidden_removal) ! fputs (plot_stream, "set hidden3d;\n"); ! else ! fputs (plot_stream, "unset hidden3d;\n"); ! endif ! ! have_data = (! (isempty (data) || any (cellfun (@isempty, data)))); if (xautoscale && have_data) xlim = get_axis_limits (xmin, xmax, xminp, xlogscale); *************** *** 737,743 **** else xdir = "noreverse"; endif ! fprintf (plot_stream, "set %srange [%.15e:%.15e] %s;\n", xaxisloc, xlim, xdir); if (yautoscale && have_data) ylim = get_axis_limits (ymin, ymax, yminp, ylogscale); --- 852,859 ---- else xdir = "noreverse"; endif ! fprintf (plot_stream, "set %srange [%.15e:%.15e] %s;\n", ! xaxisloc, xlim, xdir); if (yautoscale && have_data) ylim = get_axis_limits (ymin, ymax, yminp, ylogscale); *************** *** 753,759 **** else ydir = "noreverse"; endif ! fprintf (plot_stream, "set %srange [%.15e:%.15e] %s;\n", yaxisloc, ylim, ydir); if (nd == 3) if (zautoscale && have_data) --- 869,876 ---- else ydir = "noreverse"; endif ! fprintf (plot_stream, "set %srange [%.15e:%.15e] %s;\n", ! yaxisloc, ylim, ydir); if (nd == 3) if (zautoscale && have_data) *************** *** 805,811 **** keyout = findstr (keypos, "outside"); if (! isempty (keyout)) inout = "outside"; ! keypos = keypos (1:keyout-1); endif endif switch (keypos) --- 922,928 ---- keyout = findstr (keypos, "outside"); if (! isempty (keyout)) inout = "outside"; ! keypos = keypos(1:keyout-1); endif endif switch (keypos) *************** *** 861,867 **** endif if (have_data) - if (nd == 2) plot_cmd = "plot"; else --- 978,983 ---- *************** *** 885,891 **** if (is_image_data(i)) fwrite (plot_stream, data{i}, "float32"); else ! __gnuplot_write_data__ (plot_stream, data{i}, nd, parametric(i)); endif endfor else --- 1001,1008 ---- if (is_image_data(i)) fwrite (plot_stream, data{i}, "float32"); else ! __gnuplot_write_data__ (plot_stream, data{i}, nd, parametric(i), ! have_cdata(i)); endif endfor else *************** *** 896,918 **** else print_usage (); ! endif endfunction function [xmin, xmax, xminp] = get_data_limits (xmin, xmax, xminp, xdat, tx) ! xdat = xdat(! isinf (xdat)); ! xmin = min (xmin, min (xdat)); ! xmax = max (xmax, max (xdat)); ! if (nargin == 5) ! tx = tx(! isinf (xdat) & tx > 0); ! if (! isempty (tx)) ! xminp = min (xminp, min (tx)); ! endif ! else ! tmp = min (xdat(xdat > 0)); ! if (! isempty (tmp)) ! xminp = min (xminp, tmp); endif endif endfunction --- 1013,1037 ---- else print_usage (); ! endif endfunction function [xmin, xmax, xminp] = get_data_limits (xmin, xmax, xminp, xdat, tx) ! if (! (isempty (xdat) || (nargin > 4 && isempty (tx)))) ! xdat = xdat(! isinf (xdat)); ! xmin = min (xmin, min (xdat)); ! xmax = max (xmax, max (xdat)); ! if (nargin == 5) ! tx = tx(! isinf (xdat) & tx > 0); ! if (! isempty (tx)) ! xminp = min (xminp, min (tx)); ! endif ! else ! tmp = min (xdat(xdat > 0)); ! if (! isempty (tmp)) ! xminp = min (xminp, tmp); ! endif endif endif endfunction *************** *** 923,958 **** function lim = get_axis_limits (min_val, max_val, min_pos, logscale) ! if (logscale) ! if (isinf (min_pos)) ! lim = []; ! warning ("axis: logscale with no positive values to plot"); ! return; ! endif ! if (min_val <= 0) ! warning ("axis: omitting nonpositive data in log plot"); ! min_val = min_pos; ! endif ! ## FIXME -- maybe this test should also be relative? ! if (abs (min_val - max_val) < sqrt (eps)) ! min_val *= 0.9; ! max_val *= 1.1; endif - min_val = 10 ^ floor (log10 (min_val)); - max_val = 10 ^ ceil (log10 (max_val)); - else - if (min_val == 0 && max_val == 0) - min_val = -1; - max_val = 1; - ## FIXME -- maybe this test should also be relative? - elseif (abs (min_val - max_val) < sqrt (eps)) - min_val -= 0.1 * abs (min_val); - max_val += 0.1 * abs (max_val); - endif - ## FIXME -- to do a better job, we should consider the tic spacing. - scale = 10 ^ floor (log10 (max_val - min_val) - 1); - min_val = scale * floor (min_val / scale); - max_val = scale * ceil (max_val / scale); endif lim = [min_val, max_val]; --- 1042,1079 ---- function lim = get_axis_limits (min_val, max_val, min_pos, logscale) ! if (! (isinf (min_val) || isinf (max_val))) ! if (logscale) ! if (isinf (min_pos)) ! lim = []; ! warning ("axis: logscale with no positive values to plot"); ! return; ! endif ! if (min_val <= 0) ! warning ("axis: omitting nonpositive data in log plot"); ! min_val = min_pos; ! endif ! ## FIXME -- maybe this test should also be relative? ! if (abs (min_val - max_val) < sqrt (eps)) ! min_val *= 0.9; ! max_val *= 1.1; ! endif ! min_val = 10 ^ floor (log10 (min_val)); ! max_val = 10 ^ ceil (log10 (max_val)); ! else ! if (min_val == 0 && max_val == 0) ! min_val = -1; ! max_val = 1; ! ## FIXME -- maybe this test should also be relative? ! elseif (abs (min_val - max_val) < sqrt (eps)) ! min_val -= 0.1 * abs (min_val); ! max_val += 0.1 * abs (max_val); ! endif ! ## FIXME -- to do a better job, we should consider the tic spacing. ! scale = 10 ^ floor (log10 (max_val - min_val) - 1); ! min_val = scale * floor (min_val / scale); ! max_val = scale * ceil (max_val / scale); endif endif lim = [min_val, max_val]; *************** *** 1120,1126 **** endfunction ! function __gnuplot_write_data__ (plot_stream, data, nd, parametric) ## DATA is already transposed. --- 1241,1247 ---- endfunction ! function __gnuplot_write_data__ (plot_stream, data, nd, parametric, cdata) ## DATA is already transposed. *************** *** 1152,1167 **** endif endfor endif ! else ## FIXME -- handle NaNs here too? if (parametric) fprintf (plot_stream, "%.15g %.15g %.15g\n", data); else nc = columns (data); ! for j = 1:3:nc ! fprintf (plot_stream, "%.15g %.15g %.15g\n", data(:,j:j+2)'); ! fputs (plot_stream, "\n"); ! endfor endif endif fputs (plot_stream, "e\n"); --- 1273,1295 ---- endif endfor endif ! elseif (nd == 3) ## FIXME -- handle NaNs here too? if (parametric) fprintf (plot_stream, "%.15g %.15g %.15g\n", data); else nc = columns (data); ! if (cdata) ! for j = 1:4:nc ! fprintf (plot_stream, "%.15g %.15g %.15g %.15g\n", data(:,j:j+3)'); ! fputs (plot_stream, "\n"); ! endfor ! else ! for j = 1:3:nc ! fprintf (plot_stream, "%.15g %.15g %.15g\n", data(:,j:j+2)'); ! fputs (plot_stream, "\n"); ! endfor ! endif endif endif fputs (plot_stream, "e\n"); diff -cNr octave-2.9.16/scripts/plot/area.m octave-2.9.17/scripts/plot/area.m *** octave-2.9.16/scripts/plot/area.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/area.m Fri Nov 9 12:56:34 2007 *************** *** 0 **** --- 1,103 ---- + ## Copyright (C) 2007 Michael Goffioul + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} area (@var{x}, @var{y}) + ## @deftypefnx {Function File} {} area (@var{x}, @var{y}, @var{lvl}) + ## @deftypefnx {Function File} {} area (@dots{}, @var{prop}, @var{val}, @dots{}) + ## @deftypefnx {Function File} {} area (@var{y}, @dots{}) + ## @deftypefnx {Function File} {} area (@var{h}, @dots{}) + ## @deftypefnx {Function File} {@var{h} =} area (@dots{}) + ## Area plot of cummulative sum of the columns of @var{y}. This shows the + ## contributions of a value to a sum, and is functionally similar to + ## @code{plot (@var{x}, cumsum (@var{y}, 2))}, except that the area under + ## the curve is shaded. + ## + ## If the @var{x} argument is ommitted it is assumed to be given by + ## @code{1 : rows (@var{y})}. A value @var{lvl} can be defined that determines + ## where the base level of the shading under the curve should be defined. + ## + ## Additional arguments to the @code{area} function are passed to the + ## @code{patch}. The optional return value @var{h} provides a handle to + ## the list of patch objects. + ## @seealso{plot, patch} + ## @end deftypefn + + function h = area (varargin) + + if (nargin > 0) + idx = 1; + ax = []; + x = y = []; + bv = 0; + args = {}; + ## Check for axes parent. + if (ishandle (varargin{idx}) + && strcmp (get (varargin{idx}, "type"), "axes")) + ax = varargin{idx}; + idx++; + endif + ## Check for (X) or (X,Y) arguments and possible base value. + if (nargin >= idx && ismatrix (varargin{idx})) + y = varargin{idx}; + idx++; + if (nargin >= idx) + if (isscalar (varargin{idx})) + bv = varargin{idx}; + idx++; + elseif (ismatrix (varargin{idx})) + x = y; + y = varargin{idx}; + idx++; + if (nargin >= idx && isscalar (varargin{idx})) + bv = varargin{idx}; + idx++; + endif + endif + endif + else + print_usage (); + endif + ## Check for additional args. + if (nargin >= idx) + args = {varargin{idx:end}}; + endif + newplot (); + if (isvector (y)) + y = y(:); + endif + if (isempty (x)) + x = repmat ([1:size(y, 1)]', 1, size (y, 2)); + elseif (isvector (x)) + x = repmat (x(:), 1, size (y, 2)); + endif + + if (isempty (ax)) + tmp = __area__ (gca (), x, y, bv, args{:}); + else + tmp = __area__ (ax, x, y, bv, args{:}); + endif + + if (nargout > 0) + h = tmp; + endif + else + print_usage (); + endif + + endfunction diff -cNr octave-2.9.16/scripts/plot/bar.m octave-2.9.17/scripts/plot/bar.m *** octave-2.9.16/scripts/plot/bar.m Wed Oct 31 13:16:16 2007 --- octave-2.9.17/scripts/plot/bar.m Tue Nov 6 13:03:08 2007 *************** *** 18,54 **** ## . ## -*- texinfo -*- ! ## @deftypefn {Function File} {@var{h} =} bar (@var{x}, @var{y}, @var{p1}, @var{v1}, @dots{}) ! ## @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} bar (@dots{}) ! ## Given two vectors of x-y data, @code{bar} produce a bar graph. ## ## If only one argument is given, it is taken as a vector of y-values ## and the x coordinates are taken to be the indices of the elements. ## ## If @var{y} is a matrix, then each column of @var{y} is taken to be a ## separate bar graph plotted on the same graph. By default the columns ## are plotted side-by-side. This behavior can be changed by the @var{style} ## argument, which can take the values @code{"grouped"} (the default), ## or @code{"stacked"}. ## ! ## If two output arguments are specified, the data are generated but ! ## not plotted. For example, ! ## ! ## @example ! ## bar (x, y); ! ## @end example ! ## ! ## @noindent ! ## and ! ## ! ## @example ! ## [xb, yb] = bar (x, y); ! ## plot (xb, yb); ! ## @end example ## ! ## @noindent ! ## are equivalent. ! ## @seealso{hbar, plot} ## @end deftypefn ## Author: jwe --- 18,46 ---- ## . ## -*- texinfo -*- ! ## @deftypefn {Function File} {} bar (@var{x}, @var{y}) ! ## @deftypefnx {Function File} {} bar (@var{y}) ! ## @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}) ! ## @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}, @var{style}) ! ## @deftypefnx {Function File} {@var{h} =} bar (@dots{}, @var{prop}, @var{val}) ! ## Produce a bar graph from two vectors of x-y data. ## ## If only one argument is given, it is taken as a vector of y-values ## and the x coordinates are taken to be the indices of the elements. ## + ## The default width of 0.8 for the bars can be changed using @var{w}. + ## ## If @var{y} is a matrix, then each column of @var{y} is taken to be a ## separate bar graph plotted on the same graph. By default the columns ## are plotted side-by-side. This behavior can be changed by the @var{style} ## argument, which can take the values @code{"grouped"} (the default), ## or @code{"stacked"}. ## ! ## The optional return value @var{h} provides a handle to the patch object. ! ## Properties of the patch graphics object can be changed using ! ## @var{prop}, @var{val} pairs. ## ! ## @seealso{barh, plot} ## @end deftypefn ## Author: jwe diff -cNr octave-2.9.16/scripts/plot/barh.m octave-2.9.17/scripts/plot/barh.m *** octave-2.9.16/scripts/plot/barh.m Wed Oct 31 13:16:16 2007 --- octave-2.9.17/scripts/plot/barh.m Tue Nov 6 13:03:08 2007 *************** *** 17,52 **** ## . ## -*- texinfo -*- ! ## @deftypefn {Function File} {@var{h} =} barh (@var{x}, @var{y}, @var{style}) ! ## @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} barh (@dots{}) ! ## Given two vectors of x-y data, @code{bar} produce a horizontal bar graph. ## ## If only one argument is given, it is taken as a vector of y-values ## and the x coordinates are taken to be the indices of the elements. ## ## If @var{y} is a matrix, then each column of @var{y} is taken to be a ## separate bar graph plotted on the same graph. By default the columns ## are plotted side-by-side. This behavior can be changed by the @var{style} ## argument, which can take the values @code{"grouped"} (the default), ## or @code{"stacked"}. ## ! ## If two output arguments are specified, the data are generated but ! ## not plotted. For example, ! ## ! ## @example ! ## barh (x, y); ! ## @end example ! ## ! ## @noindent ! ## and ! ## ! ## @example ! ## [xb, yb] = barh (x, y); ! ## plot (xb, yb); ! ## @end example ## - ## @noindent - ## are equivalent. ## @seealso{bar, plot} ## @end deftypefn --- 17,44 ---- ## . ## -*- texinfo -*- ! ## @deftypefn {Function File} {} barh (@var{x}, @var{y}) ! ## @deftypefnx {Function File} {} barh (@var{y}) ! ## @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}) ! ## @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}, @var{style}) ! ## @deftypefnx {Function File} {@var{h} =} barh (@dots{}, @var{prop}, @var{val}) ! ## Produce a horizontal bar graph from two vectors of x-y data. ## ## If only one argument is given, it is taken as a vector of y-values ## and the x coordinates are taken to be the indices of the elements. ## + ## The default width of 0.8 for the bars can be changed using @var{w}. + ## ## If @var{y} is a matrix, then each column of @var{y} is taken to be a ## separate bar graph plotted on the same graph. By default the columns ## are plotted side-by-side. This behavior can be changed by the @var{style} ## argument, which can take the values @code{"grouped"} (the default), ## or @code{"stacked"}. ## ! ## The optional return value @var{h} provides a handle to the patch object. ! ## Properties of the patch graphics object can be changed using ! ## @var{prop}, @var{val} pairs. ## ## @seealso{bar, plot} ## @end deftypefn diff -cNr octave-2.9.16/scripts/plot/findobj.m octave-2.9.17/scripts/plot/findobj.m *** octave-2.9.16/scripts/plot/findobj.m Fri Oct 12 17:27:24 2007 --- octave-2.9.17/scripts/plot/findobj.m Fri Nov 9 14:34:17 2007 *************** *** 75,81 **** else handles = 0; n1 = 1; ! end if (n1 <= nargin) if (ischar (varargin{n1})) if (strcmpi (varargin{n1}, 'flat')) --- 75,81 ---- else handles = 0; n1 = 1; ! endif if (n1 <= nargin) if (ischar (varargin{n1})) if (strcmpi (varargin{n1}, 'flat')) *************** *** 208,214 **** match = regexp (p.(pname{np}), pvalue{np}); if isempty (match) match = 0; ! end elseif (numel (p.(pname{np})) == numel (pvalue{np})) if (ischar (pvalue{np})) match = strcmpi (pvalue{np}, p.(pname{np})); --- 208,214 ---- match = regexp (p.(pname{np}), pvalue{np}); if isempty (match) match = 0; ! endif elseif (numel (p.(pname{np})) == numel (pvalue{np})) if (ischar (pvalue{np})) match = strcmpi (pvalue{np}, p.(pname{np})); diff -cNr octave-2.9.16/scripts/plot/hidden.m octave-2.9.17/scripts/plot/hidden.m *** octave-2.9.16/scripts/plot/hidden.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/hidden.m Fri Nov 9 13:15:40 2007 *************** *** 0 **** --- 1,79 ---- + ## Copyright (C) 2007 Michael Goffioul + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} hidden (@var{mode}) + ## @deftypefnx {Function File} {} hidden () + ## Manipulation the mesh hidden line removal. Called with no argument + ## the hidden line removal is toggled. The argument @var{mode} can be either + ## 'on' or 'off' and the set of the hidden line removal is set accordingly. + ## @seealso{mesh, meshc, surf} + ## @end deftypefn + + ## PKG_ADD: mark_as_command hidden + + function retval = hidden (mode) + + if (nargin == 0) + mode = "swap"; + elseif (nargin == 1); + if (ischar (mode)) + mode = tolower (mode); + if (! strcmp (mode, "on") && ! strcmp (mode, "off")) + error ("hidden: mode expected to be 'on' or 'off'"); + endif + else + error ("hidden: expecting mode to be a string"); + endif + else + print_usage (); + endif + + for h = get (gca (), "children"); + htype = lower (get (h, "type")); + if (strcmp (htype, "surface")) + fc = get (h, "facecolor"); + if ((! ischar (fc) && is_white (fc)) + || (ischar (fc) && strcmp (fc, "none"))) + switch (mode) + case "on" + set (h, "facecolor", "w"); + case "off" + set (h, "facecolor", "none"); + case "swap" + if (ischar (fc)) + set (h, "facecolor", "w"); + mode = "on"; + else + set (h, "facecolor", "none"); + mode = "off"; + endif + endswitch + endif + endif + endfor + + if (nargout > 0) + retval = mode; + endif + + endfunction + + function retval = is_white (color) + retval = all (color == 1); + endfunction diff -cNr octave-2.9.16/scripts/plot/hist.m octave-2.9.17/scripts/plot/hist.m *** octave-2.9.16/scripts/plot/hist.m Fri Oct 12 17:27:24 2007 --- octave-2.9.17/scripts/plot/hist.m Tue Nov 6 19:24:11 2007 *************** *** 43,51 **** ## Author: jwe ! function [nn, xx] = hist (y, x, norm) ! if (nargin < 1 || nargin > 3) print_usage (); endif --- 43,51 ---- ## Author: jwe ! function [nn, xx] = hist (y, varargin) ! if (nargin < 1) print_usage (); endif *************** *** 56,73 **** endif if (isreal (y)) ! max_val = max (y); ! min_val = min (y); else error ("hist: first argument must be a vector"); endif ! if (nargin == 1) n = 10; x = [0.5:n]'/n; x = x * (max_val - min_val) + ones(size(x)) * min_val; else ## nargin is either 2 or 3 if (isscalar (x)) n = x; if (n <= 0) --- 56,75 ---- endif if (isreal (y)) ! max_val = max (y(:)); ! min_val = min (y(:)); else error ("hist: first argument must be a vector"); endif ! iarg = 1; ! if (nargin == 1 || ischar (varargin{iarg})) n = 10; x = [0.5:n]'/n; x = x * (max_val - min_val) + ones(size(x)) * min_val; else ## nargin is either 2 or 3 + x = varargin {iarg++}; if (isscalar (x)) n = x; if (n <= 0) *************** *** 113,120 **** freq = diff (chist); ! if (nargin == 3) ## Normalise the histogram. freq = freq / rows (y) * norm; endif --- 115,123 ---- freq = diff (chist); ! if (nargin > 2 && !ischar (varargin{iarg})) ## Normalise the histogram. + norm = varargin{iarg++}; freq = freq / rows (y) * norm; endif *************** *** 126,133 **** nn = freq; xx = x; endif else ! bar (x, freq, 1.0); endif endfunction --- 129,138 ---- nn = freq; xx = x; endif + elseif (size (freq, 2) != 1) + bar (x, freq, 0.8, varargin{iarg:end}); else ! bar (x, freq, 1.0, varargin{iarg:end}); endif endfunction *************** *** 146,152 **** %! assert(nn, [3,2,1]); %!test %! [nn,xx]=hist([[1:4]',[1:4]'],3); ! %! assert(xx, [[1.5,2.5,3.5]',[1.5,2.5,3.5]']); %! assert(nn, [[2,1,1]',[2,1,1]']); %!assert(hist(1,1),1); %!test --- 151,157 ---- %! assert(nn, [3,2,1]); %!test %! [nn,xx]=hist([[1:4]',[1:4]'],3); ! %! assert(xx, [1.5;2.5;3.5]); %! assert(nn, [[2,1,1]',[2,1,1]']); %!assert(hist(1,1),1); %!test diff -cNr octave-2.9.16/scripts/plot/legend.m octave-2.9.17/scripts/plot/legend.m *** octave-2.9.16/scripts/plot/legend.m Tue Oct 23 19:22:17 2007 --- octave-2.9.17/scripts/plot/legend.m Fri Nov 9 13:01:44 2007 *************** *** 59,69 **** ## ## Some specific functions are directly available using @var{func}: ## ! ## @table @code ## @item "show" ## Show legends from the plot ## @item "hide" ! ## @itemx off ## Hide legends from the plot ## @item "boxon" ## Draw a box around legends --- 59,69 ---- ## ## Some specific functions are directly available using @var{func}: ## ! ## @table @asis ## @item "show" ## Show legends from the plot ## @item "hide" ! ## @itemx "off" ## Hide legends from the plot ## @item "boxon" ## Draw a box around legends *************** *** 158,164 **** if (nargs > 0) have_data = false; for i = 1:nkids ! if (strcmp (get (kids(k), "type"), "line")) have_data = true; break; endif --- 158,166 ---- if (nargs > 0) have_data = false; for i = 1:nkids ! if (strcmp (get (kids(k), "type"), "line") ! || strcmp (get (kids(k), "type"), "surface") ! || strcmp (get (kids(k), "type"), "patch")) have_data = true; break; endif *************** *** 172,178 **** for i = 1:nargs arg = varargin{i}; if (ischar (arg)) ! while (k <= nkids && ! strcmp (get (kids(k), "type"), "line")) k++; endwhile if (k <= nkids) --- 174,183 ---- for i = 1:nargs arg = varargin{i}; if (ischar (arg)) ! while (k <= nkids ! && ! (strcmp (get (kids(k), "type"), "line") ! || strcmp (get (kids(k), "type"), "surface") ! || strcmp (get (kids(k), "type"), "patch"))) k++; endwhile if (k <= nkids) diff -cNr octave-2.9.16/scripts/plot/mesh.m octave-2.9.17/scripts/plot/mesh.m *** octave-2.9.16/scripts/plot/mesh.m Fri Oct 12 17:27:24 2007 --- octave-2.9.17/scripts/plot/mesh.m Fri Nov 9 13:15:40 2007 *************** *** 30,76 **** ## Author: jwe ! function h = mesh (x, y, z) newplot (); ! if (nargin == 1) ! z = x; ! if (ismatrix (z)) ! [nr, nc] = size (z); ! x = 1:nc; ! y = (1:nr)'; ! else ! error ("mesh: argument must be a matrix"); ! endif ! elseif (nargin == 3) ! if (isvector (x) && isvector (y) && ismatrix (z)) ! if (rows (z) == length (y) && columns (z) == length (x)) ! x = x(:)'; ! y = y(:); ! else ! msg = "mesh: rows (z) must be the same as length (y) and"; ! msg = sprintf ("%s\ncolumns (z) must be the same as length (x)", msg); ! error (msg); ! endif ! elseif (ismatrix (x) && ismatrix (y) && ismatrix (z)) ! if (! (size_equal (x, y) && size_equal (x, z))) ! error ("mesh: x, y, and z must have same dimensions"); ! endif ! else ! error ("mesh: x and y must be vectors and z must be a matrix"); ! endif ! else ! print_usage (); ! endif ! ## make a default line object, and make it the current axes for the ! ## current figure. ! ca = gca (); ! tmp = __go_surface__ (ca, "xdata", x, "ydata", y, "zdata", z); ! set (ca, "view", [-37.5, 30]); if (nargout > 0) h = tmp; --- 30,49 ---- ## Author: jwe ! function h = mesh (varargin) newplot (); ! tmp = surface (varargin{:}); ! ax = get (tmp, "parent"); ! set (tmp, "facecolor", "w"); ! set (tmp, "edgecolor", "flat"); ! if (! ishold ()) ! set (ax, "view", [-37.5, 30]); ! endif if (nargout > 0) h = tmp; diff -cNr octave-2.9.16/scripts/plot/meshc.m octave-2.9.17/scripts/plot/meshc.m *** octave-2.9.16/scripts/plot/meshc.m Fri Oct 12 17:27:24 2007 --- octave-2.9.17/scripts/plot/meshc.m Fri Nov 9 13:15:40 2007 *************** *** 31,83 **** newplot (); ! if (nargin == 1) ! z = varargin{1}; ! if (ismatrix (z)) ! [nr, nc] = size (z); ! x = 1:nc; ! y = (1:nr)'; ! else ! error ("meshc: argument must be a matrix"); ! endif ! elseif (nargin == 3) ! x = varargin{1}; ! y = varargin{2}; ! z = varargin{3}; ! ! if (isvector (x) && isvector (y) && ismatrix (z)) ! if (rows (z) == length (y) && columns (z) == length (x)) ! x = x(:)'; ! y = y(:); ! else ! msg = "meshc: rows (z) must be the same as length (y) and"; ! msg = sprintf ("%s\ncolumns (z) must be the same as length (x)", msg); ! error (msg); ! endif ! elseif (ismatrix (x) && ismatrix (y) && ismatrix (z)) ! if (! (size_equal (x, y) && size_equal (x, z))) ! error ("meshc: x, y, and z must have same dimensions"); ! endif ! else ! error ("meshc: x and y must be vectors and z must be a matrix"); ! endif ! else ! print_usage (); ! endif ! ## make a default line object, and make it the current axes for the ! ## current figure. ! ca = gca (); ! tmp = __go_surface__ (ca, "xdata", x, "ydata", y, "zdata", z); ! set (ca, "view", [-37.5, 30]); ! hold on; [c, lev] = contourc (varargin{:}); ! cmap = get (gcf(), "colormap"); levx = linspace (min (lev), max (lev), size (cmap, 1)); --- 31,52 ---- newplot (); ! tmp = surface (varargin{:}); ! ax = get (tmp, "parent"); ! set (tmp, "facecolor", "w"); ! set (tmp, "edgecolor", "flat"); ! if (! ishold ()) ! set (ax, "view", [-37.5, 30]); ! endif ! hold ("on"); [c, lev] = contourc (varargin{:}); ! cmap = get (gcf (), "colormap"); levx = linspace (min (lev), max (lev), size (cmap, 1)); *************** *** 85,91 **** ax = axis(); zmin = 2 * ax(5) - ax(6); ! ## decode contourc output format i1 = 1; while (i1 < length (c)) --- 54,60 ---- ax = axis(); zmin = 2 * ax(5) - ax(6); ! ## Decode contourc output format. i1 = 1; while (i1 < length (c)) *************** *** 97,108 **** ccb = interp1 (levx, cmap(:,3), clev); ii = i1+1:i1+clen; ! line (c(1,ii), c(2,ii), zmin*ones(size(ii)), "color", [ccr, ccg, ccb]); i1 += c(2,i1)+1; endwhile if (nargout > 0) h = tmp; endif endfunction --- 66,80 ---- ccb = interp1 (levx, cmap(:,3), clev); ii = i1+1:i1+clen; ! line (c(1,ii), c(2,ii), zmin * ones (size (ii)), "color", ! [ccr, ccg, ccb]); i1 += c(2,i1)+1; + endwhile if (nargout > 0) h = tmp; endif + endfunction diff -cNr octave-2.9.16/scripts/plot/patch.m octave-2.9.17/scripts/plot/patch.m *** octave-2.9.16/scripts/plot/patch.m Sat Oct 13 01:13:29 2007 --- octave-2.9.17/scripts/plot/patch.m Fri Nov 9 11:59:43 2007 *************** *** 44,50 **** oldh = gca (); unwind_protect axes (h); ! [tmp, fail] = __patch__ (h, varargin{:}); unwind_protect_cleanup axes (oldh); end_unwind_protect --- 44,50 ---- oldh = gca (); unwind_protect axes (h); ! [tmp, fail] = __patch__ (h, varargin{2:end}); unwind_protect_cleanup axes (oldh); end_unwind_protect diff -cNr octave-2.9.16/scripts/plot/pcolor.m octave-2.9.17/scripts/plot/pcolor.m *** octave-2.9.16/scripts/plot/pcolor.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/pcolor.m Fri Nov 9 12:49:45 2007 *************** *** 0 **** --- 1,62 ---- + ## Copyright (C) 2007 Kai Habel + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} pcolor (@var{x}, @var{y}, @var{c}) + ## @deftypefnx {Function File} {} pcolor (@var{c}) + ## Density plot for given matrices @var{x}, and @var{y} from @code{meshgrid} and + ## a matrix @var{c} corresponding to the @var{x} and @var{y} coordinates of + ## the mesh. If @var{x} and @var{y} are vectors, then a typical vertex + ## is (@var{x}(j), @var{y}(i), @var{c}(i,j)). Thus, columns of @var{c} + ## correspond to different @var{x} values and rows of @var{c} correspond + ## to different @var{y} values. + ## @seealso{meshgrid, contour} + ## @end deftypefn + + ## Author: Kai Habel + + function h = pcolor (x, y, c) + + newplot (); + + if (nargin == 1) + c = x; + z = zeros (size (c)); + [nr, nc] = size (c); + [x, y] = meshgrid (1:nr, 1:nc); + elseif (nargin == 3) + z = zeros (size (c)); + else + print_usage (); + endif + + tmp = surface (x, y, z, c); + + ax = get (tmp, "parent"); + + set (tmp, "facecolor", "flat"); + + if (! ishold ()) + set (ax, "view", [0, 90]); + endif + + if (nargout > 0) + h = tmp; + endif + + endfunction diff -cNr octave-2.9.16/scripts/plot/pie.m octave-2.9.17/scripts/plot/pie.m *** octave-2.9.16/scripts/plot/pie.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/pie.m Wed Nov 7 16:26:43 2007 *************** *** 0 **** --- 1,163 ---- + ## Copyright (C) 2007 David Bateman + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} pie (@var{y}) + ## @deftypefnx {Function File} {} pie (@var{y}, @var{explode}) + ## @deftypefnx {Function File} {} pie (@dots{}, @var{labels}) + ## @deftypefnx {Function File} {} pie (@var{h}, @dots{}); + ## @deftypefnx {Function File} {@var{h} =} pie (@dots{}); + ## Produce a pie chart. + ## + ## Called with a single vector arrgument, produces a pie chart of the + ## elements in @var{x}, with the size of the slice determined by percentage + ## size of the values of @var{x}. + ## + ## The variable @var{explode} is a vector of the same length as @var{x} that + ## if non zero 'explodes' the slice from the pie chart. + ## + ## If given @var{labels} is a cell array of strings of the same length as + ## @var{x}, giving the labels of each of the slices of the pie chart. + ## + ## The optional return value @var{h} provides a handle to the patch object. + ## + ## @seealso{bar, stem} + ## @end deftypefn + + ## Very roughly based on pie.m from octave-forge whose author was + ## Daniel Heiserer + + function retval = pie (varargin) + + if (nargin < 1) + print_usage (); + elseif (isscalar (varargin{1}) && ishandle (varargin{1})) + h = varargin {1}; + if (! strcmp (get (h, "type"), "axes")) + error ("pie: expecting first argument to be an axes object"); + endif + oldh = gca (); + unwind_protect + axes (h); + newplot (); + tmp = __pie__ (h, varargin{2:end}); + unwind_protect_cleanup + axes (oldh); + end_unwind_protect + else + newplot (); + tmp = __pie__ (gca (), varargin{:}); + endif + + if (nargout > 0) + retval = tmp; + endif + + endfunction + + function hlist = __pie__ (varargin) + + h = varargin{1}; + x = abs (varargin{2}); + iarg = 3; + + if (! isvector (x)) + error ("pie: expecting vector argument"); + endif + + len = length (x); + + while (iarg <= nargin) + arg = varargin{iarg++}; + if (iscell (arg)) + labels = arg; + if (! size_equal (x, labels)) + error ("pie: mismatch in number of labels and data"); + endif + elseif (isnumeric (arg)) + explode = arg; + if (! size_equal (x, explode)) + error ("pie: mismatch in number of elements in explode and data"); + endif + endif + endwhile + + if (! exist ("explode", "var")) + explode = zeros (size (x)); + endif + + if (! exist ("labels", "var")) + xp = round (100 * x ./ sum (x)); + for i = 1:len + labels{i} = sprintf ("%d%%", xp(i)); + endfor + endif + + hlist = []; + refinement = 90; + phi = 0:refinement:360; + xphi = cumsum (x / sum (x) * 360); + for i = 1:len + if (i == 1) + xn = 0 : 360 / refinement : xphi(i); + else + xn = xphi(i-1) : 360 / refinement : xphi(i); + endif + + if (xn(end) != xphi(i)) + xn = [xn, xphi(i)]; + endif + + xn2 = (xn(1) + xn(end)) / 2; + if (explode (i)) + xoff = - 0.1 * sind (xn2); + yoff = 0.1 * cosd (xn2); + else + xoff = 0; + yoff = 0; + endif + xt = - 1.2 * sind (xn2); + yt = 1.2 * cosd (xn2); + if (xt > 0) + align = "left"; + else + align = "right"; + endif + + hlist = [hlist; patch(xoff + [0, - sind(xn)], yoff + [0, cosd(xn)], i); + text(xt, yt, labels {i}, "horizontalalignment", align)]; + endfor + + if (len == 1) + set (h, "clim", [1, 2]); + else + set (h, "clim", [1, len]); + endif + + axis ([-1.5, 1.5, -1.5, 1.5], "square"); + + endfunction + + %!demo + %! pie ([3, 2, 1], [0, 0, 1]); + %! colormap([1,0,0;0,1,0;0,0,1;1,1,0;1,0,1;0,1,1]); + + %!demo + %! pie ([3, 2, 1], [0, 0, 1], {"Cheddar", "Swiss", "Camembert"}); + %! colormap([1,0,0;0,1,0;0,0,1;1,1,0;1,0,1;0,1,1]); + %! axis ([-2,2,-2,2]); diff -cNr octave-2.9.16/scripts/plot/quiver.m octave-2.9.17/scripts/plot/quiver.m *** octave-2.9.16/scripts/plot/quiver.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/quiver.m Thu Nov 8 10:27:23 2007 *************** *** 0 **** --- 1,227 ---- + ## Copyright (C) 2007 David Bateman + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} quiver (@var{u}, @var{v}) + ## @deftypefnx {Function File} {} quiver (@var{x}, @var{y}, @var{u}, @var{v}) + ## @deftypefnx {Function File} {} quiver (@dots{}, @var{s}) + ## @deftypefnx {Function File} {} quiver (@dots{}, @var{style}) + ## @deftypefnx {Function File} {} quiver (@dots{}, 'filled') + ## @deftypefnx {Function File} {} quiver (@var{h}, @dots{}) + ## @deftypefnx {Function File} {@var{h} =} quiver (@dots{}) + ## + ## Plot the @code{(@var{u}, @var{v})} components of a vector field in + ## an @code{(@var{x}, @var{y})} meshgrid. If the grid is uniform, you can + ## specify @var{x} and @var{y} as vectors. + ## + ## If @var{x} and @var{y} are undefined they are assumed to be + ## @code{(1:@var{m}, 1:@var{n})} where @code{[@var{m}, @var{n}] = + ## size(@var{u})}. + ## + ## The variable @var{s} is a scalar defining a scaling factor to use for + ## the arrows of the field relative to the mesh spacing. A value of 0 + ## disables all scaling. The default value is 1. + ## + ## The style to use for the plot can be defined with a line style @var{style} + ## in a similar manner to the line styles used with the @code{plot} command. + ## If a marker is specified then markers at the grid points of the vectors are + ## printed rather than arrows. If the argument 'filled' is given then the + ## markers as filled. + ## + ## The optional return value @var{h} provides a list of handles to the + ## the parts of the vector field (body, arrow and marker). + ## + ## @example + ## @group + ## [x, y] = meshgrid (1:2:20); + ## quiver (x, y, sin (2*pi*x/10), sin (2*pi*y/10)); + ## @end group + ## @end example + ## + ## @seealso{plot} + ## @end deftypefn + + function retval = quiver (varargin) + + if (nargin < 2) + print_usage (); + elseif (isscalar (varargin{1}) && ishandle (varargin{1})) + h = varargin {1}; + if (! strcmp (get (h, "type"), "axes")) + error ("quiver: expecting first argument to be an axes object"); + endif + oldh = gca (); + unwind_protect + axes (h); + newplot (); + tmp = __quiver__ (h, varargin{2:end}); + unwind_protect_cleanup + axes (oldh); + end_unwind_protect + else + newplot (); + tmp = __quiver__ (gca (), varargin{:}); + endif + + if (nargout > 0) + retval = tmp; + endif + + endfunction + + function hlist = __quiver__ (varargin) + h = varargin {1}; + + s = 1; + arrowsize = 0.33; + + firstnonnumeric = Inf; + for i = 2:nargin + if (! isnumeric (varargin {i})) + firstnonnumeric = i; + break; + endif + endfor + + if (nargin < 5 || firstnonnumeric < 5) + u = varargin{2}; + v = varargin{3}; + if (nargin == 4 && isnumeric (varargin{4}) && isscalar (varargin{4})) + s = varargin{4}; + iarg = 5; + else + iarg = 4; + endif + [x, y] = meshgrid (1:size(u,1), 1:size(u,2)); + else + x = varargin{2}; + y = varargin{3}; + u = varargin{4}; + v = varargin{5}; + if (isvector(x) && isvector(y) && (!isvector (u) || !isvector (v))) + [x, y] = meshgrid (x, y); + endif + if (nargin > 5 && isnumeric (varargin{6}) && isscalar (varargin{6})) + s = varargin{6}; + iarg = 7; + else + iarg = 6; + endif + endif + + have_filled = false; + have_line_spec = false; + while (iarg <= nargin) + arg = varargin {iarg++}; + if (ischar (arg) && strncmp (tolower (arg), "filled", 6)) + have_filled = true; + elseif ((isstr (arg) || iscell (arg)) + && ! have_line_spec) + [linespec, valid] = __pltopt__ ("quiver", arg, false); + if (valid) + have_line_spec = true; + if (strncmp (linespec.linestyle, "none", 4)) + linespec.linestyle = "-"; + endif + else + error ("quiver: invalid linespec"); + endif + else + error ("quiver: unrecognized argument"); + endif + endwhile + + if (s) + ## Scale the arrows to fit in the grid + dx = (max(x(:)) - min(x(:))) ./ size (x, 2); + dy = (max(y(:)) - min(y(:))) ./ size (y, 1); + len = max (sqrt (u(:).^2 + dy(:).^2)); + if (len > 0) + s = s / sqrt (2) * sqrt (dx.^2 + dy.^2) / len; + u = s * u; + v = s * v; + endif + endif + + x = x(:); + y = y(:); + xend = x + u(:); + yend = y + v(:); + + hstate = get (h, "nextplot"); + unwind_protect + if (have_line_spec) + h1 = plot ([x.'; xend.'; NaN(1, length (x))](:), + [y.'; yend.'; NaN(1, length (y))](:), + "linestyle", linespec.linestyle); + else + h1 = plot ([x.'; xend.'; NaN(1, length (x))](:), + [y.'; yend.'; NaN(1, length (y))](:)); + endif + hold on; + + xtmp = x + u(:) .* (1 - arrowsize); + ytmp = y + v(:) .* (1 - arrowsize); + xarrw1 = xtmp + (y - yend) * arrowsize / 3; + xarrw2 = xtmp - (y - yend) * arrowsize / 3; + yarrw1 = ytmp - (x - xend) * arrowsize / 3; + yarrw2 = ytmp + (x - xend) * arrowsize / 3; + + if (have_line_spec) + if (isfield (linespec, "marker") && + ! strncmp (linespec.marker, "none", 4)) + h2 = plot ([xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:), + [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:), + "linestyle", "none"); + else + h2 = plot ([xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:), + [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:), + "linestyle", linespec.linestyle); + endif + else + h2 = plot ([xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:), + [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:)); + endif + + if (! have_line_spec || (isfield (linespec, "marker") && + strncmp (linespec.marker, "none", 4))) + h3 = plot (x, y, "linestyle", "none", "marker", "none"); + else + h3 = plot (x, y, "linestyle", "none", "marker", linespec.marker); + endif + if (have_filled) + ## FIXME gnuplot doesn't respect the markerfacecolor field + set(h3, "markerfacecolor", get (h1, "color")); + endif + unwind_protect_cleanup + set (h, "nextplot", hstate); + end_unwind_protect + + hlist = [h1; h2; h3]; + + endfunction + + %!demo + %! [x,y] = meshgrid(1:2:20); + %! quiver(x,y,sin(2*pi*x/10),sin(2*pi*y/10)) + + %!demo + %! axis("equal"); + %! x=linspace(0,3,80); y=sin(2*pi*x); theta=2*pi*x+pi/2; + %! quiver(x,y,sin(theta)/10,cos(theta)/10); + %! hold on; plot(x,y,"r"); hold off; diff -cNr octave-2.9.16/scripts/plot/shading.m octave-2.9.17/scripts/plot/shading.m *** octave-2.9.16/scripts/plot/shading.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/shading.m Fri Nov 9 14:34:17 2007 *************** *** 0 **** --- 1,61 ---- + ## Copyright (C) 2006, 2007 Kai Habel + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 2, or (at your option) + ## any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, write to the Free + ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + ## 02110-1301, USA. + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} shading (@var{type}) + ## @deftypefnx {Function File} {} shading (@var{ax}, @dots{}) + ## Set the shading of surface or patch graphic objects. Valid arguments + ## for @var{type} are @code{"flat"}, @code{"interp"}, or + ## @code{"faceted"}. If @var{ax} is given the shading is applied to + ## axis @var{ax} instead of the current axis. + ## @end deftypefn + + ## Author: Kai Habel + + function shading (ax, mode) + + if (nargin == 1) + mode = ax; + ax = gca (); + endif + + if (nargin != 1 && nargin != 2) + print_usage (); + endif + + h1 = findobj (ax, "type", "patch"); + h2 = findobj (ax, "type", "surface"); + + obj = [h1, h2]; + + for n = 1:numel(obj) + h = obj(n); + if (strcmp (mode, "flat")) + set (h, "facecolor", "flat"); + set (h, "edgecolor", "none"); + elseif (strcmp (mode, "interp")) + set (h, "facecolor", "interp"); + set (h, "edgecolor", "none"); + elseif (strcmp (mode, "faceted")) + set (h, "facecolor", "flat"); + set (h, "edgecolor", [0 0 0]); + else + error ("unknown argument"); + endif + endfor + + endfunction diff -cNr octave-2.9.16/scripts/plot/subplot.m octave-2.9.17/scripts/plot/subplot.m *** octave-2.9.16/scripts/plot/subplot.m Wed Oct 31 13:12:39 2007 --- octave-2.9.17/scripts/plot/subplot.m Tue Nov 6 15:32:25 2007 *************** *** 37,44 **** ## \vskip 10pt ## \hfil\vbox{\offinterlineskip\hrule ## \halign{\vrule#&&\qquad\hfil#\hfil\qquad\vrule\cr ! ## height13pt&1&2&3\cr height12pt&&&&\cr\noalign{\hrule} ! ## height13pt&4&5&6\cr height12pt&&&&\cr\noalign{\hrule}}} ## \hfil ## \vskip 10pt ## @end tex --- 37,44 ---- ## \vskip 10pt ## \hfil\vbox{\offinterlineskip\hrule ## \halign{\vrule#&&\qquad\hfil#\hfil\qquad\vrule\cr ! ## height13pt&1&2&3\cr height12pt&&&\cr\noalign{\hrule} ! ## height13pt&4&5&6\cr height12pt&&&\cr\noalign{\hrule}}} ## \hfil ## \vskip 10pt ## @end tex diff -cNr octave-2.9.16/scripts/plot/surf.m octave-2.9.17/scripts/plot/surf.m *** octave-2.9.16/scripts/plot/surf.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/surf.m Fri Nov 9 12:49:45 2007 *************** *** 0 **** --- 1,49 ---- + ## Copyright (C) 2007 Kai Habel + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} surf (@var{x}, @var{y}, @var{z}) + ## Plot a surface given matrices @var{x}, and @var{y} from @code{meshgrid} and + ## a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of + ## the mesh. If @var{x} and @var{y} are vectors, then a typical vertex + ## is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, columns of @var{z} + ## correspond to different @var{x} values and rows of @var{z} correspond + ## to different @var{y} values. + ## @seealso{mesh, surface} + ## @end deftypefn + + ## Author: Kai Habel + + function h = surf (varargin) + + newplot (); + + tmp = surface (varargin{:}); + + ax = get (tmp, "parent"); + + set (tmp, "facecolor", "flat"); + if (! ishold ()) + set (ax, "view", [-37.5, 30]); + endif + + if (nargout > 0) + h = tmp; + endif + + endfunction diff -cNr octave-2.9.16/scripts/plot/surface.m octave-2.9.17/scripts/plot/surface.m *** octave-2.9.16/scripts/plot/surface.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/surface.m Fri Nov 9 12:49:45 2007 *************** *** 0 **** --- 1,97 ---- + ## Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2004, + ## 2005, 2006, 2007 John W. Eaton + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} @var{h} = {} surface (@var{x}, @var{y}, @var{z}, @var{c}) + ## @deftypefnx {Function File} @var{h} = {} surface (@var{x}, @var{y}, @var{z}) + ## Plot a surface graphic object given matrices @var{x}, and @var{y} from @code{meshgrid} and + ## a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of + ## the surface. If @var{x} and @var{y} are vectors, then a typical vertex + ## is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, columns of @var{z} + ## correspond to different @var{x} values and rows of @var{z} correspond + ## to different @var{y} values. + ## @seealso{surf, mesh, patch, line} + ## @end deftypefn + + ## Author: jwe + + function h = surface (x, y, z, c) + + ax = gca (); + + if (nargin == 1) + c = z = x; + if (ismatrix (z)) + [nr, nc] = size (z); + x = 1:nc; + y = (1:nr)'; + else + error ("surface: argument must be a matrix"); + endif + elseif (nargin == 3) + c = z; + if (isvector (x) && isvector (y) && ismatrix (z)) + if (rows (z) == length (y) && columns (z) == length (x)) + x = x(:)'; + y = y(:); + else + error ("surface: rows (z) must be the same as length (y) and columns (z) must be the same as length (x)"); + endif + elseif (ismatrix (x) && ismatrix (y) && ismatrix (z)) + if (! (size_equal (x, y) && size_equal (x, z))) + error ("surface: x, y, and z must have same dimensions"); + endif + else + error ("surface: x and y must be vectors and z must be a matrix"); + endif + elseif (nargin == 4) + if (! size_equal (z, c)) + error ("surface: z and c must have same size"); + endif + if (isvector (x) && isvector (y) && ismatrix (z)) + if (rows (z) == length (y) && columns (z) == length (x)) + x = x(:)'; + y = y(:); + else + error ("surface: rows (z) must be the same as length (y) and columns (z) must be the same as length (x)"); + endif + elseif (ismatrix (x) && ismatrix (y) && ismatrix (z)) + if (! (size_equal (x, y) && size_equal (x, z))) + error ("surface: x, y, and z must have same dimensions"); + endif + else + error ("surface: x and y must be vectors and z must be a matrix"); + endif + else + print_usage (); + endif + + ## Make a default surface object. + tmp = __go_surface__ (ax, "xdata", x, "ydata", y, "zdata", z, "cdata", c); + set (tmp, "facecolor","flat"); + + if (! ishold ()) + set (ax, "view", [0, 90], "box", "off", "xgrid", "on", "ygrid", "on", "zgrid", "on"); + endif + + if (nargout > 0) + h = tmp; + endif + + endfunction diff -cNr octave-2.9.16/scripts/plot/surfc.m octave-2.9.17/scripts/plot/surfc.m *** octave-2.9.16/scripts/plot/surfc.m Wed Dec 31 19:00:00 1969 --- octave-2.9.17/scripts/plot/surfc.m Fri Nov 9 12:49:45 2007 *************** *** 0 **** --- 1,77 ---- + ## Copyright (C) 1996, 1997, 2007 John W. Eaton + ## + ## This file is part of Octave. + ## + ## Octave is free software; you can redistribute it and/or modify it + ## under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 3 of the License, or (at + ## your option) any later version. + ## + ## Octave is distributed in the hope that it will be useful, but + ## WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ## General Public License for more details. + ## + ## You should have received a copy of the GNU General Public License + ## along with Octave; see the file COPYING. If not, see + ## . + + ## -*- texinfo -*- + ## @deftypefn {Function File} {} surfc (@var{x}, @var{y}, @var{z}) + ## Plot a surface and contour given matrices @var{x}, and @var{y} from + ## @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and + ## @var{y} coordinates of the mesh. If @var{x} and @var{y} are vectors, + ## then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)). Thus, + ## columns of @var{z} correspond to different @var{x} values and rows of + ## @var{z} correspond to different @var{y} values. + ## @seealso{meshgrid, surf, contour} + ## @end deftypefn + + function h = surfc (varargin) + + newplot (); + + tmp = surface (varargin{:}); + + ax = get (tmp, "parent"); + + set (tmp, "facecolor", "flat"); + + if (! ishold ()) + set (ax, "view", [-37.5, 30]); + endif + + hold ("on"); + + [c, lev] = contourc (varargin{:}); + + cmap = get (gcf(), "colormap"); + + levx = linspace (min (lev), max (lev), size (cmap, 1)); + + drawnow (); + ax = axis (); + zmin = 2 * ax(5) - ax(6); + + ## decode contourc output format + i1 = 1; + while (i1 < length (c)) + + clev = c(1,i1); + clen = c(2,i1); + + ccr = interp1 (levx, cmap(:,1), clev); + ccg = interp1 (levx, cmap(:,2), clev); + ccb = interp1 (levx, cmap(:,3), clev); + + ii = i1+1:i1+clen; + line (c(1,ii), c(2,ii), zmin*ones(size(ii)), "color", [ccr, ccg, ccb]); + + i1 += c(2,i1)+1; + endwhile + + if (nargout > 0) + h = tmp; + endif + + endfunction diff -cNr octave-2.9.16/scripts/polynomial/mpoles.m octave-2.9.17/scripts/polynomial/mpoles.m *** octave-2.9.16/scripts/polynomial/mpoles.m Fri Oct 12 02:41:10 2007 --- octave-2.9.17/scripts/polynomial/mpoles.m Fri Nov 9 14:34:17 2007 *************** *** 95,101 **** p0 = mean (abs (p(find (abs (p) > 0)))); if (isempty (p0)) p0 = 1; ! end else p0 = abs (p(n)); endif --- 95,101 ---- p0 = mean (abs (p(find (abs (p) > 0)))); if (isempty (p0)) p0 = 1; ! endif else p0 = abs (p(n)); endif diff -cNr octave-2.9.16/scripts/polynomial/polyint.m octave-2.9.17/scripts/polynomial/polyint.m *** octave-2.9.16/scripts/polynomial/polyint.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/polynomial/polyint.m Fri Nov 9 14:34:17 2007 *************** *** 50,56 **** if (lp == 0) p = []; return; ! end if (rows (p) > 1) ## Convert to column vector --- 50,56 ---- if (lp == 0) p = []; return; ! endif if (rows (p) > 1) ## Convert to column vector diff -cNr octave-2.9.16/scripts/quaternion/qconj.m octave-2.9.17/scripts/quaternion/qconj.m *** octave-2.9.16/scripts/quaternion/qconj.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qconj.m Wed Nov 7 21:29:23 2007 *************** *** 32,37 **** --- 32,41 ---- function retval = qconj (q) + if (nargin != 1 ) + print_usage (); + endif + [a, b, c, d] = quaternion (q); retval = quaternion (-a, -b, -c, d); diff -cNr octave-2.9.16/scripts/quaternion/qcoordinate_plot.m octave-2.9.17/scripts/quaternion/qcoordinate_plot.m *** octave-2.9.16/scripts/quaternion/qcoordinate_plot.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qcoordinate_plot.m Wed Nov 7 21:29:23 2007 *************** *** 38,43 **** --- 38,47 ---- function qcoordinate_plot (qf, qb, qv) + if (nargin != 3 ) + print_usage (); + endif + degrees = pi / 180; d180 = 180 * degrees; diff -cNr octave-2.9.16/scripts/quaternion/qderiv.m octave-2.9.17/scripts/quaternion/qderiv.m *** octave-2.9.16/scripts/quaternion/qderiv.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qderiv.m Wed Nov 7 21:29:24 2007 *************** *** 43,48 **** --- 43,52 ---- function Dmat = qderivmat (Omega) + if (nargin != 1) + print_usage (); + endif + Omega = vec (Omega); if (length (Omega) != 3) diff -cNr octave-2.9.16/scripts/quaternion/qderivmat.m octave-2.9.17/scripts/quaternion/qderivmat.m *** octave-2.9.16/scripts/quaternion/qderivmat.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qderivmat.m Wed Nov 7 21:29:24 2007 *************** *** 43,48 **** --- 43,52 ---- function Dmat = qderivmat (Omega) + if (nargin != 1 ) + print_usage (); + endif + Omega = vec (Omega); if (length (Omega) != 3) diff -cNr octave-2.9.16/scripts/quaternion/qinv.m octave-2.9.17/scripts/quaternion/qinv.m *** octave-2.9.16/scripts/quaternion/qinv.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qinv.m Wed Nov 7 21:29:24 2007 *************** *** 32,37 **** --- 32,41 ---- function retval = qinv (q) + if (nargin != 1) + print_usage (); + endif + if (norm (q) != 0) retval = qconj (q) / sum (q .* q); else diff -cNr octave-2.9.16/scripts/quaternion/qmult.m octave-2.9.17/scripts/quaternion/qmult.m *** octave-2.9.16/scripts/quaternion/qmult.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qmult.m Wed Nov 7 21:29:24 2007 *************** *** 40,46 **** ## Adapted-By: jwe function retval = qmult (a, b) ! [a1, b1, c1, d1] = quaternion (a); [a2, b2, c2, d2] = quaternion (b); --- 40,50 ---- ## Adapted-By: jwe function retval = qmult (a, b) ! ! if (nargin != 2 ) ! print_usage (); ! endif ! [a1, b1, c1, d1] = quaternion (a); [a2, b2, c2, d2] = quaternion (b); diff -cNr octave-2.9.16/scripts/quaternion/qtrans.m octave-2.9.17/scripts/quaternion/qtrans.m *** octave-2.9.16/scripts/quaternion/qtrans.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qtrans.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function v = qtrans (v, q) + if (nargin != 2) + print_usage (); + endif + if (! isvector (v) || length (v) != 4) error ("qtrans: v(%d,%d) must be a quaternion", rows (v), columns (v)); elseif (! isvector (q) || length (q) != 4) diff -cNr octave-2.9.16/scripts/quaternion/qtransvmat.m octave-2.9.17/scripts/quaternion/qtransvmat.m *** octave-2.9.16/scripts/quaternion/qtransvmat.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/quaternion/qtransvmat.m Wed Nov 7 21:29:24 2007 *************** *** 29,34 **** --- 29,38 ---- function Aib = qtransvmat (qib) + if (nargin != 1) + print_usage (); + endif + if (! isvector(qib) || length (qib) != 4) error ("qtransvmat: q(%d,%d) must be a quaternion", rows (qib), \ columns (qib)); diff -cNr octave-2.9.16/scripts/set/ismember.m octave-2.9.17/scripts/set/ismember.m *** octave-2.9.16/scripts/set/ismember.m Mon Oct 29 15:12:28 2007 --- octave-2.9.17/scripts/set/ismember.m Thu Nov 8 10:20:11 2007 *************** *** 17,134 **** ## . ## -*- texinfo -*- ! ## @deftypefn {Function File} {} ismember (@var{A}, @var{S}) ! ## Return a matrix the same shape as @var{A} which has 1 if ! ## @code{A(i,j)} is in @var{S} or 0 if it isn't. ## @seealso{unique, union, intersection, setxor, setdiff} ## @end deftypefn ! ## Author: Paul Kienzle ## Adapted-by: jwe ! function c = ismember (a, S) ! if (nargin != 2) print_usage (); endif ! if (isempty (a) || isempty (S)) ! c = zeros (size (a), "logical"); ! else ! if (iscell (a) && ! iscell (S)) ! tmp{1} = S; ! S = tmp; ! endif ! if (! iscell (a) && iscell (S)) ! tmp{1} = a; ! a = tmp; ! endif ! S = unique (S(:)); ! lt = length (S); ! if (lt == 1) ! if (iscell (a) || iscell (S)) ! c = cellfun ("length", a) == cellfun ("length", S); ! idx = find (c); ! if (isempty (idx)) ! c = zeros (size (a), "logical"); ! else ! c(idx) = all (char (a(idx)) == repmat (char (S), length (idx), 1), 2); ! endif else ! c = (a == S); endif ! elseif (numel (a) == 1) ! if (iscell (a) || iscell (S)) ! c = cellfun ("length", a) == cellfun ("length", S); ! idx = find (c); ! if (isempty (idx)) ! c = zeros (size (a), "logical"); ! else ! c(idx) = all (repmat (char (a), length (idx), 1) == char (S(idx)), 2); ! c = any(c); ! endif else ! c = any (a == S); endif ! else ! ## Magic: the following code determines for each a, the index i ! ## such that S(i)<= a < S(i+1). It does this by sorting the a ! ## into S and remembering the source index where each element came ! ## from. Since all the a's originally came after all the S's, if ! ## the source index is less than the length of S, then the element ! ## came from S. We can then do a cumulative sum on the indices to ! ## figure out which element of S each a comes after. ! ## E.g., S=[2 4 6], a=[1 2 3 4 5 6 7] ! ## unsorted [S a] = [ 2 4 6 1 2 3 4 5 6 7 ] ! ## sorted [ S a ] = [ 1 2 2 3 4 4 5 6 6 7 ] ! ## source index p = [ 4 1 5 6 2 7 8 3 9 10 ] ! ## boolean p<=l(S) = [ 0 1 0 0 1 0 0 1 0 0 ] ! ## cumsum(p<=l(S)) = [ 0 1 1 1 2 2 2 3 3 3 ] ! ## Note that this leaves a(1) coming after S(0) which doesn't ! ## exist. So arbitrarily, we will dump all elements less than ! ## S(1) into the interval after S(1). We do this by dropping S(1) ! ## from the sort! E.g., S=[2 4 6], a=[1 2 3 4 5 6 7] ! ## unsorted [S(2:3) a] =[4 6 1 2 3 4 5 6 7 ] ! ## sorted [S(2:3) a] = [ 1 2 3 4 4 5 6 6 7 ] ! ## source index p = [ 3 4 5 1 6 7 2 8 9 ] ! ## boolean p<=l(S)-1 = [ 0 0 0 1 0 0 1 0 0 ] ! ## cumsum(p<=l(S)-1) = [ 0 0 0 1 1 1 2 2 2 ] ! ## Now we can use Octave's lvalue indexing to "invert" the sort, ! ## and assign all these indices back to the appropriate A and S, ! ## giving S_idx = [ -- 1 2], a_idx = [ 0 0 0 1 1 2 2 ]. Add 1 to ! ## a_idx, and we know which interval S(i) contains a. It is ! ## easy to now check membership by comparing S(a_idx) == a. This ! ## magic works because S starts out sorted, and because sort ! ## preserves the relative order of identical elements. ! [v, p] = sort ([S(2:lt); a(:)]); ! idx(p) = cumsum (p <= lt-1) + 1; ! idx = idx(lt:end); ! if (iscell (a) || iscell (S)) ! c = (cellfun ("length", a) ! == reshape (cellfun ("length", S(idx)), size (a))); ! idx2 = find (c); ! c(idx2) = all (char (a(idx2)) == char (S(idx)(idx2)), 2); ! else ! c = (a == reshape (S (idx), size (a))); endif endif endif ! endfunction %!assert (ismember ({''}, {'abc', 'def'}), false); %!assert (ismember ('abc', {'abc', 'def'}), true); %!assert (isempty (ismember ([], [1, 2])), true); %!assert (isempty (ismember ({}, {'a', 'b'})), true); ! %!xtest assert (ismember ('', {'abc', 'def'}), false); ! %!xtest fail ('ismember ([], {1, 2})', 'error:.*'); %!fail ('ismember ({[]}, {1, 2})', 'error:.*'); ! %!xtest fail ('ismember ({}, {1, 2})', 'error:.*'); ! %!assert (ismember ({'foo', 'bar'}, {'foobar'}), logical ([0, 0])) ! %!assert (ismember ({'foo'}, {'foobar'}), false) ! %!assert (ismember ({'bar'}, {'foobar'}), false) ! %!assert (ismember ({'bar'}, {'foobar', 'bar'}), true) ! %!assert (ismember ({'foo', 'bar'}, {'foobar', 'bar'}), logical ([0, 1])) ! %!assert (ismember ({'xfb', 'f', 'b'}, {'fb', 'b'}), logical ([0, 0, 1])) ! %!assert (ismember ("1", "0123456789."), true) ! %!assert (ismember ("1.1", "0123456789."), logical ([1, 1, 1])) --- 17,282 ---- ## . ## -*- texinfo -*- ! ## @deftypefn {Function File} {[@var{tf}, @var{a_idx}] =} ismember (@var{A}, @var{S}) ! ## @deftypefnx {Function File} {[@var{tf}, @var{a_idx}] =} ismember (@var{A}, @var{S}, "rows") ! ## Return a matrix @var{tf} the same shape as @var{A} which has 1 if ! ## @code{A(i,j)} is in @var{S} or 0 if it isn't. If a second output argument ! ## is requested, the indexes into @var{S} of the matching elements are ! ## also returned. ! ## ! ## @example ! ## @group ! ## a = [3, 10, 1]; ! ## s = [0:9]; ! ## [tf, a_idx] = residue (a, s); ! ## @result{} tf = [1, 0, 1] ! ## @result{} a_idx = [4, 0, 2] ! ## @end group ! ## @end example ! ## ! ## The inputs, @var{A} and @var{S}, may also be cell arrays. ! ## ! ## @example ! ## @group ! ## a = @{'abc'@}; ! ## s = @{'abc', 'def'@}; ! ## [tf, a_idx] = residue (a, s); ! ## @result{} tf = [1, 0] ! ## @result{} a_idx = [1, 0] ! ## @end group ! ## @end example ! ## ! ## With the optional third argument @code{"rows"}, and matrices ! ## @var{A} and @var{S} with the same number of columns, compare rows in ! ## @var{A} with the rows in @var{S}. ! ## ! ## @example ! ## @group ! ## a = [1:3; 5:7; 4:6]; ! ## s = [0:2; 1:3; 2:4; 3:5; 4:6]; ! ## [tf, a_idx] = ismember(a, s, 'rows'); ! ## @result{} tf = logical ([1; 0; 1]) ! ## @result{} a_idx = [2; 0; 5]; ! ## @end group ! ## @end example ! ## ## @seealso{unique, union, intersection, setxor, setdiff} ## @end deftypefn ! ## Author: Paul Kienzle ! ## Author: Søren Hauberg ! ## Author: Ben Abbott ## Adapted-by: jwe ! function [tf, a_idx] = ismember (a, s, rows_opt) ! if (nargin == 2 || nargin == 3) ! if (iscell (a) || iscell (s)) ! if (nargin == 3) ! error ("ismember: with 'rows' both sets must be matrices"); ! else ! [tf, a_idx] = cell_ismember (a, s); ! endif ! else ! if (nargin == 3) ! ## The 'rows' argument is handled in a fairly ugly way. A better ! ## solution would be to vectorize this loop over 'r' below. ! if (strcmpi (rows_opt, "rows") && ismatrix (a) && ismatrix (s) ! && columns (a) == columns (s)) ! rs = rows (s); ! ra = rows (a); ! a_idx = zeros (ra, 1); ! for r = 1:ra ! tmp = ones (rs, 1) * a(r,:); ! f = find (all (tmp' == s'), 1); ! if (! isempty (f)) ! a_idx(r) = f; ! endif ! endfor ! tf = logical (a_idx); ! elseif (strcmpi (rows_opt, "rows")) ! error ("ismember: with 'rows' both sets must be matrices with an equal number of columns"); ! else ! error ("ismember: invalid input"); ! endif ! else ! ## Input checking ! if (! isa (a, class (s))) ! error ("ismember: both input arguments must be the same type"); ! elseif (! ischar (a) && ! isnumeric (a)) ! error ("ismember: input arguments must be arrays, cell arrays, or strings"); ! elseif (ischar (a) && ischar (s)) ! a = uint8 (a); ! s = uint8 (s); ! endif ! ## Convert matrices to vectors. ! if (all (size (a) > 1)) ! a = a(:); ! endif ! if (all (size (s) > 1)) ! s = s(:); ! endif ! ## Do the actual work. ! if (isempty (a) || isempty (s)) ! tf = zeros (size (a), "logical"); ! a_idx = []; ! elseif (numel (s) == 1) ! tf = (a == s); ! a_idx = double (tf); ! elseif (numel (a) == 1) ! f = find (a == s, 1); ! tf = !isempty (f); ! a_idx = f; ! if (isempty (a_idx)) ! a_idx = 0; ! endif ! else ! ## Magic: the following code determines for each a, the index i ! ## such that s(i)<= a < s(i+1). It does this by sorting the a ! ## into s and remembering the source index where each element came ! ## from. Since all the a's originally came after all the s's, if ! ## the source index is less than the length of s, then the element ! ## came from s. We can then do a cumulative sum on the indices to ! ## figure out which element of s each a comes after. ! ## E.g., s=[2 4 6], a=[1 2 3 4 5 6 7] ! ## unsorted [s a] = [ 2 4 6 1 2 3 4 5 6 7 ] ! ## sorted [s a] = [ 1 2 2 3 4 4 5 6 6 7 ] ! ## source index p = [ 4 1 5 6 2 7 8 3 9 10 ] ! ## boolean p<=l(s) = [ 0 1 0 0 1 0 0 1 0 0 ] ! ## cumsum(p<=l(s)) = [ 0 1 1 1 2 2 2 3 3 3 ] ! ## Note that this leaves a(1) coming after s(0) which doesn't ! ## exist. So arbitrarily, we will dump all elements less than ! ## s(1) into the interval after s(1). We do this by dropping s(1) ! ## from the sort! E.g., s=[2 4 6], a=[1 2 3 4 5 6 7] ! ## unsorted [s(2:3) a] =[4 6 1 2 3 4 5 6 7 ] ! ## sorted [s(2:3) a] = [ 1 2 3 4 4 5 6 6 7 ] ! ## source index p = [ 3 4 5 1 6 7 2 8 9 ] ! ## boolean p<=l(s)-1 = [ 0 0 0 1 0 0 1 0 0 ] ! ## cumsum(p<=l(s)-1) = [ 0 0 0 1 1 1 2 2 2 ] ! ## Now we can use Octave's lvalue indexing to "invert" the sort, ! ## and assign all these indices back to the appropriate a and s, ! ## giving s_idx = [ -- 1 2], a_idx = [ 0 0 0 1 1 2 2 ]. Add 1 to ! ## a_idx, and we know which interval s(i) contains a. It is ! ## easy to now check membership by comparing s(a_idx) == a. This ! ## magic works because s starts out sorted, and because sort ! ## preserves the relative order of identical elements. ! lt = numel(s); ! [s, sidx] = sort (s); ! [v, p] = sort ([s(2:lt)(:); a(:)]); ! idx(p) = cumsum (p <= lt-1) + 1; ! idx = idx(lt:end); ! tf = (a == reshape (s (idx), size (a))); ! a_idx = zeros (size(tf)); ! a_idx(tf) = sidx(idx(tf)); ! endif ! ## Resize result to the original size of 'a' ! size_a = size(a); ! tf = reshape (tf, size_a); ! a_idx = reshape (a_idx, size_a); ! endif ! endif ! else print_usage (); endif ! endfunction ! ! function [tf, a_idx] = cell_ismember (a, s) ! if (nargin == 2) ! if (ischar (a) && iscellstr (s)) ! if (isempty (a)) # Work around bug in 'cellstr' ! a = {''}; else ! a = cellstr (a); endif ! elseif (iscellstr (a) && ischar (s)) ! if (isempty (s)) # Work around bug in 'cellstr' ! s = {''}; else ! s = cellstr (s); endif ! endif ! if (iscellstr (a) && iscellstr (s)) ! ## Do the actual work ! if (isempty (a) || isempty (s)) ! tf = zeros (size (a), "logical"); ! a_idx = []; ! elseif (numel (s) == 1) ! tf = strcmp (a, s); ! a_idx = double (tf); ! elseif (numel (a) == 1) ! f = find (strcmp (a, s), 1); ! tf = !isempty (f); ! a_idx = f; ! if (isempty (a_idx)) ! a_idx = 0; ! endif ! else ! lt = numel (s); ! [s, sidx] = sort (s); ! [v, p] = sort ([s(2:lt)(:); a(:)]); ! idx(p) = cumsum (p <= lt-1) + 1; ! idx = idx(lt:end); ! tf = (cellfun ("length", a) ! == reshape (cellfun ("length", s(idx)), size (a))); ! idx2 = find (tf); ! tf(idx2) = (all (char (a(idx2)) == char (s(idx)(idx2)), 2)); ! a_idx = zeros (size (tf)); ! a_idx(tf) = sidx(idx(tf)); endif + else + error ("cell_ismember: arguments must be cell arrays of character strings"); endif + else + print_usage (); endif ! ## Resize result to the original size of 'a' ! size_a = size (a); ! tf = reshape (tf, size_a); ! a_idx = reshape (a_idx, size_a); endfunction %!assert (ismember ({''}, {'abc', 'def'}), false); %!assert (ismember ('abc', {'abc', 'def'}), true); %!assert (isempty (ismember ([], [1, 2])), true); %!assert (isempty (ismember ({}, {'a', 'b'})), true); ! %!assert (ismember ('', {'abc', 'def'}), false); ! %!fail ('ismember ([], {1, 2})', 'error:.*'); %!fail ('ismember ({[]}, {1, 2})', 'error:.*'); ! %!fail ('ismember ({}, {1, 2})', 'error:.*'); ! %!fail ('ismember ({1}, {''1'', ''2''})', 'error:.*'); ! %!fail ('ismember (1, ''abc'')', 'error:.*'); ! %!fail ('ismember ({''1''}, {''1'', ''2''},''rows'')', 'error:.*'); ! %!fail ('ismember ([1 2 3], [5 4 3 1], ''rows'')', 'error:.*'); ! %!assert (ismember ({'foo', 'bar'}, {'foobar'}), logical ([0, 0])); ! %!assert (ismember ({'foo'}, {'foobar'}), false); ! %!assert (ismember ({'bar'}, {'foobar'}), false); ! %!assert (ismember ({'bar'}, {'foobar', 'bar'}), true); ! %!assert (ismember ({'foo', 'bar'}, {'foobar', 'bar'}), logical ([0, 1])); ! %!assert (ismember ({'xfb', 'f', 'b'}, {'fb', 'b'}), logical ([0, 0, 1])); ! %!assert (ismember ("1", "0123456789."), true); ! ! %!test ! %! [result, a_idx] = ismember([1 2 3 4 5], [3]); ! %! assert (all (result == logical ([0 0 1 0 0])) && all (a_idx == [0 0 1 0 0])); ! ! %!test ! %! [result, a_idx] = ismember([1 6], [1 2 3 4 5 1 6 1]); ! %! assert (all (result == logical ([1 1])) && all (a_idx == [8 7])); ! ! %!test ! %! [result, a_idx] = ismember ([3,10,1], [0,1,2,3,4,5,6,7,8,9]); ! %! assert (all (result == logical ([1, 0, 1])) && all (a_idx == [4, 0, 2])); ! ! %!test ! %! [result, a_idx] = ismember ("1.1", "0123456789.1"); ! %! assert (all (result == logical ([1, 1, 1])) && all (a_idx == [12, 11, 12])); ! ! %!test ! %! [result, a_idx] = ismember([1:3; 5:7; 4:6], [0:2; 1:3; 2:4; 3:5; 4:6], 'rows'); ! %! assert (all (result == logical ([1; 0; 1])) && all (a_idx == [2; 0; 5])); ! ! %!test ! %! [result, a_idx] = ismember([1.1,1.2,1.3; 2.1,2.2,2.3; 10,11,12], [1.1,1.2,1.3; 10,11,12; 2.12,2.22,2.32], 'rows'); ! %! assert (all (result == logical ([1; 0; 1])) && all (a_idx == [1; 0; 2])); ! diff -cNr octave-2.9.16/scripts/signal/fractdiff.m octave-2.9.17/scripts/signal/fractdiff.m *** octave-2.9.16/scripts/signal/fractdiff.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/fractdiff.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function retval = fractdiff (x, d) + if (nargin != 2) + print_usage (); + endif + N = 100; if (! isvector (x)) diff -cNr octave-2.9.16/scripts/signal/freqz.m octave-2.9.17/scripts/signal/freqz.m *** octave-2.9.16/scripts/signal/freqz.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/freqz.m Fri Nov 9 14:34:17 2007 *************** *** 147,153 **** f_r = f; else # plot and don't return values freqz_plot (f, h); ! end endfunction --- 147,153 ---- f_r = f; else # plot and don't return values freqz_plot (f, h); ! endif endfunction diff -cNr octave-2.9.16/scripts/signal/freqz_plot.m octave-2.9.17/scripts/signal/freqz_plot.m *** octave-2.9.16/scripts/signal/freqz_plot.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/freqz_plot.m Wed Nov 7 21:29:24 2007 *************** *** 25,62 **** function freqz_plot (w, h) ! n = length (w); ! ! ## ## exclude zero-frequency ! ## h = h (2 : length (h)); ! ## w = w (2 : length (w)); ! ## n = n-1; ! ! mag = 20 * log10 (abs (h)); ! phase = unwrap (arg (h)); ! maxmag = max (mag); ! ! subplot (3, 1, 1); ! plot (w, mag); ! grid ("on"); ! legend("Pass band (dB)"); ! axis ([w(1), w(n), maxmag-3, maxmag], "labely"); ! ! subplot (3, 1, 2); ! plot (w, mag); ! grid ("on"); ! legend ("Stop band (dB)"); ! if (maxmag - min (mag) > 100) ! axis ([w(1), w(n), maxmag-100, maxmag], "labely"); ! else ! axis ("autoy", "labely"); ! endif ! ! subplot (3, 1, 3); ! plot (w, phase*360/(2*pi)); ! grid ("on"); ! legend ("Phase (degrees)"); ! xlabel ("Frequency"); ! axis ([w(1), w(n)], "autoy", "label"); endfunction --- 25,66 ---- function freqz_plot (w, h) ! if (nargin != 2) ! print_usage (); ! endif ! ! n = length (w); ! ! ## ## exclude zero-frequency ! ## h = h (2 : length (h)); ! ## w = w (2 : length (w)); ! ## n = n-1; ! ! mag = 20 * log10 (abs (h)); ! phase = unwrap (arg (h)); ! maxmag = max (mag); ! ! subplot (3, 1, 1); ! plot (w, mag); ! grid ("on"); ! legend("Pass band (dB)"); ! axis ([w(1), w(n), maxmag-3, maxmag], "labely"); ! ! subplot (3, 1, 2); ! plot (w, mag); ! grid ("on"); ! legend ("Stop band (dB)"); ! if (maxmag - min (mag) > 100) ! axis ([w(1), w(n), maxmag-100, maxmag], "labely"); ! else ! axis ("autoy", "labely"); ! endif ! ! subplot (3, 1, 3); ! plot (w, phase*360/(2*pi)); ! grid ("on"); ! legend ("Phase (degrees)"); ! xlabel ("Frequency"); ! axis ([w(1), w(n)], "autoy", "label"); endfunction diff -cNr octave-2.9.16/scripts/signal/hurst.m octave-2.9.17/scripts/signal/hurst.m *** octave-2.9.16/scripts/signal/hurst.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/hurst.m Fri Nov 9 14:34:18 2007 *************** *** 37,43 **** error ("hurst: x must not be a scalar") elseif (isvector (x)) x = reshape (x, length (x), 1); ! end [xr, xc] = size (x); --- 37,43 ---- error ("hurst: x must not be a scalar") elseif (isvector (x)) x = reshape (x, length (x), 1); ! endif [xr, xc] = size (x); diff -cNr octave-2.9.16/scripts/signal/periodogram.m octave-2.9.17/scripts/signal/periodogram.m *** octave-2.9.16/scripts/signal/periodogram.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/periodogram.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function retval = periodogram (x) + if (nargin != 1) + print_usage (); + endif + [r, c] = size(x); if (r == 1) diff -cNr octave-2.9.16/scripts/signal/rectangle_lw.m octave-2.9.17/scripts/signal/rectangle_lw.m *** octave-2.9.16/scripts/signal/rectangle_lw.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/rectangle_lw.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function retval = rectangle_lw (n, b) + if (nargin != 2) + print_usage (); + endif + retval = zeros (n, 1); t = floor (1 / b); diff -cNr octave-2.9.16/scripts/signal/rectangle_sw.m octave-2.9.17/scripts/signal/rectangle_sw.m *** octave-2.9.16/scripts/signal/rectangle_sw.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/rectangle_sw.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function retval = rectangle_sw (n, b) + if (nargin != 2) + print_usage (); + endif + retval = zeros (n, 1); retval(1) = 2 / b + 1; diff -cNr octave-2.9.16/scripts/signal/sinc.m octave-2.9.17/scripts/signal/sinc.m *** octave-2.9.16/scripts/signal/sinc.m Fri Oct 12 17:27:25 2007 --- octave-2.9.17/scripts/signal/sinc.m Wed Nov 7 21:29:24 2007 *************** *** 34,39 **** --- 34,43 ---- function result = sinc (x) + if (nargin != 1) + print_usage (); + endif + result = ones (size (x)); i = (x != 0); diff -cNr octave-2.9.16/scripts/signal/triangle_lw.m octave-2.9.17/scripts/signal/triangle_lw.m *** octave-2.9.16/scripts/signal/triangle_lw.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/signal/triangle_lw.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function retval = triangle_lw (n, b) + if (nargin != 2) + print_usage (); + endif + retval = 1 - (0 : n-1)' * b; retval = max ([retval'; (zeros (1, n))])'; diff -cNr octave-2.9.16/scripts/signal/triangle_sw.m octave-2.9.17/scripts/signal/triangle_sw.m *** octave-2.9.16/scripts/signal/triangle_sw.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/signal/triangle_sw.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function retval = triangle_sw (n, b) + if (nargin != 2) + print_usage (); + endif + retval = zeros(n,1); retval(1) = 1 / b; diff -cNr octave-2.9.16/scripts/signal/yulewalker.m octave-2.9.17/scripts/signal/yulewalker.m *** octave-2.9.16/scripts/signal/yulewalker.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/signal/yulewalker.m Wed Nov 7 21:29:24 2007 *************** *** 31,36 **** --- 31,40 ---- function [a, v] = yulewalker (c) + if (nargin != 1) + print_usage (); + endif + p = length (c) - 1; if (columns (c) > 1) diff -cNr octave-2.9.16/scripts/sparse/colperm.m octave-2.9.17/scripts/sparse/colperm.m *** octave-2.9.16/scripts/sparse/colperm.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/colperm.m Wed Nov 7 21:29:24 2007 *************** *** 26,31 **** --- 26,36 ---- ## @end deftypefn function p = colperm (s) + + if (nargin != 1) + print_usage (); + endif + [i, j] = spfind (s); idx = find (diff ([j; Inf]) != 0); [dummy, p] = sort (idx - [0; idx(1:(end-1))]); diff -cNr octave-2.9.16/scripts/sparse/etreeplot.m octave-2.9.17/scripts/sparse/etreeplot.m *** octave-2.9.16/scripts/sparse/etreeplot.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/etreeplot.m Wed Nov 7 21:29:24 2007 *************** *** 27,31 **** --- 27,36 ---- ## @end deftypefn function etreeplot (s, varargin) + + if (nargin < 1) + print_usage (); + endif + treeplot (etree (s+s'), varargin{:}); endfunction diff -cNr octave-2.9.16/scripts/sparse/nonzeros.m octave-2.9.17/scripts/sparse/nonzeros.m *** octave-2.9.16/scripts/sparse/nonzeros.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/nonzeros.m Wed Nov 7 21:29:24 2007 *************** *** 22,27 **** --- 22,32 ---- ## @end deftypefn function t = nonzeros (s) + + if (nargin != 1) + print_usage (); + endif + if (issparse (s)) [i, j, t] = spfind (s); else diff -cNr octave-2.9.16/scripts/sparse/spalloc.m octave-2.9.17/scripts/sparse/spalloc.m *** octave-2.9.16/scripts/sparse/spalloc.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/spalloc.m Wed Nov 7 21:29:24 2007 *************** *** 41,45 **** --- 41,50 ---- ## @end deftypefn function s = spalloc (r, c, nz) + + if (nargin < 2) + print_usage (); + endif + s = sparse (r, c); endfunction diff -cNr octave-2.9.16/scripts/sparse/spdiags.m octave-2.9.17/scripts/sparse/spdiags.m *** octave-2.9.16/scripts/sparse/spdiags.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/spdiags.m Fri Nov 9 12:37:25 2007 *************** *** 17,26 **** ## . ## -*- texinfo -*- ! ## @deftypefn {function File} {[@var{b}, @var{c}] =} spdiags (@var{a}) ! ## @deftypefnx {function File} {@var{b} =} spdiags (@var{a}, @var{c}) ! ## @deftypefnx {function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{a}) ! ## @deftypefnx {function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{m}, @var{n}) ## A generalization of the function @code{spdiag}. Called with a single ## input argument, the non-zero diagonals @var{c} of @var{A} are extracted. ## With two arguments the diagonals to extract are given by the vector --- 17,26 ---- ## . ## -*- texinfo -*- ! ## @deftypefn {Function File} {[@var{b}, @var{c}] =} spdiags (@var{a}) ! ## @deftypefnx {Function File} {@var{b} =} spdiags (@var{a}, @var{c}) ! ## @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{a}) ! ## @deftypefnx {Function File} {@var{b} =} spdiags (@var{v}, @var{c}, @var{m}, @var{n}) ## A generalization of the function @code{spdiag}. Called with a single ## input argument, the non-zero diagonals @var{c} of @var{A} are extracted. ## With two arguments the diagonals to extract are given by the vector diff -cNr octave-2.9.16/scripts/sparse/spfun.m octave-2.9.17/scripts/sparse/spfun.m *** octave-2.9.16/scripts/sparse/spfun.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/spfun.m Fri Nov 9 14:34:18 2007 *************** *** 35,41 **** else [i, j, v] = find (s); [m, n] = size (s); ! end if (isa (f, "function_handle") || isa (f, "inline function")) t = sparse (i, j, f(v), m, n); --- 35,41 ---- else [i, j, v] = find (s); [m, n] = size (s); ! endif if (isa (f, "function_handle") || isa (f, "inline function")) t = sparse (i, j, f(v), m, n); diff -cNr octave-2.9.16/scripts/sparse/spones.m octave-2.9.17/scripts/sparse/spones.m *** octave-2.9.16/scripts/sparse/spones.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/spones.m Fri Nov 9 14:34:18 2007 *************** *** 23,35 **** ## @end deftypefn function s = spones (s) if (issparse (s)) [i, j, v, m, n] = spfind (s); else [i, j, v] = find (s); [m, n] = size (s); ! end s = sparse (i, j, 1, m, n); endfunction %!assert(issparse(spones([1,2;3,0]))) --- 23,42 ---- ## @end deftypefn function s = spones (s) + + if (nargin != 1) + print_usage (); + endif + if (issparse (s)) [i, j, v, m, n] = spfind (s); else [i, j, v] = find (s); [m, n] = size (s); ! endif ! s = sparse (i, j, 1, m, n); + endfunction %!assert(issparse(spones([1,2;3,0]))) diff -cNr octave-2.9.16/scripts/sparse/spstats.m octave-2.9.17/scripts/sparse/spstats.m *** octave-2.9.16/scripts/sparse/spstats.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/spstats.m Fri Nov 9 14:34:18 2007 *************** *** 48,59 **** count = spsum (sparse (i, j, 1, n, m)); if (nargout > 1) mean = spsum (S) ./ count; ! end if (nargout > 2) ## FIXME Variance with count = 0 or 1? diff = S - sparse (i, j, mean(j), n, m); var = spsum (diff .* diff) ./ (count - 1); ! end endfunction %!test --- 48,60 ---- count = spsum (sparse (i, j, 1, n, m)); if (nargout > 1) mean = spsum (S) ./ count; ! endif if (nargout > 2) ## FIXME Variance with count = 0 or 1? diff = S - sparse (i, j, mean(j), n, m); var = spsum (diff .* diff) ./ (count - 1); ! endif ! endfunction %!test diff -cNr octave-2.9.16/scripts/sparse/spy.m octave-2.9.17/scripts/sparse/spy.m *** octave-2.9.16/scripts/sparse/spy.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/sparse/spy.m Wed Nov 7 21:29:24 2007 *************** *** 30,35 **** --- 30,39 ---- function spy (S, varargin) + if (nargin < 1) + print_usage (); + endif + markersize = NaN; if (numel (i) < 1000) LineSpec = "*"; diff -cNr octave-2.9.16/scripts/specfun/isprime.m octave-2.9.17/scripts/specfun/isprime.m *** octave-2.9.16/scripts/specfun/isprime.m Fri Oct 12 17:27:26 2007 --- octave-2.9.17/scripts/specfun/isprime.m Wed Nov 7 21:29:24 2007 *************** *** 35,40 **** --- 35,45 ---- ## @end deftypefn function t = isprime (n) + + if (nargin < 1) + print_usage (); + endif + if (! isscalar (n)) nel = numel (n); t = n; diff -cNr octave-2.9.16/scripts/startup/inputrc octave-2.9.17/scripts/startup/inputrc *** octave-2.9.16/scripts/startup/inputrc Wed Dec 6 20:17:27 2006 --- octave-2.9.17/scripts/startup/inputrc Tue Nov 6 13:03:08 2007 *************** *** 10,16 **** ## sequence for the UP arrow. "\e[A": history-search-backward - "\340H": history-search-backward ## history-search-forward: ## --- 10,15 ---- *************** *** 20,23 **** ## sequence for the DOWN arrow. "\e[B": history-search-forward - "\340P": history-search-forward --- 19,21 ---- diff -cNr octave-2.9.16/scripts/statistics/distributions/empirical_cdf.m octave-2.9.17/scripts/statistics/distributions/empirical_cdf.m *** octave-2.9.16/scripts/statistics/distributions/empirical_cdf.m Fri Oct 12 17:27:27 2007 --- octave-2.9.17/scripts/statistics/distributions/empirical_cdf.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function cdf = empirical_cdf (x, data) + if (nargin != 2) + print_usage (); + endif + if (! isvector (data)) error ("empirical_cdf: data must be a vector"); endif diff -cNr octave-2.9.16/scripts/statistics/distributions/empirical_inv.m octave-2.9.17/scripts/statistics/distributions/empirical_inv.m *** octave-2.9.16/scripts/statistics/distributions/empirical_inv.m Fri Oct 12 17:27:27 2007 --- octave-2.9.17/scripts/statistics/distributions/empirical_inv.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function inv = empirical_inv (x, data) + if (nargin != 2) + print_usage (); + endif + if (! isvector (data)) error ("empirical_inv: data must be a vector"); endif diff -cNr octave-2.9.16/scripts/statistics/distributions/empirical_pdf.m octave-2.9.17/scripts/statistics/distributions/empirical_pdf.m *** octave-2.9.16/scripts/statistics/distributions/empirical_pdf.m Fri Oct 12 17:27:27 2007 --- octave-2.9.17/scripts/statistics/distributions/empirical_pdf.m Wed Nov 7 21:29:24 2007 *************** *** 28,33 **** --- 28,37 ---- function pdf = empirical_pdf (x, data) + if (nargin != 2) + print_usage (); + endif + if (! isvector (data)) error ("empirical_pdf: data must be a vector"); endif diff -cNr octave-2.9.16/scripts/statistics/models/logistic_regression_derivatives.m octave-2.9.17/scripts/statistics/models/logistic_regression_derivatives.m *** octave-2.9.16/scripts/statistics/models/logistic_regression_derivatives.m Fri Oct 12 17:27:28 2007 --- octave-2.9.17/scripts/statistics/models/logistic_regression_derivatives.m Wed Nov 7 21:29:24 2007 *************** *** 29,34 **** --- 29,38 ---- function [dl, d2l] = logistic_regression_derivatives (x, z, z1, g, g1, p) + if (nargin != 6) + print_usage (); + endif + ## first derivative v = g .* (1 - g) ./ p; v1 = g1 .* (1 - g1) ./ p; dlogp = [(dmult (v, z) - dmult (v1, z1)), (dmult (v - v1, x))]; *************** *** 39,42 **** d2l = [z, x]' * dmult (w, [z, x]) - [z1, x]' * dmult (w1, [z1, x]) ... - dlogp' * dlogp; ! endfunction \ No newline at end of file --- 43,46 ---- d2l = [z, x]' * dmult (w, [z, x]) - [z1, x]' * dmult (w1, [z1, x]) ... - dlogp' * dlogp; ! endfunction diff -cNr octave-2.9.16/scripts/statistics/models/logistic_regression_likelihood.m octave-2.9.17/scripts/statistics/models/logistic_regression_likelihood.m *** octave-2.9.16/scripts/statistics/models/logistic_regression_likelihood.m Fri Oct 12 17:27:28 2007 --- octave-2.9.17/scripts/statistics/models/logistic_regression_likelihood.m Wed Nov 7 21:29:24 2007 *************** *** 29,34 **** --- 29,38 ---- function [g, g1, p, dev] = logistic_regression_likelihood (y, x, beta, z, z1) + if (nargin != 5) + print_usage (); + endif + e = exp ([z, x] * beta); e1 = exp ([z1, x] * beta); g = e ./ (1 + e); g1 = e1 ./ (1 + e1); g = max (y == max (y), g); g1 = min (y > min(y), g1); diff -cNr octave-2.9.16/scripts/testfun/assert.m octave-2.9.17/scripts/testfun/assert.m *** octave-2.9.16/scripts/testfun/assert.m Mon Oct 15 04:22:54 2007 --- octave-2.9.17/scripts/testfun/assert.m Fri Nov 9 14:34:18 2007 *************** *** 67,73 **** in = deblank (argn(1,:)); for i = 2:rows (argn) in = strcat (in, ",", deblank (argn(i,:))); ! end in = strcat ("(", in, ")"); coda = ""; --- 67,73 ---- in = deblank (argn(1,:)); for i = 2:rows (argn) in = strcat (in, ",", deblank (argn(i,:))); ! endfor in = strcat ("(", in, ")"); coda = ""; *************** *** 87,93 **** endfor catch iserror = 1; ! end endif elseif (ischar (expected)) --- 87,93 ---- endfor catch iserror = 1; ! end_try_catch endif elseif (ischar (expected)) *************** *** 103,109 **** endfor catch iserror = 1; ! end endif elseif (isstruct (expected)) --- 103,109 ---- endfor catch iserror = 1; ! end_try_catch endif elseif (isstruct (expected)) *************** *** 130,136 **** endfor catch iserror = 1; ! end endif elseif (ndims (cond) != ndims (expected) --- 130,136 ---- endfor catch iserror = 1; ! end_try_catch endif elseif (ndims (cond) != ndims (expected) diff -cNr octave-2.9.16/scripts/testfun/fail.m octave-2.9.17/scripts/testfun/fail.m *** octave-2.9.16/scripts/testfun/fail.m Fri Oct 12 17:27:29 2007 --- octave-2.9.17/scripts/testfun/fail.m Fri Nov 9 14:34:18 2007 *************** *** 99,105 **** err = lasterr; err([1:7, end]) = []; # transform "error: ...\n", to "..." msg = sprintf ("expected warning <%s> but got error <%s>", pattern, err); ! end else ## perform the error test --- 99,105 ---- err = lasterr; err([1:7, end]) = []; # transform "error: ...\n", to "..." msg = sprintf ("expected warning <%s> but got error <%s>", pattern, err); ! end_try_catch else ## perform the error test *************** *** 115,121 **** return; endif msg = sprintf ("expected error <%s>\nbut got <%s>", pattern, err); ! end endif ## if we get here, then code didn't fail or error didn't match --- 115,121 ---- return; endif msg = sprintf ("expected error <%s>\nbut got <%s>", pattern, err); ! end_try_catch endif ## if we get here, then code didn't fail or error didn't match diff -cNr octave-2.9.16/scripts/testfun/test.m octave-2.9.17/scripts/testfun/test.m *** octave-2.9.16/scripts/testfun/test.m Mon Oct 15 05:00:02 2007 --- octave-2.9.17/scripts/testfun/test.m Fri Nov 9 14:34:18 2007 *************** *** 574,580 **** function s = bundle (varargin) for i = 1:nargin s.(deblank (argn(i,:))) = varargin{i}; ! end endfunction function body = __extract_test_code (nm) --- 574,580 ---- function s = bundle (varargin) for i = 1:nargin s.(deblank (argn(i,:))) = varargin{i}; ! endfor endfunction function body = __extract_test_code (nm) diff -cNr octave-2.9.16/scripts/time/asctime.m octave-2.9.17/scripts/time/asctime.m *** octave-2.9.16/scripts/time/asctime.m Fri Oct 12 17:27:29 2007 --- octave-2.9.17/scripts/time/asctime.m Fri Nov 2 13:24:23 2007 *************** *** 24,30 **** ## ## @example ## @group ! ## asctime (localtime (time ()) ## @result{} "Mon Feb 17 01:15:06 1997\n" ## @end group ## @end example --- 24,30 ---- ## ## @example ## @group ! ## asctime (localtime (time ())) ## @result{} "Mon Feb 17 01:15:06 1997\n" ## @end group ## @end example diff -cNr octave-2.9.16/src/ChangeLog octave-2.9.17/src/ChangeLog *** octave-2.9.16/src/ChangeLog Wed Oct 31 17:29:24 2007 --- octave-2.9.17/src/ChangeLog Sat Nov 10 00:18:14 2007 *************** *** 1,3 **** --- 1,108 ---- + 2007-11-10 John W. Eaton + + * version.h (OCTAVE_VERSION): Now 2.9.17. + (OCTAVE_API_VERSION): Now api-v29. + (OCTAVE_RELEASE_DATE): Now 2007-11-10. + + 2007-11-09 John W. Eaton + + * DLD-FUNCTIONS/__gnuplot_raw__.l: Don't add atexit ("closeplot") + to PKG_ADD file. + + 2007-11-09 David Bateman + + * graphics.cc, graphics.h.in (class patch): Add the field "keylabel". + + * data.cc (Fcputime) [__WIN32__]: Correct scaling of sys and usr times. + + * graphics.cc (is_handle): Handle must be a real scalar. + + 2007-11-09 Joseph P. Skudlarek + + * data.cc (Fislogical): Fix typo in documentation entry. + + 2007-11-08 John W. Eaton + + * DLD-FUNCTIONS/__gnuplot_raw__.l (F__gnuplot_save_data__): + Note obsolescence in doc string. + (WARN_OBSOLETE): New macro + (F__gnuplot_save_data__, Fgnuplot_command_plot, + Fgnuplot_command_replot, Fgnuplot_command_splot, + Fgnuplot_command_using, Fgnuplot_command_with, + Fgnuplot_command_axes, Fgnuplot_command_title, + Fgnuplot_command_end, Fgnuplot_use_title_option, + F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files, + F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__, + F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__, + F__gnuplot_replot__): Use WARN_OBSOLETE. + + 2007-11-07 John W. Eaton + + * DLD-FUNCTIONS/regexp.cc: Handle HAVE_PCRE_PCRE_H. Check + HAVE_PCRE_H instead of HAVE_PCRE to decide whether to include pcre.h. + + * DLD-FUNCTIONS/__gnuplot_raw__.l (Fgnuplot_command_plot, + Fgnuplot_command_replot, Fgnuplot_command_splot, + Fgnuplot_command_using, Fgnuplot_command_with, + Fgnuplot_command_axes, Fgnuplot_command_title, + Fgnuplot_command_end, Fgnuplot_use_title_option, + F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files, + F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__, + F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__, + F__gnuplot_replot__): Note obsolescence in doc string. + + 2007-11-06 Kai Habel + + * graphics.h.in (class surface::properties): New properties, + cdata, facecolor, facealpha, edgecolor, linestyle, + linewidth, marker, markeredgecolor, markerfacecolor, markersize. + * graphics.cc (surface::properties::properties, + surface::properties::set, surface::properties::get, + surface::properties::factory_defaults): Handle new properities. + + 2007-11-06 David Bateman + + * data.cc (DATA_REDUCTION): Handle the 'native' and 'double' + arguments of the Fsum function. + * OPERATORS/op-bm-bm.cc (matrix_to_bool_matrix, + scalar_to_bool_matrix): New type conversion functions. + (install_bm_bm_ops): Install new type conversions functions. + + 2007-11-06 Michael Goffioul + + * toplev.cc (Fsystem) [__WIN32__ && ! __CYGWIN__]: + Quote the complete command. + + 2007-11-06 John W. Eaton + + * data.cc (Fnorm): New tests. + + * defun-int.h (DEFINE_FUNX_INSTALLER_FUN3): Don't install function + if check_version produces an error. + + 2007-11-05 John W. Eaton + + * pt-idx.cc (tree_index_expression::lvalue): Try to do a better + job of computing the number of elements in lvalue expressions when + the last indexing element is ".". + + 2007-11-02 John W. Eaton + + * file-io.cc (fopen_mode_to_ios_mode): Use std::ios::app instead + of std::ios::ate. + + 2007-11-02 Olli Saarela + + * input.cc, pr-output.cc, bitfcns.cc, DLD-FUNCTIONS/time.cc: + Fix broken @examples in help texts. + + 2007-10-31 John W. Eaton + + * data.cc (Fnorm): Avoid warning about p_val possibly being used + uninitialized. + + * version.h (OCTAVE_VERSION): Now 2.9.16+. + 2007-10-31 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.16. diff -cNr octave-2.9.16/src/DASPK-opts.cc octave-2.9.17/src/DASPK-opts.cc *** octave-2.9.16/src/DASPK-opts.cc Wed Oct 31 17:44:19 2007 --- octave-2.9.17/src/DASPK-opts.cc Fri Nov 9 20:34:38 2007 *************** *** 640,646 **** tried if the @code{\"compute consistent initial condition\"} option has\n\ been set to 1 (default is 5).\n\ \n\ ! Note that the maximum number of Newton iterations allowed in all is\n\ @code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial\n\ condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is\n\ set to 2.\n\ --- 640,646 ---- tried if the @code{\"compute consistent initial condition\"} option has\n\ been set to 1 (default is 5).\n\ \n\ ! Note that the maximum total number of Newton iterations allowed is\n\ @code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial\n\ condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is\n\ set to 2.\n\ diff -cNr octave-2.9.16/src/DLD-FUNCTIONS/__gnuplot_raw__.l octave-2.9.17/src/DLD-FUNCTIONS/__gnuplot_raw__.l *** octave-2.9.16/src/DLD-FUNCTIONS/__gnuplot_raw__.l Fri Oct 12 17:27:34 2007 --- octave-2.9.17/src/DLD-FUNCTIONS/__gnuplot_raw__.l Fri Nov 9 14:35:52 2007 *************** *** 31,38 **** // PKG_ADD: mark_as_command ("__gnuplot_set__"); // PKG_ADD: mark_as_command ("__gnuplot_show__"); - // PKG_ADD: atexit ("closeplot"); - #ifdef HAVE_CONFIG_H #include #endif --- 31,36 ---- *************** *** 689,697 **** --- 687,711 ---- return name; } + #define WARN_OBSOLETE(nm) \ + do \ + { \ + static bool warned = false; \ + \ + if (! warned) \ + { \ + warning ("%s: this function is obsolete and will be removed from a future version of Octave", nm); \ + \ + warned = true; \ + } \ + } \ + while (0) + DEFUN_DLD (__gnuplot_save_data__, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_save_data__ (@var{data}, @var{ndim}, @var{parametric})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { octave_value retval; *************** *** 700,705 **** --- 714,721 ---- if (nargin > 0 && nargin < 4) { + WARN_OBSOLETE ("__gnuplot_save_data__"); + int ndim = 2; bool parametric = false; *************** *** 1567,1574 **** --- 1583,1594 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} = } gnuplot_command_plot ()\n\ @deftypefnx {Loadable Function} {@var{old_val} = } gnuplot_command_plot (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_plot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_plot); } *************** *** 1576,1583 **** --- 1596,1607 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_replot ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_replot (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_replot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_replot); } *************** *** 1585,1592 **** --- 1609,1620 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_splot ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_splot (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_splot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_splot); } *************** *** 1594,1601 **** --- 1622,1633 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_using ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_using (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_using"); + return SET_INTERNAL_VARIABLE (gnuplot_command_using); } *************** *** 1603,1610 **** --- 1635,1645 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_with ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_with (@var{new_val})\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_with"); + return SET_INTERNAL_VARIABLE (gnuplot_command_with); } *************** *** 1612,1619 **** --- 1647,1658 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_axes ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_axes (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_axes"); + return SET_INTERNAL_VARIABLE (gnuplot_command_axes); } *************** *** 1621,1628 **** --- 1660,1671 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_title ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_title (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_title"); + return SET_INTERNAL_VARIABLE (gnuplot_command_title); } *************** *** 1630,1637 **** --- 1673,1685 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_end ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_end (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ + \n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_end"); + return SET_INTERNAL_VARIABLE (gnuplot_command_end); } *************** *** 1642,1649 **** --- 1690,1702 ---- If enabled, append @samp{-title \"Figure NN\"} to the gnuplot command.\n\ By default, this feature is enabled if the @code{DISPLAY} environment\n\ variable is set when Octave starts.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_use_title_option"); + return SET_INTERNAL_VARIABLE (gnuplot_use_title_option); } *************** *** 1652,1659 **** --- 1705,1717 ---- @deftypefn {Loadable Function} {} clearplot\n\ @deftypefnx {Loadable Function} {} clg\n\ Clear the plot window and any titles or axis labels.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("__clear_plot_window__"); + gnuplot::clear (); return octave_value_list (); *************** *** 1662,1671 **** --- 1720,1735 ---- DEFUN_DLD (closeplot, , , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} closeplot\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ + \n\ Close stream to the @code{gnuplot} subprocess. If you are using X11,\n\ this will close the plot window.\n\ + @seealso{close}\n\ @end deftypefn") { + WARN_OBSOLETE ("closeplot"); + gnuplot::close (); return octave_value_list (); *************** *** 1681,1703 **** temporary files on exit, but if you are doing a lot of plotting you may\n\ want to clean up in the middle of a session.\n\ \n\ ! A future version of Octave will eliminate the need to use temporary\n\ ! files to hold the plot data.\n\ @end deftypefn") { gnuplot::cleanup_tmp_files (); return octave_value_list (); } ! DEFUN_DLD (__gnuplot_raw__, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string})\n\ Send @var{string} directly to gnuplot subprocess.\n\ @end deftypefn") { if (args.length () == 1 && args(0).is_string ()) { std::string cmd = args(0).string_value (); gnuplot::send_raw (cmd); --- 1745,1774 ---- temporary files on exit, but if you are doing a lot of plotting you may\n\ want to clean up in the middle of a session.\n\ \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("purge_tmp_files"); + gnuplot::cleanup_tmp_files (); return octave_value_list (); } ! DEFUN_DLD (__gnuplot_raw__, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string})\n\ Send @var{string} directly to gnuplot subprocess.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { if (args.length () == 1 && args(0).is_string ()) { + WARN_OBSOLETE ("__gnuplot_raw__"); + std::string cmd = args(0).string_value (); gnuplot::send_raw (cmd); *************** *** 1712,1717 **** --- 1783,1791 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_send_inline_data__ (@var{data}, @var{ndim}, @var{parametric})\n\ Send @var{val} to gnuplot subprocess as inline data.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { octave_value retval; *************** *** 1720,1725 **** --- 1794,1801 ---- if (nargin > 0 && nargin < 4) { + WARN_OBSOLETE ("__gnuplot_send_inline_data__"); + int ndim = 2; bool parametric = false; *************** *** 1747,1754 **** --- 1823,1835 ---- "-*- texinfo -*-\n\ @deffn {Loadable Function} __gnuplot_set__ options\n\ Set plotting options for gnuplot\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deffn") { + WARN_OBSOLETE ("__gnuplot_set__"); + string_vector argv = args.make_argv ("set"); if (! error_state) *************** *** 1761,1768 **** --- 1842,1854 ---- "-*- texinfo -*-\n\ @deffn {Loadable Function} __gnuplot_show__ options\n\ Show plotting options.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deffn") { + WARN_OBSOLETE ("__gnuplot_show__"); + string_vector argv = args.make_argv ("show"); if (! error_state) *************** *** 1772,1779 **** } DEFUN_DLD (__gnuplot_plot__, args, , ! "Plot with gnuplot.\n") { string_vector argv = args.make_argv ("plot"); if (! error_state) --- 1858,1871 ---- } DEFUN_DLD (__gnuplot_plot__, args, , ! "-*- texinfo -*-\n\ ! Plot with gnuplot.\n\ ! \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}") { + WARN_OBSOLETE ("__gnuplot_plot__"); + string_vector argv = args.make_argv ("plot"); if (! error_state) *************** *** 1783,1790 **** } DEFUN_DLD (__gnuplot_splot__, args, , ! "Plot with gnuplot.\n") { string_vector argv = args.make_argv ("splot"); if (! error_state) --- 1875,1888 ---- } DEFUN_DLD (__gnuplot_splot__, args, , ! "-*- texinfo -*-\n\ ! Plot with gnuplot.\n\ ! \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}") { + WARN_OBSOLETE ("__gnuplot_splot__"); + string_vector argv = args.make_argv ("splot"); if (! error_state) *************** *** 1794,1801 **** } DEFUN_DLD (__gnuplot_replot__, args, , ! "Plot with gnuplot.\n") { string_vector argv = args.make_argv ("replot"); if (! error_state) --- 1892,1905 ---- } DEFUN_DLD (__gnuplot_replot__, args, , ! "-*- texinfo -*-\n\ ! Plot with gnuplot.\n\ ! \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}") { + WARN_OBSOLETE ("__gnuplot_replot__"); + string_vector argv = args.make_argv ("replot"); if (! error_state) diff -cNr octave-2.9.16/src/DLD-FUNCTIONS/balance.cc octave-2.9.17/src/DLD-FUNCTIONS/balance.cc *** octave-2.9.16/src/DLD-FUNCTIONS/balance.cc Fri Oct 12 17:27:34 2007 --- octave-2.9.17/src/DLD-FUNCTIONS/balance.cc Fri Nov 2 12:13:44 2007 *************** *** 77,96 **** @deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb}] =} balance (@var{a}, @var{b}, @var{opt})\n\ \n\ ! @code{[dd, aa] = balance (a)} returns @code{aa = dd \\ a * dd}.\n\ ! @code{aa} is a matrix whose row and column norms are roughly equal in\n\ ! magnitude, and @code{dd} = @code{p * d}, where @code{p} is a permutation\n\ matrix and @code{d} is a diagonal matrix of powers of two. This allows\n\ the equilibration to be computed without roundoff. Results of\n\ eigenvalue calculation are typically improved by balancing first.\n\ \n\ ! @code{[cc, dd, aa, bb] = balance (a, b)} returns @code{aa = cc*a*dd} and\n\ ! @code{bb = cc*b*dd)}, where @code{aa} and @code{bb} have non-zero\n\ elements of approximately the same magnitude and @code{cc} and @code{dd}\n\ are permuted diagonal matrices as in @code{dd} for the algebraic\n\ eigenvalue problem.\n\ \n\ ! The eigenvalue balancing option @code{opt} is selected as follows:\n\ \n\ @table @asis\n\ @item @code{\"N\"}, @code{\"n\"}\n\ --- 77,96 ---- @deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb}] =} balance (@var{a}, @var{b}, @var{opt})\n\ \n\ ! Compute @code{aa = dd \\ a * dd} in which @code{aa} is a matrix whose\n\ ! row and column norms are roughly equal in magnitude, and\n\ ! @code{dd} = @code{p * d}, in which @code{p} is a permutation\n\ matrix and @code{d} is a diagonal matrix of powers of two. This allows\n\ the equilibration to be computed without roundoff. Results of\n\ eigenvalue calculation are typically improved by balancing first.\n\ \n\ ! If four output values are requested, compute @code{aa = cc*a*dd} and\n\ ! @code{bb = cc*b*dd)}, in which @code{aa} and @code{bb} have non-zero\n\ elements of approximately the same magnitude and @code{cc} and @code{dd}\n\ are permuted diagonal matrices as in @code{dd} for the algebraic\n\ eigenvalue problem.\n\ \n\ ! The eigenvalue balancing option @code{opt} may be one of:\n\ \n\ @table @asis\n\ @item @code{\"N\"}, @code{\"n\"}\n\ diff -cNr octave-2.9.16/src/DLD-FUNCTIONS/ccolamd.cc octave-2.9.17/src/DLD-FUNCTIONS/ccolamd.cc *** octave-2.9.16/src/DLD-FUNCTIONS/ccolamd.cc Fri Oct 12 17:27:35 2007 --- octave-2.9.17/src/DLD-FUNCTIONS/ccolamd.cc Tue Nov 6 15:31:33 2007 *************** *** 60,69 **** Constrained column approximate minimum degree permutation. @code{@var{p} =\n\ ccolamd (@var{s})} returns the column approximate minimum degree permutation\n\ vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s},\n\ ! @code{@var{s}(:,@var{p})} tends to have sparser LU factors than @var{s}.\n\ ! @code{chol (@var{s}(:,@var{p})'*@var{s}(:,@var{p}))} also tends to be\n\ ! sparser than @code{chol (@var{s}'*@var{s})}. @code{@var{p} = ccolamd\n\ ! (@var{s},1)} optimizes the ordering for @code{lu (@var{s}(:,@var{p}))}.\n\ The ordering is followed by a column elimination tree post-ordering.\n\ \n\ @var{knobs} is an optional one- to five-element input vector, with a default\n\ --- 60,69 ---- Constrained column approximate minimum degree permutation. @code{@var{p} =\n\ ccolamd (@var{s})} returns the column approximate minimum degree permutation\n\ vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s},\n\ ! @code{@var{s} (:, @var{p})} tends to have sparser LU factors than @var{s}.\n\ ! @code{chol (@var{s} (:, @var{p})' * @var{s} (:, @var{p}))} also tends to be\n\ ! sparser than @code{chol (@var{s}' * @var{s})}. @code{@var{p} = ccolamd\n\ ! (@var{s}, 1)} optimizes the ordering for @code{lu (@var{s} (:, @var{p}))}.\n\ The ordering is followed by a column elimination tree post-ordering.\n\ \n\ @var{knobs} is an optional one- to five-element input vector, with a default\n\ *************** *** 72,89 **** \n\ @table @code\n\ @item @var{knobs}(1)\n\ ! if nonzero, the ordering is optimized for @code{lu(S(:,p))}. It will be a\n\ ! poor ordering for @code{chol(@var{s}(:,@var{p})'*@var{s}(:,@var{p}))}. This\n\ ! is the most important knob for ccolamd.\n\ \n\ @item @var{knob}(2)\n\ ! if @var{s} is m-by-n, rows with more than @code{max(16,@var{knobs}(2)*\n\ ! sqrt(n))} entries are ignored.\n\ \n\ @item @var{knob}(3)\n\ ! columns with more than @code{max(16,@var{knobs}(3)*sqrt(min(m,n)))}\n\ ! entries are ignored and ordered last in the output permutation (subject\n\ ! to the cmember constraints).\n\ \n\ @item @var{knob}(4)\n\ if nonzero, aggressive absorption is performed.\n\ --- 72,89 ---- \n\ @table @code\n\ @item @var{knobs}(1)\n\ ! if nonzero, the ordering is optimized for @code{lu (S (:, p))}. It will be a\n\ ! poor ordering for @code{chol (@var{s} (:, @var{p})' * @var{s} (:,\n\ ! @var{p}))}. This is the most important knob for ccolamd.\n\ \n\ @item @var{knob}(2)\n\ ! if @var{s} is m-by-n, rows with more than @code{max (16, @var{knobs} (2) *\n\ ! sqrt (n))} entries are ignored.\n\ \n\ @item @var{knob}(3)\n\ ! columns with more than @code{max (16, @var{knobs} (3) * sqrt (min (@var{m},\n\ ! @var{n})))} entries are ignored and ordered last in the output permutation\n\ ! (subject to the cmember constraints).\n\ \n\ @item @var{knob}(4)\n\ if nonzero, aggressive absorption is performed.\n\ *************** *** 94,129 **** @end table\n\ \n\ @var{cmember} is an optional vector of length n. It defines the constraints\n\ ! on the column ordering. If @code{@var{cmember}(j) = @var{c}}, then column j\n\ ! is in constraint set @var{c} (@var{c} must be in the range 1 to n). In\n\ ! the output permutation @var{p}, all columns in set 1 appear first, followed\n\ ! by all columns in set 2, and so on. @code{@var{cmember} = ones(1,n)} if\n\ ! not present or empty. @code{ccolamd (@var{s},[],1:n)} returns @code{1:n}\n\ \n\ ! @code{@var{p} = ccolamd(@var{s})} is about the same as @code{@var{p} =\n\ ! colamd(@var{s})}. @var{knobs} and its default values differ. @code{colamd}\n\ always does aggressive absorption, and it finds an ordering suitable for\n\ ! both @code{lu(@var{s}(:,@var{p}))} and @code{chol(@var{S}(:,@var{p})'*\n\ ! @var{s}(:,@var{p}))}; it cannot optimize its ordering for @code{lu(@var{s}\n\ ! (:,@var{p}))} to the extent that @code{ccolamd(@var{s},1)} can.\n\ \n\ @var{stats} is an optional 20-element output vector that provides data\n\ about the ordering and the validity of the input matrix @var{s}. Ordering\n\ ! statistics are in @code{@var{stats} (1:3)}. @code{@var{stats} (1)} and\n\ @code{@var{stats} (2)} are the number of dense or empty rows and columns\n\ ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage\n\ collections performed on the internal data structure used by CCOLAMD\n\ ! (roughly of size @code{2.2 * nnz(@var{s}) + 4 * @var{m} + 7 * @var{n}}\n\ integers).\n\ \n\ ! @code{@var{stats} (4:7)} provide information if CCOLAMD was able to\n\ continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if\n\ invalid. @code{@var{stats} (5)} is the rightmost column index that is\n\ unsorted or contains duplicate entries, or zero if no such column exists.\n\ @code{@var{stats} (6)} is the last seen duplicate or out-of-order row\n\ index in the column index given by @code{@var{stats} (5)}, or zero if no\n\ such row index exists. @code{@var{stats} (7)} is the number of duplicate\n\ ! or out-of-order row indices. @code{@var{stats} (8:20)} is always zero in\n\ the current version of CCOLAMD (reserved for future use).\n\ \n\ The authors of the code itself are S. Larimore, T. Davis (Uni of Florida)\n\ --- 94,131 ---- @end table\n\ \n\ @var{cmember} is an optional vector of length n. It defines the constraints\n\ ! on the column ordering. If @code{@var{cmember} (j) = @var{c}}, then column\n\ ! @var{j} is in constraint set @var{c} (@var{c} must be in the range 1 to\n\ ! @var{n}). In the output permutation @var{p}, all columns in set 1 appear\n\ ! first, followed by all columns in set 2, and so on. @code{@var{cmember} =\n\ ! ones(1,n)} if not present or empty. @code{ccolamd (@var{s}, [], 1 :\n\ ! @var{n})} returns @code{1 : @var{n}}\n\ \n\ ! @code{@var{p} = ccolamd (@var{s})} is about the same as @code{@var{p} =\n\ ! colamd (@var{s})}. @var{knobs} and its default values differ. @code{colamd}\n\ always does aggressive absorption, and it finds an ordering suitable for\n\ ! both @code{lu (@var{s} (:, @var{p}))} and @code{chol (@var{S} (:, @var{p})'\n\ ! * @var{s} (:, @var{p}))}; it cannot optimize its ordering for\n\ ! @code{lu (@var{s} (:, @var{p}))} to the extent that\n\ ! @code{ccolamd (@var{s}, 1)} can.\n\ \n\ @var{stats} is an optional 20-element output vector that provides data\n\ about the ordering and the validity of the input matrix @var{s}. Ordering\n\ ! statistics are in @code{@var{stats} (1 : 3)}. @code{@var{stats} (1)} and\n\ @code{@var{stats} (2)} are the number of dense or empty rows and columns\n\ ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage\n\ collections performed on the internal data structure used by CCOLAMD\n\ ! (roughly of size @code{2.2 * nnz (@var{s}) + 4 * @var{m} + 7 * @var{n}}\n\ integers).\n\ \n\ ! @code{@var{stats} (4 : 7)} provide information if CCOLAMD was able to\n\ continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if\n\ invalid. @code{@var{stats} (5)} is the rightmost column index that is\n\ unsorted or contains duplicate entries, or zero if no such column exists.\n\ @code{@var{stats} (6)} is the last seen duplicate or out-of-order row\n\ index in the column index given by @code{@var{stats} (5)}, or zero if no\n\ such row index exists. @code{@var{stats} (7)} is the number of duplicate\n\ ! or out-of-order row indices. @code{@var{stats} (8 : 20)} is always zero in\n\ the current version of CCOLAMD (reserved for future use).\n\ \n\ The authors of the code itself are S. Larimore, T. Davis (Uni of Florida)\n\ diff -cNr octave-2.9.16/src/DLD-FUNCTIONS/rand.cc octave-2.9.17/src/DLD-FUNCTIONS/rand.cc *** octave-2.9.16/src/DLD-FUNCTIONS/rand.cc Mon Oct 15 07:48:45 2007 --- octave-2.9.17/src/DLD-FUNCTIONS/rand.cc Fri Nov 2 12:13:44 2007 *************** *** 341,348 **** available, otherwise from cpu time, wall clock time and the current\n\ fraction of a second.\n\ \n\ ! @code{rand} uses the Mersenne Twister with a period of 2^19937-1\n\ ! (See M. Matsumoto and T. Nishimura, ``Mersenne Twister: A 623-dimensionally\n\ equidistributed uniform pseudorandom number generator'', ACM Trans. on\n\ Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998,\n\ @url{http://www.math.keio.ac.jp/~matumoto/emt.html}).\n\ --- 341,349 ---- available, otherwise from cpu time, wall clock time and the current\n\ fraction of a second.\n\ \n\ ! To compute the psuedo-random sequence, @code{rand} uses the Mersenne\n\ ! Twister with a period of 2^19937-1 (See M. Matsumoto and T. Nishimura,\n\ ! ``Mersenne Twister: A 623-dimensionally\n\ equidistributed uniform pseudorandom number generator'', ACM Trans. on\n\ Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998,\n\ @url{http://www.math.keio.ac.jp/~matumoto/emt.html}).\n\ *************** *** 350,357 **** several returned values together, otherwise the generator state\n\ can be learned after reading 624 consecutive values.\n\ \n\ ! @code{rand} includes a second random number generator, that was the\n\ ! previous generator used in Octave. The new generator is used by default\n\ as it is significantly faster than the old generator, and produces\n\ random numbers with a significantly longer cycle time. However, in\n\ some circumstances it might be desirable to obtain the same random\n\ --- 351,358 ---- several returned values together, otherwise the generator state\n\ can be learned after reading 624 consecutive values.\n\ \n\ ! Older versions of Octave used a different random number generator.\n\ ! The new generator is used by default\n\ as it is significantly faster than the old generator, and produces\n\ random numbers with a significantly longer cycle time. However, in\n\ some circumstances it might be desirable to obtain the same random\n\ *************** *** 649,657 **** @end example\n\ @item @code{F (n1, n2)} for @code{0 < n1}, @code{0 < n2}\n\ @example\n\ ! r1 = 2 * randg (n1 / 2) / n1 ## r1 equals 1 if n1 is infinite\n\ ! r2 = 2 * randg (n2 / 2) / n2 ## r2 equals 1 if n2 is infinite\n\ r = r1 / r2\n\n\ @end example\n\ @item negative @code{binomial (n, p)} for @code{n > 0}, @code{0 < p <= 1}\n\ @example\n\ --- 650,662 ---- @end example\n\ @item @code{F (n1, n2)} for @code{0 < n1}, @code{0 < n2}\n\ @example\n\ ! @group\n\ ! ## r1 equals 1 if n1 is infinite\n\ ! r1 = 2 * randg (n1 / 2) / n1\n\ ! ## r2 equals 1 if n2 is infinite\n\ ! r2 = 2 * randg (n2 / 2) / n2\n\ r = r1 / r2\n\n\ + @end group\n\ @end example\n\ @item negative @code{binomial (n, p)} for @code{n > 0}, @code{0 < p <= 1}\n\ @example\n\ diff -cNr octave-2.9.16/src/DLD-FUNCTIONS/regexp.cc octave-2.9.17/src/DLD-FUNCTIONS/regexp.cc *** octave-2.9.16/src/DLD-FUNCTIONS/regexp.cc Fri Oct 12 17:27:35 2007 --- octave-2.9.17/src/DLD-FUNCTIONS/regexp.cc Wed Nov 7 13:48:01 2007 *************** *** 40,55 **** #include "quit.h" #include "parse.h" ! #ifdef HAVE_PCRE #include ! #else ! #ifdef HAVE_REGEX ! #ifdef __MINGW32__ #define __restrict #endif #include #endif - #endif // The regexp is constructed as a linked list to avoid resizing the // return values in arrays at each new match. --- 40,55 ---- #include "quit.h" #include "parse.h" ! #if defined (HAVE_PCRE_PCRE_H) ! #include ! #elif defined (HAVE_PCRE_H) #include ! #elif defined (HAVE_REGEX) ! #if defined (__MINGW32__) #define __restrict #endif #include #endif // The regexp is constructed as a linked list to avoid resizing the // return values in arrays at each new match. diff -cNr octave-2.9.16/src/DLD-FUNCTIONS/time.cc octave-2.9.17/src/DLD-FUNCTIONS/time.cc *** octave-2.9.16/src/DLD-FUNCTIONS/time.cc Thu Oct 25 01:50:56 2007 --- octave-2.9.17/src/DLD-FUNCTIONS/time.cc Fri Nov 2 13:24:24 2007 *************** *** 188,194 **** \n\ @example\n\ @group\n\ ! mktime (localtime (time ())\n\ @result{} 856163706\n\ @end group\n\ @end example\n\ --- 188,194 ---- \n\ @example\n\ @group\n\ ! mktime (localtime (time ()))\n\ @result{} 856163706\n\ @end group\n\ @end example\n\ diff -cNr octave-2.9.16/src/DOCSTRINGS octave-2.9.17/src/DOCSTRINGS *** octave-2.9.16/src/DOCSTRINGS Wed Oct 31 18:08:40 2007 --- octave-2.9.17/src/DOCSTRINGS Fri Nov 9 20:59:09 2007 *************** *** 26,31 **** --- 26,33 ---- __gnuplot_save_data__ -*- texinfo -*- @deftypefn {Loadable Function} {} __gnuplot_save_data__ (@var{data}, @var{ndim}, @var{parametric}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn gnuplot_binary -*- texinfo -*- *************** *** 38,78 **** --- 40,96 ---- -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} = } gnuplot_command_plot () @deftypefnx {Loadable Function} {@var{old_val} = } gnuplot_command_plot (@var{new_val}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn gnuplot_command_replot -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_replot () @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_replot (@var{new_val}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn gnuplot_command_splot -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_splot () @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_splot (@var{new_val}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn gnuplot_command_using -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_using () @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_using (@var{new_val}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn gnuplot_command_with -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_with () @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_with (@var{new_val}) + of Octave.} @end deftypefn gnuplot_command_axes -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_axes () @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_axes (@var{new_val}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn gnuplot_command_title -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_title () @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_title (@var{new_val}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn gnuplot_command_end -*- texinfo -*- @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_end () @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_end (@var{new_val}) + @strong{This function is obsolete and will be removed from a future version + of Octave.} + @end deftypefn gnuplot_use_title_option -*- texinfo -*- *************** *** 81,98 **** --- 99,126 ---- If enabled, append @samp{-title "Figure NN"} to the gnuplot command. By default, this feature is enabled if the @code{DISPLAY} environment variable is set when Octave starts. + + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn __clear_plot_window__ -*- texinfo -*- @deftypefn {Loadable Function} {} clearplot @deftypefnx {Loadable Function} {} clg Clear the plot window and any titles or axis labels. + + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn closeplot -*- texinfo -*- @deftypefn {Loadable Function} {} closeplot + @strong{This function is obsolete and will be removed from a future version + of Octave.} + Close stream to the @code{gnuplot} subprocess. If you are using X11, this will close the plot window. + @seealso{close} @end deftypefn purge_tmp_files -*- texinfo -*- *************** *** 104,141 **** temporary files on exit, but if you are doing a lot of plotting you may want to clean up in the middle of a session. ! A future version of Octave will eliminate the need to use temporary ! files to hold the plot data. @end deftypefn __gnuplot_raw__ -*- texinfo -*- @deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string}) Send @var{string} directly to gnuplot subprocess. @end deftypefn __gnuplot_send_inline_data__ -*- texinfo -*- @deftypefn {Loadable Function} {} __gnuplot_send_inline_data__ (@var{data}, @var{ndim}, @var{parametric}) Send @var{val} to gnuplot subprocess as inline data. @end deftypefn __gnuplot_set__ -*- texinfo -*- @deffn {Loadable Function} __gnuplot_set__ options Set plotting options for gnuplot @end deffn __gnuplot_show__ -*- texinfo -*- @deffn {Loadable Function} __gnuplot_show__ options Show plotting options. @end deffn __gnuplot_plot__ Plot with gnuplot. __gnuplot_splot__ Plot with gnuplot. __gnuplot_replot__ Plot with gnuplot. __lin_interpn__ -*- texinfo -*- @deftypefn {Loadable Function} {@var{vi} =} __lin_interpn__ (@var{x1}, @var{x2}, @dots{}, @var{xn}, @var{v}, @var{y1}, @var{y2}, @dots{}, @var{yn}) --- 132,190 ---- temporary files on exit, but if you are doing a lot of plotting you may want to clean up in the middle of a session. ! @strong{This function is obsolete and will be removed from a future version ! of Octave.} @end deftypefn __gnuplot_raw__ -*- texinfo -*- @deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string}) Send @var{string} directly to gnuplot subprocess. + + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn __gnuplot_send_inline_data__ -*- texinfo -*- @deftypefn {Loadable Function} {} __gnuplot_send_inline_data__ (@var{data}, @var{ndim}, @var{parametric}) Send @var{val} to gnuplot subprocess as inline data. + + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deftypefn __gnuplot_set__ -*- texinfo -*- @deffn {Loadable Function} __gnuplot_set__ options Set plotting options for gnuplot + + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deffn __gnuplot_show__ -*- texinfo -*- @deffn {Loadable Function} __gnuplot_show__ options Show plotting options. + + @strong{This function is obsolete and will be removed from a future version + of Octave.} @end deffn __gnuplot_plot__ + -*- texinfo -*- Plot with gnuplot. + @strong{This function is obsolete and will be removed from a future version + of Octave.} __gnuplot_splot__ + -*- texinfo -*- Plot with gnuplot. + @strong{This function is obsolete and will be removed from a future version + of Octave.} __gnuplot_replot__ + -*- texinfo -*- Plot with gnuplot. + @strong{This function is obsolete and will be removed from a future version + of Octave.} __lin_interpn__ -*- texinfo -*- @deftypefn {Loadable Function} {@var{vi} =} __lin_interpn__ (@var{x1}, @var{x2}, @dots{}, @var{xn}, @var{v}, @var{y1}, @var{y2}, @dots{}, @var{yn}) *************** *** 163,182 **** @deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt}) @deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb}] =} balance (@var{a}, @var{b}, @var{opt}) ! @code{[dd, aa] = balance (a)} returns @code{aa = dd \ a * dd}. ! @code{aa} is a matrix whose row and column norms are roughly equal in ! magnitude, and @code{dd} = @code{p * d}, where @code{p} is a permutation matrix and @code{d} is a diagonal matrix of powers of two. This allows the equilibration to be computed without roundoff. Results of eigenvalue calculation are typically improved by balancing first. ! @code{[cc, dd, aa, bb] = balance (a, b)} returns @code{aa = cc*a*dd} and ! @code{bb = cc*b*dd)}, where @code{aa} and @code{bb} have non-zero elements of approximately the same magnitude and @code{cc} and @code{dd} are permuted diagonal matrices as in @code{dd} for the algebraic eigenvalue problem. ! The eigenvalue balancing option @code{opt} is selected as follows: @table @asis @item @code{"N"}, @code{"n"} --- 212,231 ---- @deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt}) @deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb}] =} balance (@var{a}, @var{b}, @var{opt}) ! Compute @code{aa = dd \ a * dd} in which @code{aa} is a matrix whose ! row and column norms are roughly equal in magnitude, and ! @code{dd} = @code{p * d}, in which @code{p} is a permutation matrix and @code{d} is a diagonal matrix of powers of two. This allows the equilibration to be computed without roundoff. Results of eigenvalue calculation are typically improved by balancing first. ! If four output values are requested, compute @code{aa = cc*a*dd} and ! @code{bb = cc*b*dd)}, in which @code{aa} and @code{bb} have non-zero elements of approximately the same magnitude and @code{cc} and @code{dd} are permuted diagonal matrices as in @code{dd} for the algebraic eigenvalue problem. ! The eigenvalue balancing option @code{opt} may be one of: @table @asis @item @code{"N"}, @code{"n"} *************** *** 374,380 **** @var{n} must be in range [1,log2(bitmax)+1] usually [1,33] @example ! bitshift (eye (3), 1)) @result{} @group 2 0 0 --- 423,429 ---- @var{n} must be in range [1,log2(bitmax)+1] usually [1,33] @example ! bitshift (eye (3), 1) @result{} @group 2 0 0 *************** *** 478,487 **** Constrained column approximate minimum degree permutation. @code{@var{p} = ccolamd (@var{s})} returns the column approximate minimum degree permutation vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s}, ! @code{@var{s}(:,@var{p})} tends to have sparser LU factors than @var{s}. ! @code{chol (@var{s}(:,@var{p})'*@var{s}(:,@var{p}))} also tends to be ! sparser than @code{chol (@var{s}'*@var{s})}. @code{@var{p} = ccolamd ! (@var{s},1)} optimizes the ordering for @code{lu (@var{s}(:,@var{p}))}. The ordering is followed by a column elimination tree post-ordering. @var{knobs} is an optional one- to five-element input vector, with a default --- 527,536 ---- Constrained column approximate minimum degree permutation. @code{@var{p} = ccolamd (@var{s})} returns the column approximate minimum degree permutation vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s}, ! @code{@var{s} (:, @var{p})} tends to have sparser LU factors than @var{s}. ! @code{chol (@var{s} (:, @var{p})' * @var{s} (:, @var{p}))} also tends to be ! sparser than @code{chol (@var{s}' * @var{s})}. @code{@var{p} = ccolamd ! (@var{s}, 1)} optimizes the ordering for @code{lu (@var{s} (:, @var{p}))}. The ordering is followed by a column elimination tree post-ordering. @var{knobs} is an optional one- to five-element input vector, with a default *************** *** 490,507 **** @table @code @item @var{knobs}(1) ! if nonzero, the ordering is optimized for @code{lu(S(:,p))}. It will be a ! poor ordering for @code{chol(@var{s}(:,@var{p})'*@var{s}(:,@var{p}))}. This ! is the most important knob for ccolamd. @item @var{knob}(2) ! if @var{s} is m-by-n, rows with more than @code{max(16,@var{knobs}(2)* ! sqrt(n))} entries are ignored. @item @var{knob}(3) ! columns with more than @code{max(16,@var{knobs}(3)*sqrt(min(m,n)))} ! entries are ignored and ordered last in the output permutation (subject ! to the cmember constraints). @item @var{knob}(4) if nonzero, aggressive absorption is performed. --- 539,556 ---- @table @code @item @var{knobs}(1) ! if nonzero, the ordering is optimized for @code{lu (S (:, p))}. It will be a ! poor ordering for @code{chol (@var{s} (:, @var{p})' * @var{s} (:, ! @var{p}))}. This is the most important knob for ccolamd. @item @var{knob}(2) ! if @var{s} is m-by-n, rows with more than @code{max (16, @var{knobs} (2) * ! sqrt (n))} entries are ignored. @item @var{knob}(3) ! columns with more than @code{max (16, @var{knobs} (3) * sqrt (min (@var{m}, ! @var{n})))} entries are ignored and ordered last in the output permutation ! (subject to the cmember constraints). @item @var{knob}(4) if nonzero, aggressive absorption is performed. *************** *** 512,547 **** @end table @var{cmember} is an optional vector of length n. It defines the constraints ! on the column ordering. If @code{@var{cmember}(j) = @var{c}}, then column j ! is in constraint set @var{c} (@var{c} must be in the range 1 to n). In ! the output permutation @var{p}, all columns in set 1 appear first, followed ! by all columns in set 2, and so on. @code{@var{cmember} = ones(1,n)} if ! not present or empty. @code{ccolamd (@var{s},[],1:n)} returns @code{1:n} ! @code{@var{p} = ccolamd(@var{s})} is about the same as @code{@var{p} = ! colamd(@var{s})}. @var{knobs} and its default values differ. @code{colamd} always does aggressive absorption, and it finds an ordering suitable for ! both @code{lu(@var{s}(:,@var{p}))} and @code{chol(@var{S}(:,@var{p})'* ! @var{s}(:,@var{p}))}; it cannot optimize its ordering for @code{lu(@var{s} ! (:,@var{p}))} to the extent that @code{ccolamd(@var{s},1)} can. @var{stats} is an optional 20-element output vector that provides data about the ordering and the validity of the input matrix @var{s}. Ordering ! statistics are in @code{@var{stats} (1:3)}. @code{@var{stats} (1)} and @code{@var{stats} (2)} are the number of dense or empty rows and columns ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage collections performed on the internal data structure used by CCOLAMD ! (roughly of size @code{2.2 * nnz(@var{s}) + 4 * @var{m} + 7 * @var{n}} integers). ! @code{@var{stats} (4:7)} provide information if CCOLAMD was able to continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if invalid. @code{@var{stats} (5)} is the rightmost column index that is unsorted or contains duplicate entries, or zero if no such column exists. @code{@var{stats} (6)} is the last seen duplicate or out-of-order row index in the column index given by @code{@var{stats} (5)}, or zero if no such row index exists. @code{@var{stats} (7)} is the number of duplicate ! or out-of-order row indices. @code{@var{stats} (8:20)} is always zero in the current version of CCOLAMD (reserved for future use). The authors of the code itself are S. Larimore, T. Davis (Uni of Florida) --- 561,598 ---- @end table @var{cmember} is an optional vector of length n. It defines the constraints ! on the column ordering. If @code{@var{cmember} (j) = @var{c}}, then column ! @var{j} is in constraint set @var{c} (@var{c} must be in the range 1 to ! @var{n}). In the output permutation @var{p}, all columns in set 1 appear ! first, followed by all columns in set 2, and so on. @code{@var{cmember} = ! ones(1,n)} if not present or empty. @code{ccolamd (@var{s}, [], 1 : ! @var{n})} returns @code{1 : @var{n}} ! @code{@var{p} = ccolamd (@var{s})} is about the same as @code{@var{p} = ! colamd (@var{s})}. @var{knobs} and its default values differ. @code{colamd} always does aggressive absorption, and it finds an ordering suitable for ! both @code{lu (@var{s} (:, @var{p}))} and @code{chol (@var{S} (:, @var{p})' ! * @var{s} (:, @var{p}))}; it cannot optimize its ordering for ! @code{lu (@var{s} (:, @var{p}))} to the extent that ! @code{ccolamd (@var{s}, 1)} can. @var{stats} is an optional 20-element output vector that provides data about the ordering and the validity of the input matrix @var{s}. Ordering ! statistics are in @code{@var{stats} (1 : 3)}. @code{@var{stats} (1)} and @code{@var{stats} (2)} are the number of dense or empty rows and columns ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage collections performed on the internal data structure used by CCOLAMD ! (roughly of size @code{2.2 * nnz (@var{s}) + 4 * @var{m} + 7 * @var{n}} integers). ! @code{@var{stats} (4 : 7)} provide information if CCOLAMD was able to continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if invalid. @code{@var{stats} (5)} is the rightmost column index that is unsorted or contains duplicate entries, or zero if no such column exists. @code{@var{stats} (6)} is the last seen duplicate or out-of-order row index in the column index given by @code{@var{stats} (5)}, or zero if no such row index exists. @code{@var{stats} (7)} is the number of duplicate ! or out-of-order row indices. @code{@var{stats} (8 : 20)} is always zero in the current version of CCOLAMD (reserved for future use). The authors of the code itself are S. Larimore, T. Davis (Uni of Florida) *************** *** 1041,1047 **** tried if the @code{"compute consistent initial condition"} option has been set to 1 (default is 5). ! Note that the maximum number of Newton iterations allowed in all is @code{MXNIT*MXNJ*MXNH} if the @code{"compute consistent initial condition"} option has been set to 1 and @code{MXNIT*MXNJ} if it is set to 2. --- 1092,1098 ---- tried if the @code{"compute consistent initial condition"} option has been set to 1 (default is 5). ! Note that the maximum total number of Newton iterations allowed is @code{MXNIT*MXNJ*MXNH} if the @code{"compute consistent initial condition"} option has been set to 1 and @code{MXNIT*MXNJ} if it is set to 2. *************** *** 1808,1818 **** --- 1859,1881 ---- sum -*- texinfo -*- @deftypefn {Built-in Function} {} sum (@var{x}, @var{dim}) + @deftypefnx {Built-in Function} {} sum (@dots{}, 'native') Sum of elements along dimension @var{dim}. If @var{dim} is omitted, it defaults to 1 (column-wise sum). As a special case, if @var{x} is a vector and @var{dim} is omitted, return the sum of the elements. + + If the optional argument 'native' is given, then the sum is performed + in the same type as the original argument, rather than in the default + double type. For example + + @example + sum ([true, true]) + @result{} 2 + sum ([true, true], 'native') + @result{} true + @end example @end deftypefn sumsq -*- texinfo -*- *************** *** 1831,1837 **** @end deftypefn islogical -*- texinfo -*- ! @deftypefn {Built-in Functio} {} islogical (@var{x}) Return true if @var{x} is a logical object. @end deftypefn isinteger --- 1894,1900 ---- @end deftypefn islogical -*- texinfo -*- ! @deftypefn {Built-in Function} {} islogical (@var{x}) Return true if @var{x} is a logical object. @end deftypefn isinteger *************** *** 3609,3618 **** default, @code{fread} returns a double precision array. The special form @samp{*TYPE} is shorthand for @samp{TYPE=>TYPE}. ! The conversion and repeat counts may be combined. For example, ! @samp{32*single=>single} causes @code{fread} to read blocks of single ! precision floating point values and return an array of single precision ! values instead of the default array of double precision values. The optional argument @var{skip} specifies the number of bytes to skip after each element (or block of elements) is read. If it is not --- 3672,3682 ---- default, @code{fread} returns a double precision array. The special form @samp{*TYPE} is shorthand for @samp{TYPE=>TYPE}. ! The conversion and repeat counts may be combined. For example, the ! specification @samp{32*single=>single} causes @code{fread} to read ! blocks of single precision floating point values and return an array ! of single precision values instead of the default array of double ! precision values. The optional argument @var{skip} specifies the number of bytes to skip after each element (or block of elements) is read. If it is not *************** *** 4408,4414 **** @deftypefn {Built-in Function} {@var{val} =} info_program () @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val}) Query or set the internal variable that specifies the name of the ! info program to run. The default initial value is @code{"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info"} in which @var{octave-home} is the directory where all of Octave is installed, @var{version} is the Octave version number, and @var{arch} --- 4472,4478 ---- @deftypefn {Built-in Function} {@var{val} =} info_program () @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val}) Query or set the internal variable that specifies the name of the ! info program to run. The default value is @code{"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info"} in which @var{octave-home} is the directory where all of Octave is installed, @var{version} is the Octave version number, and @var{arch} *************** *** 4591,4597 **** To change it, use a command like @example ! octave:13> PS1 = "\\u@@\\H> " @end example @noindent --- 4655,4661 ---- To change it, use a command like @example ! octave:13> PS1 ("\\u@@\\H> ") @end example @noindent *************** *** 6638,6644 **** You can convert the string back into a matrix as follows: @example ! eval(['[',rats(hilb(4)),'];']) @end example The optional second argument defines the maximum length of the string --- 6702,6709 ---- You can convert the string back into a matrix as follows: @example ! r = rats(hilb(4)); ! x = str2num(r) @end example The optional second argument defines the maximum length of the string *************** *** 6730,6736 **** @group ans = - 3.1416 9.8696 97.409 9488.5 --- 6795,6800 ---- *************** *** 6749,6755 **** @group ans = - 3.1416 9.8696 97.409 9488.5 --- 6813,6818 ---- *************** *** 7225,7232 **** available, otherwise from cpu time, wall clock time and the current fraction of a second. ! @code{rand} uses the Mersenne Twister with a period of 2^19937-1 ! (See M. Matsumoto and T. Nishimura, ``Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator'', ACM Trans. on Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998, @url{http://www.math.keio.ac.jp/~matumoto/emt.html}). --- 7288,7296 ---- available, otherwise from cpu time, wall clock time and the current fraction of a second. ! To compute the psuedo-random sequence, @code{rand} uses the Mersenne ! Twister with a period of 2^19937-1 (See M. Matsumoto and T. Nishimura, ! ``Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator'', ACM Trans. on Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998, @url{http://www.math.keio.ac.jp/~matumoto/emt.html}). *************** *** 7234,7241 **** several returned values together, otherwise the generator state can be learned after reading 624 consecutive values. ! @code{rand} includes a second random number generator, that was the ! previous generator used in Octave. The new generator is used by default as it is significantly faster than the old generator, and produces random numbers with a significantly longer cycle time. However, in some circumstances it might be desirable to obtain the same random --- 7298,7305 ---- several returned values together, otherwise the generator state can be learned after reading 624 consecutive values. ! Older versions of Octave used a different random number generator. ! The new generator is used by default as it is significantly faster than the old generator, and produces random numbers with a significantly longer cycle time. However, in some circumstances it might be desirable to obtain the same random *************** *** 7329,7338 **** @end example @item @code{F (n1, n2)} for @code{0 < n1}, @code{0 < n2} @example ! r1 = 2 * randg (n1 / 2) / n1 ## r1 equals 1 if n1 is infinite ! r2 = 2 * randg (n2 / 2) / n2 ## r2 equals 1 if n2 is infinite r = r1 / r2 @end example @item negative @code{binomial (n, p)} for @code{n > 0}, @code{0 < p <= 1} @example --- 7393,7406 ---- @end example @item @code{F (n1, n2)} for @code{0 < n1}, @code{0 < n2} @example ! @group ! ## r1 equals 1 if n1 is infinite ! r1 = 2 * randg (n1 / 2) / n1 ! ## r2 equals 1 if n2 is infinite ! r2 = 2 * randg (n2 / 2) / n2 r = r1 / r2 + @end group @end example @item negative @code{binomial (n, p)} for @code{n > 0}, @code{0 < p <= 1} @example *************** *** 9175,9181 **** be less than zero and @var{msg} will contain a system-dependent error message. The value of @var{status} contains additional system-dependent information about the subprocess that exited. ! @seealso{WNOHANG, WUNTRACED, WCONTINUED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED} @end deftypefn WIFEXITED -*- texinfo -*- --- 9243,9249 ---- be less than zero and @var{msg} will contain a system-dependent error message. The value of @var{status} contains additional system-dependent information about the subprocess that exited. ! @seealso{WCONTINUED, WCOREDUMP, WEXITSTATUS, WIFCONTINUED, WIFSIGNALED, WIFSTOPPED, WNOHANG, WSTOPSIG, WTERMSIG, WUNTRACED} @end deftypefn WIFEXITED -*- texinfo -*- *************** *** 9559,9565 **** @example @group ! mktime (localtime (time ()) @result{} 856163706 @end group @end example --- 9627,9633 ---- @example @group ! mktime (localtime (time ())) @result{} 856163706 @end group @end example diff -cNr octave-2.9.16/src/OPERATORS/op-bm-bm.cc octave-2.9.17/src/OPERATORS/op-bm-bm.cc *** octave-2.9.16/src/OPERATORS/op-bm-bm.cc Fri Oct 12 17:27:35 2007 --- octave-2.9.17/src/OPERATORS/op-bm-bm.cc Tue Nov 6 12:55:18 2007 *************** *** 29,34 **** --- 29,35 ---- #include "oct-obj.h" #include "ov.h" #include "ov-bool-mat.h" + #include "ov-scalar.h" #include "ov-range.h" #include "ov-re-mat.h" #include "ov-re-sparse.h" *************** *** 100,105 **** --- 101,109 ---- return octave_value (); } + DEFCONVFN (matrix_to_bool_matrix, matrix, bool) + DEFCONVFN (scalar_to_bool_matrix, scalar, bool) + void install_bm_bm_ops (void) { *************** *** 119,124 **** --- 123,131 ---- INSTALL_CATOP (octave_bool_matrix, octave_matrix, bm_m); INSTALL_CATOP (octave_matrix, octave_bool_matrix, m_bm); + INSTALL_CONVOP (octave_matrix, octave_bool_matrix, matrix_to_bool_matrix); + INSTALL_CONVOP (octave_scalar, octave_bool_matrix, scalar_to_bool_matrix); + INSTALL_ASSIGNOP (op_asn_eq, octave_bool_matrix, octave_bool_matrix, assign); INSTALL_ASSIGNOP (op_asn_eq, octave_bool_matrix, octave_matrix, conv_and_assign); diff -cNr octave-2.9.16/src/__gnuplot_raw__.cc octave-2.9.17/src/__gnuplot_raw__.cc *** octave-2.9.16/src/__gnuplot_raw__.cc Wed Oct 31 17:44:18 2007 --- octave-2.9.17/src/__gnuplot_raw__.cc Fri Nov 9 20:34:38 2007 *************** *** 533,540 **** // PKG_ADD: mark_as_command ("__gnuplot_set__"); // PKG_ADD: mark_as_command ("__gnuplot_show__"); - // PKG_ADD: atexit ("closeplot"); - #ifdef HAVE_CONFIG_H #include #endif --- 533,538 ---- *************** *** 618,624 **** /* NOT is not strictly a binary operator, but is close enough for us. */ /* single quote (') transpose operator is handled separately. */ ! #line 622 "" #define INITIAL 0 --- 616,622 ---- /* NOT is not strictly a binary operator, but is close enough for us. */ /* single quote (') transpose operator is handled separately. */ ! #line 620 "" #define INITIAL 0 *************** *** 771,780 **** register char *yy_cp, *yy_bp; register int yy_act; ! #line 130 "DLD-FUNCTIONS/__gnuplot_raw__.l" ! #line 778 "" if ( !(yy_init) ) { --- 769,778 ---- register char *yy_cp, *yy_bp; register int yy_act; ! #line 128 "DLD-FUNCTIONS/__gnuplot_raw__.l" ! #line 776 "" if ( !(yy_init) ) { *************** *** 859,865 **** case 1: YY_RULE_SETUP ! #line 132 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_parens++; --- 857,863 ---- case 1: YY_RULE_SETUP ! #line 130 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_parens++; *************** *** 868,874 **** YY_BREAK case 2: YY_RULE_SETUP ! #line 138 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_parens--; --- 866,872 ---- YY_BREAK case 2: YY_RULE_SETUP ! #line 136 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_parens--; *************** *** 877,883 **** YY_BREAK case 3: YY_RULE_SETUP ! #line 144 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_braces++; --- 875,881 ---- YY_BREAK case 3: YY_RULE_SETUP ! #line 142 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_braces++; *************** *** 886,892 **** YY_BREAK case 4: YY_RULE_SETUP ! #line 150 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_braces--; --- 884,890 ---- YY_BREAK case 4: YY_RULE_SETUP ! #line 148 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_braces--; *************** *** 895,901 **** YY_BREAK case 5: YY_RULE_SETUP ! #line 156 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_brackets++; --- 893,899 ---- YY_BREAK case 5: YY_RULE_SETUP ! #line 154 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_brackets++; *************** *** 904,910 **** YY_BREAK case 6: YY_RULE_SETUP ! #line 162 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_brackets--; --- 902,908 ---- YY_BREAK case 6: YY_RULE_SETUP ! #line 160 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_brackets--; *************** *** 913,919 **** YY_BREAK case 7: YY_RULE_SETUP ! #line 168 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return COLON; --- 911,917 ---- YY_BREAK case 7: YY_RULE_SETUP ! #line 166 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return COLON; *************** *** 921,927 **** YY_BREAK case 8: YY_RULE_SETUP ! #line 173 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return SEMICOLON; --- 919,925 ---- YY_BREAK case 8: YY_RULE_SETUP ! #line 171 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return SEMICOLON; *************** *** 929,935 **** YY_BREAK case 9: YY_RULE_SETUP ! #line 178 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return COMMA; --- 927,933 ---- YY_BREAK case 9: YY_RULE_SETUP ! #line 176 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return COMMA; *************** *** 937,943 **** YY_BREAK case 10: YY_RULE_SETUP ! #line 183 "DLD-FUNCTIONS/__gnuplot_raw__.l" { if (gpt_quote_is_transpose) { --- 935,941 ---- YY_BREAK case 10: YY_RULE_SETUP ! #line 181 "DLD-FUNCTIONS/__gnuplot_raw__.l" { if (gpt_quote_is_transpose) { *************** *** 954,960 **** YY_BREAK case 11: YY_RULE_SETUP ! #line 197 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return DOLLAR; --- 952,958 ---- YY_BREAK case 11: YY_RULE_SETUP ! #line 195 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; return DOLLAR; *************** *** 962,975 **** YY_BREAK case 12: YY_RULE_SETUP ! #line 202 "DLD-FUNCTIONS/__gnuplot_raw__.l" { return handle_string ('"'); } YY_BREAK case 13: YY_RULE_SETUP ! #line 206 "DLD-FUNCTIONS/__gnuplot_raw__.l" { int itok = 0; if (can_be_plotkw () && (itok = is_plot_keyword (gpttext))) --- 960,973 ---- YY_BREAK case 12: YY_RULE_SETUP ! #line 200 "DLD-FUNCTIONS/__gnuplot_raw__.l" { return handle_string ('"'); } YY_BREAK case 13: YY_RULE_SETUP ! #line 204 "DLD-FUNCTIONS/__gnuplot_raw__.l" { int itok = 0; if (can_be_plotkw () && (itok = is_plot_keyword (gpttext))) *************** *** 992,1001 **** *yy_cp = (yy_hold_char); /* undo effects of setting up gpttext */ (yy_c_buf_p) = yy_cp -= 2; YY_DO_BEFORE_ACTION; /* set up gpttext again */ ! #line 225 "DLD-FUNCTIONS/__gnuplot_raw__.l" case 15: YY_RULE_SETUP ! #line 225 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_allow_plotkw = true; --- 990,999 ---- *yy_cp = (yy_hold_char); /* undo effects of setting up gpttext */ (yy_c_buf_p) = yy_cp -= 2; YY_DO_BEFORE_ACTION; /* set up gpttext again */ ! #line 223 "DLD-FUNCTIONS/__gnuplot_raw__.l" case 15: YY_RULE_SETUP ! #line 223 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = true; gpt_allow_plotkw = true; *************** *** 1004,1010 **** YY_BREAK case 16: YY_RULE_SETUP ! #line 231 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_allow_plotkw = false; --- 1002,1008 ---- YY_BREAK case 16: YY_RULE_SETUP ! #line 229 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_allow_plotkw = false; *************** *** 1013,1019 **** YY_BREAK case 17: YY_RULE_SETUP ! #line 237 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_allow_plotkw = true; --- 1011,1017 ---- YY_BREAK case 17: YY_RULE_SETUP ! #line 235 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_allow_plotkw = true; *************** *** 1022,1033 **** YY_BREAK case 18: YY_RULE_SETUP ! #line 243 "DLD-FUNCTIONS/__gnuplot_raw__.l" { /* Ignore spaces and tabs outside of character strings. */ } YY_BREAK case 19: YY_RULE_SETUP ! #line 245 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_allow_plotkw = true; --- 1020,1031 ---- YY_BREAK case 18: YY_RULE_SETUP ! #line 241 "DLD-FUNCTIONS/__gnuplot_raw__.l" { /* Ignore spaces and tabs outside of character strings. */ } YY_BREAK case 19: YY_RULE_SETUP ! #line 243 "DLD-FUNCTIONS/__gnuplot_raw__.l" { gpt_quote_is_transpose = false; gpt_allow_plotkw = true; *************** *** 1037,1046 **** YY_BREAK case 20: YY_RULE_SETUP ! #line 252 "DLD-FUNCTIONS/__gnuplot_raw__.l" ECHO; YY_BREAK ! #line 1044 "" case YY_STATE_EOF(INITIAL): yyterminate(); --- 1035,1044 ---- YY_BREAK case 20: YY_RULE_SETUP ! #line 250 "DLD-FUNCTIONS/__gnuplot_raw__.l" ECHO; YY_BREAK ! #line 1042 "" case YY_STATE_EOF(INITIAL): yyterminate(); *************** *** 2026,2032 **** #define YYTABLES_NAME "yytables" ! #line 252 "DLD-FUNCTIONS/__gnuplot_raw__.l" --- 2024,2030 ---- #define YYTABLES_NAME "yytables" ! #line 250 "DLD-FUNCTIONS/__gnuplot_raw__.l" *************** *** 2468,2476 **** --- 2466,2490 ---- return name; } + #define WARN_OBSOLETE(nm) \ + do \ + { \ + static bool warned = false; \ + \ + if (! warned) \ + { \ + warning ("%s: this function is obsolete and will be removed from a future version of Octave", nm); \ + \ + warned = true; \ + } \ + } \ + while (0) + DEFUN_DLD (__gnuplot_save_data__, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_save_data__ (@var{data}, @var{ndim}, @var{parametric})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { octave_value retval; *************** *** 2479,2484 **** --- 2493,2500 ---- if (nargin > 0 && nargin < 4) { + WARN_OBSOLETE ("__gnuplot_save_data__"); + int ndim = 2; bool parametric = false; *************** *** 3346,3353 **** --- 3362,3373 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} = } gnuplot_command_plot ()\n\ @deftypefnx {Loadable Function} {@var{old_val} = } gnuplot_command_plot (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_plot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_plot); } *************** *** 3355,3362 **** --- 3375,3386 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_replot ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_replot (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_replot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_replot); } *************** *** 3364,3371 **** --- 3388,3399 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_splot ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_splot (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_splot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_splot); } *************** *** 3373,3380 **** --- 3401,3412 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_using ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_using (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_using"); + return SET_INTERNAL_VARIABLE (gnuplot_command_using); } *************** *** 3382,3389 **** --- 3414,3424 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_with ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_with (@var{new_val})\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_with"); + return SET_INTERNAL_VARIABLE (gnuplot_command_with); } *************** *** 3391,3398 **** --- 3426,3437 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_axes ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_axes (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_axes"); + return SET_INTERNAL_VARIABLE (gnuplot_command_axes); } *************** *** 3400,3407 **** --- 3439,3450 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_title ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_title (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_title"); + return SET_INTERNAL_VARIABLE (gnuplot_command_title); } *************** *** 3409,3416 **** --- 3452,3464 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{val} =} gnuplot_command_end ()\n\ @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_end (@var{new_val})\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ + \n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_end"); + return SET_INTERNAL_VARIABLE (gnuplot_command_end); } *************** *** 3421,3428 **** --- 3469,3481 ---- If enabled, append @samp{-title \"Figure NN\"} to the gnuplot command.\n\ By default, this feature is enabled if the @code{DISPLAY} environment\n\ variable is set when Octave starts.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_use_title_option"); + return SET_INTERNAL_VARIABLE (gnuplot_use_title_option); } *************** *** 3431,3438 **** --- 3484,3496 ---- @deftypefn {Loadable Function} {} clearplot\n\ @deftypefnx {Loadable Function} {} clg\n\ Clear the plot window and any titles or axis labels.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("__clear_plot_window__"); + gnuplot::clear (); return octave_value_list (); *************** *** 3441,3450 **** --- 3499,3514 ---- DEFUN_DLD (closeplot, , , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} closeplot\n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ + \n\ Close stream to the @code{gnuplot} subprocess. If you are using X11,\n\ this will close the plot window.\n\ + @seealso{close}\n\ @end deftypefn") { + WARN_OBSOLETE ("closeplot"); + gnuplot::close (); return octave_value_list (); *************** *** 3460,3482 **** temporary files on exit, but if you are doing a lot of plotting you may\n\ want to clean up in the middle of a session.\n\ \n\ ! A future version of Octave will eliminate the need to use temporary\n\ ! files to hold the plot data.\n\ @end deftypefn") { gnuplot::cleanup_tmp_files (); return octave_value_list (); } ! DEFUN_DLD (__gnuplot_raw__, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string})\n\ Send @var{string} directly to gnuplot subprocess.\n\ @end deftypefn") { if (args.length () == 1 && args(0).is_string ()) { std::string cmd = args(0).string_value (); gnuplot::send_raw (cmd); --- 3524,3553 ---- temporary files on exit, but if you are doing a lot of plotting you may\n\ want to clean up in the middle of a session.\n\ \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("purge_tmp_files"); + gnuplot::cleanup_tmp_files (); return octave_value_list (); } ! DEFUN_DLD (__gnuplot_raw__, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string})\n\ Send @var{string} directly to gnuplot subprocess.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { if (args.length () == 1 && args(0).is_string ()) { + WARN_OBSOLETE ("__gnuplot_raw__"); + std::string cmd = args(0).string_value (); gnuplot::send_raw (cmd); *************** *** 3491,3496 **** --- 3562,3570 ---- "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_send_inline_data__ (@var{data}, @var{ndim}, @var{parametric})\n\ Send @var{val} to gnuplot subprocess as inline data.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deftypefn") { octave_value retval; *************** *** 3499,3504 **** --- 3573,3580 ---- if (nargin > 0 && nargin < 4) { + WARN_OBSOLETE ("__gnuplot_send_inline_data__"); + int ndim = 2; bool parametric = false; *************** *** 3526,3533 **** --- 3602,3614 ---- "-*- texinfo -*-\n\ @deffn {Loadable Function} __gnuplot_set__ options\n\ Set plotting options for gnuplot\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deffn") { + WARN_OBSOLETE ("__gnuplot_set__"); + string_vector argv = args.make_argv ("set"); if (! error_state) *************** *** 3540,3547 **** --- 3621,3633 ---- "-*- texinfo -*-\n\ @deffn {Loadable Function} __gnuplot_show__ options\n\ Show plotting options.\n\ + \n\ + @strong{This function is obsolete and will be removed from a future version\n\ + of Octave.}\n\ @end deffn") { + WARN_OBSOLETE ("__gnuplot_show__"); + string_vector argv = args.make_argv ("show"); if (! error_state) *************** *** 3551,3558 **** } DEFUN_DLD (__gnuplot_plot__, args, , ! "Plot with gnuplot.\n") { string_vector argv = args.make_argv ("plot"); if (! error_state) --- 3637,3650 ---- } DEFUN_DLD (__gnuplot_plot__, args, , ! "-*- texinfo -*-\n\ ! Plot with gnuplot.\n\ ! \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}") { + WARN_OBSOLETE ("__gnuplot_plot__"); + string_vector argv = args.make_argv ("plot"); if (! error_state) *************** *** 3562,3569 **** } DEFUN_DLD (__gnuplot_splot__, args, , ! "Plot with gnuplot.\n") { string_vector argv = args.make_argv ("splot"); if (! error_state) --- 3654,3667 ---- } DEFUN_DLD (__gnuplot_splot__, args, , ! "-*- texinfo -*-\n\ ! Plot with gnuplot.\n\ ! \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}") { + WARN_OBSOLETE ("__gnuplot_splot__"); + string_vector argv = args.make_argv ("splot"); if (! error_state) *************** *** 3573,3580 **** } DEFUN_DLD (__gnuplot_replot__, args, , ! "Plot with gnuplot.\n") { string_vector argv = args.make_argv ("replot"); if (! error_state) --- 3671,3684 ---- } DEFUN_DLD (__gnuplot_replot__, args, , ! "-*- texinfo -*-\n\ ! Plot with gnuplot.\n\ ! \n\ ! @strong{This function is obsolete and will be removed from a future version\n\ ! of Octave.}") { + WARN_OBSOLETE ("__gnuplot_replot__"); + string_vector argv = args.make_argv ("replot"); if (! error_state) diff -cNr octave-2.9.16/src/bitfcns.cc octave-2.9.17/src/bitfcns.cc *** octave-2.9.16/src/bitfcns.cc Fri Oct 12 17:27:29 2007 --- octave-2.9.17/src/bitfcns.cc Fri Nov 2 13:24:23 2007 *************** *** 393,399 **** @var{n} must be in range [1,log2(bitmax)+1] usually [1,33]\n\ \n\ @example\n\ ! bitshift (eye (3), 1))\n\ @result{}\n\ @group\n\ 2 0 0\n\ --- 393,399 ---- @var{n} must be in range [1,log2(bitmax)+1] usually [1,33]\n\ \n\ @example\n\ ! bitshift (eye (3), 1)\n\ @result{}\n\ @group\n\ 2 0 0\n\ diff -cNr octave-2.9.16/src/data.cc octave-2.9.17/src/data.cc *** octave-2.9.16/src/data.cc Tue Oct 30 10:05:00 2007 --- octave-2.9.17/src/data.cc Fri Nov 9 12:43:07 2007 *************** *** 370,375 **** --- 370,481 ---- return retval; } + #define NATIVE_REDUCTION_1(FCN, TYPE, DIM) \ + (arg.is_ ## TYPE ## _type ()) \ + { \ + TYPE ## NDArray tmp = arg. TYPE ##_array_value (); \ + \ + if (! error_state) \ + retval = tmp.FCN (DIM); \ + } + + #define NATIVE_REDUCTION(FCN) \ + \ + octave_value retval; \ + \ + int nargin = args.length (); \ + \ + bool isnative = false; \ + \ + if (nargin > 1 && args(nargin - 1).is_string ()) \ + { \ + std::string str = args(nargin - 1).string_value (); \ + \ + if (! error_state) \ + { \ + if (str == "native") \ + isnative = true; \ + else if (str != "double") /* Ignore double as no single type */ \ + error ("sum: unrecognized string argument"); \ + nargin --; \ + } \ + } \ + \ + if (nargin == 1 || nargin == 2) \ + { \ + octave_value arg = args(0); \ + \ + int dim = (nargin == 1 ? -1 : args(1).int_value (true) - 1); \ + \ + if (! error_state) \ + { \ + if (dim >= -1) \ + { \ + if (isnative) \ + { \ + if NATIVE_REDUCTION_1 (FCN, uint8, dim) \ + else if NATIVE_REDUCTION_1 (FCN, uint16, dim) \ + else if NATIVE_REDUCTION_1 (FCN, uint32, dim) \ + else if NATIVE_REDUCTION_1 (FCN, uint64, dim) \ + else if NATIVE_REDUCTION_1 (FCN, int8, dim) \ + else if NATIVE_REDUCTION_1 (FCN, int16, dim) \ + else if NATIVE_REDUCTION_1 (FCN, int32, dim) \ + else if NATIVE_REDUCTION_1 (FCN, int64, dim) \ + else if NATIVE_REDUCTION_1 (FCN, bool, dim) \ + else if (arg.is_char_matrix ()) \ + { \ + error (#FCN, ": invalid char type"); \ + } \ + else if (arg.is_complex_type ()) \ + { \ + ComplexNDArray tmp = arg.complex_array_value (); \ + \ + if (! error_state) \ + retval = tmp.FCN (dim); \ + } \ + else if (arg.is_real_type ()) \ + { \ + NDArray tmp = arg.array_value (); \ + \ + if (! error_state) \ + retval = tmp.FCN (dim); \ + } \ + else \ + { \ + gripe_wrong_type_arg (#FCN, arg); \ + return retval; \ + } \ + } \ + else if (arg.is_real_type ()) \ + { \ + NDArray tmp = arg.array_value (); \ + \ + if (! error_state) \ + retval = tmp.FCN (dim); \ + } \ + else if (arg.is_complex_type ()) \ + { \ + ComplexNDArray tmp = arg.complex_array_value (); \ + \ + if (! error_state) \ + retval = tmp.FCN (dim); \ + } \ + else \ + { \ + gripe_wrong_type_arg (#FCN, arg); \ + return retval; \ + } \ + } \ + else \ + error (#FCN ": invalid dimension argument = %d", dim + 1); \ + } \ + \ + } \ + else \ + print_usage (); \ + \ + return retval + #define DATA_REDUCTION(FCN) \ \ octave_value retval; \ *************** *** 1213,1228 **** DEFUN (sum, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sum (@var{x}, @var{dim})\n\ Sum of elements along dimension @var{dim}. If @var{dim} is\n\ omitted, it defaults to 1 (column-wise sum).\n\ \n\ As a special case, if @var{x} is a vector and @var{dim} is omitted,\n\ return the sum of the elements.\n\ @end deftypefn") { ! DATA_REDUCTION (sum); } DEFUN (sumsq, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sumsq (@var{x}, @var{dim})\n\ --- 1319,1355 ---- DEFUN (sum, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sum (@var{x}, @var{dim})\n\ + @deftypefnx {Built-in Function} {} sum (@dots{}, 'native')\n\ Sum of elements along dimension @var{dim}. If @var{dim} is\n\ omitted, it defaults to 1 (column-wise sum).\n\ \n\ As a special case, if @var{x} is a vector and @var{dim} is omitted,\n\ return the sum of the elements.\n\ + \n\ + If the optional argument 'native' is given, then the sum is performed\n\ + in the same type as the original argument, rather than in the default\n\ + double type. For example\n\ + \n\ + @example\n\ + sum ([true, true])\n\ + @result{} 2\n\ + sum ([true, true], 'native')\n\ + @result{} true\n\ + @end example\n\ @end deftypefn") { ! NATIVE_REDUCTION (sum); } + /* + + %!assert (sum([true,true]), 2) + %!assert (sum([true,true],'native'), true) + %!assert (sum(int8([127,10,-20])), 117); + %!assert (sum(int8([127,10,-20]),'native'), int8(107)); + + */ + DEFUN (sumsq, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sumsq (@var{x}, @var{dim})\n\ *************** *** 1244,1250 **** DEFUN (islogical, args, , "-*- texinfo -*-\n\ ! @deftypefn {Built-in Functio} {} islogical (@var{x})\n\ Return true if @var{x} is a logical object.\n\ @end deftypefn") { --- 1371,1377 ---- DEFUN (islogical, args, , "-*- texinfo -*-\n\ ! @deftypefn {Built-in Function} {} islogical (@var{x})\n\ Return true if @var{x} is a logical object.\n\ @end deftypefn") { *************** *** 2613,2619 **** %!assert(norm(x,Inf), 7); %!assert(norm(x,-Inf), 1); %!assert(norm(x,"inf"), 7); ! %!assert(norm(x,"fro"), 10); %!assert(norm(x), 10); %!assert(norm([1e200, 1]), 1e200); %!assert(norm([3+4i, 3-4i, sqrt(31)]), 9, -4*eps); --- 2740,2746 ---- %!assert(norm(x,Inf), 7); %!assert(norm(x,-Inf), 1); %!assert(norm(x,"inf"), 7); ! %!assert(norm(x,"fro"), 10, -eps); %!assert(norm(x), 10); %!assert(norm([1e200, 1]), 1e200); %!assert(norm([3+4i, 3-4i, sqrt(31)]), 9, -4*eps); *************** *** 2623,2628 **** --- 2750,2761 ---- %!assert(norm(m,2), 34, -eps); %!assert(norm(m,Inf), 34); %!assert(norm(m,"inf"), 34); + %!shared m2, flo, fhi + %! m2 = [1,2;3,4]; + %! flo = 1e-300; + %! fhi = 1e+300; + %!assert (norm(flo*m2,"fro"), sqrt(30)*flo, -eps) + %!assert (norm(fhi*m2,"fro"), sqrt(30)*fhi, -eps) */ // Compute various norms of the vector X. *************** *** 2684,2715 **** if ((x_arg.rows () == 1 || x_arg.columns () == 1) && ! (x_arg.is_sparse_type () || x_arg.is_integer_type ())) { ! double p_val; ! ! octave_value p_arg; ! if (nargin == 1) ! p_arg = 2; ! else ! p_arg = args(1); ! ! if (p_arg.is_string ()) { ! std::string p = args(1).string_value (); ! if (p == "inf") ! p_val = octave_Inf; ! else if (p == "fro") ! p_val = -1; else ! error ("norm: unrecognized norm `%s'", p.c_str ()); ! } ! else ! { ! p_val = p_arg.double_value (); ! if (error_state) ! error ("norm: unrecognized norm value"); } if (! error_state) --- 2817,2846 ---- if ((x_arg.rows () == 1 || x_arg.columns () == 1) && ! (x_arg.is_sparse_type () || x_arg.is_integer_type ())) { ! double p_val = 2; ! if (nargin == 2) { ! octave_value p_arg = args(1); ! ! if (p_arg.is_string ()) ! { ! std::string p = args(1).string_value (); ! if (p == "inf") ! p_val = octave_Inf; ! else if (p == "fro") ! p_val = -1; ! else ! error ("norm: unrecognized norm `%s'", p.c_str ()); ! } else ! { ! p_val = p_arg.double_value (); ! if (error_state) ! error ("norm: unrecognized norm value"); ! } } if (! error_state) *************** *** 3140,3154 **** static_cast(HZ); #elif defined (__WIN32__) HANDLE hProcess = GetCurrentProcess (); FILETIME ftCreation, ftExit, ftUser, ftKernel; GetProcessTimes (hProcess, &ftCreation, &ftExit, &ftKernel, &ftUser); int64_t itmp = *(reinterpret_cast (&ftUser)); ! usr = static_cast (itmp) * 1e-1; itmp = *(reinterpret_cast (&ftKernel)); ! sys = static_cast (itmp) * 1e-1; #endif --- 3271,3286 ---- static_cast(HZ); #elif defined (__WIN32__) + HANDLE hProcess = GetCurrentProcess (); FILETIME ftCreation, ftExit, ftUser, ftKernel; GetProcessTimes (hProcess, &ftCreation, &ftExit, &ftKernel, &ftUser); int64_t itmp = *(reinterpret_cast (&ftUser)); ! usr = static_cast (itmp) * 1e-7; itmp = *(reinterpret_cast (&ftKernel)); ! sys = static_cast (itmp) * 1e-7; #endif diff -cNr octave-2.9.16/src/defun-int.h octave-2.9.17/src/defun-int.h *** octave-2.9.16/src/defun-int.h Fri Oct 12 17:27:29 2007 --- octave-2.9.17/src/defun-int.h Tue Nov 6 11:26:13 2007 *************** *** 95,103 **** bool \ fsname ## _ ## cxx_abi (const octave_shlib& shl, bool relative) \ { \ check_version (OCTAVE_API_VERSION, name); \ ! install_dld_function (fname, name, shl, doc, false, relative); \ ! return error_state ? false : true; \ } // MAKE_BUILTINS is defined to extract function names and related --- 95,110 ---- bool \ fsname ## _ ## cxx_abi (const octave_shlib& shl, bool relative) \ { \ + bool retval = true; \ + \ check_version (OCTAVE_API_VERSION, name); \ ! \ ! if (error_state) \ ! retval = false; \ ! else \ ! install_dld_function (fname, name, shl, doc, false, relative); \ ! \ ! return retval; \ } // MAKE_BUILTINS is defined to extract function names and related diff -cNr octave-2.9.16/src/file-io.cc octave-2.9.17/src/file-io.cc *** octave-2.9.16/src/file-io.cc Tue Oct 30 10:05:00 2007 --- octave-2.9.17/src/file-io.cc Fri Nov 2 13:24:24 2007 *************** *** 188,194 **** else if (mode == "w+t") retval = std::ios::in | std::ios::out | std::ios::trunc; else if (mode == "a+t") ! retval = std::ios::in | std::ios::out | std::ios::ate; else if (mode == "rb" || mode == "r") retval = std::ios::in | std::ios::binary; else if (mode == "wb" || mode == "w") --- 188,194 ---- else if (mode == "w+t") retval = std::ios::in | std::ios::out | std::ios::trunc; else if (mode == "a+t") ! retval = std::ios::in | std::ios::out | std::ios::app; else if (mode == "rb" || mode == "r") retval = std::ios::in | std::ios::binary; else if (mode == "wb" || mode == "w") *************** *** 201,207 **** retval = (std::ios::in | std::ios::out | std::ios::trunc | std::ios::binary); else if (mode == "a+b" || mode == "a+") ! retval = (std::ios::in | std::ios::out | std::ios::ate | std::ios::binary); else ::error ("invalid mode specified"); --- 201,207 ---- retval = (std::ios::in | std::ios::out | std::ios::trunc | std::ios::binary); else if (mode == "a+b" || mode == "a+") ! retval = (std::ios::in | std::ios::out | std::ios::app | std::ios::binary); else ::error ("invalid mode specified"); *************** *** 1424,1433 **** default, @code{fread} returns a double precision array. The special\n\ form @samp{*TYPE} is shorthand for @samp{TYPE=>TYPE}.\n\ \n\ ! The conversion and repeat counts may be combined. For example,\n\ ! @samp{32*single=>single} causes @code{fread} to read blocks of single\n\ ! precision floating point values and return an array of single precision\n\ ! values instead of the default array of double precision values.\n\ \n\ The optional argument @var{skip} specifies the number of bytes to skip\n\ after each element (or block of elements) is read. If it is not\n\ --- 1424,1434 ---- default, @code{fread} returns a double precision array. The special\n\ form @samp{*TYPE} is shorthand for @samp{TYPE=>TYPE}.\n\ \n\ ! The conversion and repeat counts may be combined. For example, the\n\ ! specification @samp{32*single=>single} causes @code{fread} to read\n\ ! blocks of single precision floating point values and return an array\n\ ! of single precision values instead of the default array of double\n\ ! precision values.\n\ \n\ The optional argument @var{skip} specifies the number of bytes to skip\n\ after each element (or block of elements) is read. If it is not\n\ diff -cNr octave-2.9.16/src/graphics.cc octave-2.9.17/src/graphics.cc *** octave-2.9.16/src/graphics.cc Wed Oct 31 13:11:49 2007 --- octave-2.9.17/src/graphics.cc Fri Nov 9 13:01:45 2007 *************** *** 592,598 **** static bool is_handle (const octave_value& val) { ! return val.is_real_type () && is_handle (val.double_value ()); } static bool --- 592,598 ---- static bool is_handle (const octave_value& val) { ! return val.is_real_scalar () && is_handle (val.double_value ()); } static bool *************** *** 2138,2144 **** marker ("none"), markeredgecolor ("auto"), markerfacecolor ("none"), ! markersize (1) { } void --- 2138,2145 ---- marker ("none"), markeredgecolor ("auto"), markerfacecolor ("none"), ! markersize (1), ! keylabel ("") { } void *************** *** 2186,2191 **** --- 2187,2194 ---- set_markerfacecolor (val); else if (name.compare ("markersize")) set_markersize (val); + else if (name.compare ("keylabel")) + set_keylabel (val); else { modified = false; *************** *** 2220,2225 **** --- 2223,2229 ---- m.assign ("markeredgecolor", markeredgecolor); m.assign ("markerface", markerfacecolor); m.assign ("markersize", markersize); + m.assign ("keylabel", keylabel); return m; } *************** *** 2252,2258 **** else if (name.compare ("facecolor")) retval = facecolor; else if (name.compare ("facealpha")) ! retval = facecolor; else if (name.compare ("egdecolor")) retval = edgecolor; else if (name.compare ("linestyle")) --- 2256,2262 ---- else if (name.compare ("facecolor")) retval = facecolor; else if (name.compare ("facealpha")) ! retval = facealpha; else if (name.compare ("egdecolor")) retval = edgecolor; else if (name.compare ("linestyle")) *************** *** 2267,2272 **** --- 2271,2278 ---- retval = markerfacecolor; else if (name.compare ("markersize")) retval = markersize; + else if (name.compare ("keylabel")) + retval = keylabel; else warning ("get: invalid property `%s'", name.c_str ()); *************** *** 2284,2299 **** m["zdata"] = Matrix (); m["faces"] = Matrix (); m["vertices"] = Matrix (); ! m["facecolor"] = color_property(); m["facealpha"] = 1.0; ! m["edgecolor"] = color_property("black"); m["linestyle"] = "-"; m["linewidth"] = 0.5; m["marker"] = "none"; m["markeredgecolor"] = "auto"; m["markerfacecolor"] = "none"; m["markersize"] = 1; ! return m; } --- 2290,2305 ---- m["zdata"] = Matrix (); m["faces"] = Matrix (); m["vertices"] = Matrix (); ! m["facecolor"] = color_property (); m["facealpha"] = 1.0; ! m["edgecolor"] = color_property ("black"); m["linestyle"] = "-"; m["linewidth"] = 0.5; m["marker"] = "none"; m["markeredgecolor"] = "auto"; m["markerfacecolor"] = "none"; m["markersize"] = 1; ! m["keylabel"] = ""; return m; } *************** *** 2308,2313 **** --- 2314,2329 ---- xdata (Matrix ()), ydata (Matrix ()), zdata (Matrix ()), + cdata (Matrix ()), + facecolor (radio_values ("{flat}|none|interp")), + facealpha (1.0), + edgecolor (color_values(0, 0, 0), radio_values ("flat|none|interp")), + linestyle ("-"), + linewidth (0.5), + marker ("none"), + markeredgecolor ("auto"), + markerfacecolor ("none"), + markersize (1), keylabel ("") { } *************** *** 2332,2337 **** --- 2348,2373 ---- set_ydata (val); else if (name.compare ("zdata")) set_zdata (val); + else if (name.compare ("cdata")) + set_cdata (val); + else if (name.compare ("facecolor")) + set_facecolor (val); + else if (name.compare ("facealpha")) + set_facealpha (val); + else if (name.compare ("edgecolor")) + set_edgecolor (val); + else if (name.compare ("linestyle")) + set_linestyle (val); + else if (name.compare ("linewidth")) + set_linewidth (val); + else if (name.compare ("marker")) + set_marker (val); + else if (name.compare ("markeredgecolor")) + set_markeredgecolor (val); + else if (name.compare ("markerfacecolor")) + set_markerfacecolor (val); + else if (name.compare ("markersize")) + set_markersize (val); else if (name.compare ("keylabel")) set_keylabel (val); else *************** *** 2356,2361 **** --- 2392,2407 ---- m.assign ("xdata", xdata); m.assign ("ydata", ydata); m.assign ("zdata", zdata); + m.assign ("cdata", cdata); + m.assign ("facecolor", facecolor); + m.assign ("facealpha", facealpha); + m.assign ("edgecolor", edgecolor); + m.assign ("linestyle", linestyle); + m.assign ("linewidth", linewidth); + m.assign ("marker", marker); + m.assign ("markeredgecolor", markeredgecolor); + m.assign ("markerface", markerfacecolor); + m.assign ("markersize", markersize); m.assign ("keylabel", keylabel); return m; *************** *** 2380,2385 **** --- 2426,2451 ---- retval = ydata; else if (name.compare ("zdata")) retval = zdata; + else if (name.compare ("cdata")) + retval = cdata; + else if (name.compare ("facecolor")) + retval = facecolor; + else if (name.compare ("facealpha")) + retval = facealpha; + else if (name.compare ("edgecolor")) + retval = edgecolor; + else if (name.compare ("linestyle")) + retval = linestyle; + else if (name.compare ("linewidth")) + retval = linewidth; + else if (name.compare ("marker")) + retval = marker; + else if (name.compare ("markeredgecolor")) + retval = markeredgecolor; + else if (name.compare ("markerfacecolor")) + retval = markerfacecolor; + else if (name.compare ("markersize")) + retval = markersize; else if (name.compare ("keylabel")) retval = keylabel; else *************** *** 2396,2401 **** --- 2462,2477 ---- m["xdata"] = Matrix (); m["ydata"] = Matrix (); m["zdata"] = Matrix (); + m["cdata"] = Matrix (); + m["facecolor"] = color_property (); + m["facealpha"] = 1.0; + m["edgecolor"] = color_property ("black"); + m["linestyle"] = "-"; + m["linewidth"] = 0.5; + m["marker"] = "none"; + m["markeredgecolor"] = "auto"; + m["markerfacecolor"] = "none"; + m["markersize"] = 1; m["keylabel"] = ""; return m; diff -cNr octave-2.9.16/src/graphics.h octave-2.9.17/src/graphics.h *** octave-2.9.16/src/graphics.h Wed Oct 31 17:44:18 2007 --- octave-2.9.17/src/graphics.h Fri Nov 9 20:34:38 2007 *************** *** 2444,2449 **** --- 2444,2450 ---- octave_value markeredgecolor; octave_value markerfacecolor; octave_value markersize; + octave_value keylabel; public: *************** *** 2462,2467 **** --- 2463,2469 ---- octave_value get_markeredgecolor (void) const { return markeredgecolor; } octave_value get_markerfacecolor (void) const { return markerfacecolor; } octave_value get_markersize (void) const { return markersize; } + octave_value get_keylabel (void) const { return keylabel; } void set_cdata (const octave_value& val) { *************** *** 2612,2617 **** --- 2614,2628 ---- } } + void set_keylabel (const octave_value& val) + { + if (! error_state) + { + keylabel = val; + mark_modified (); + } + } + private: *************** *** 2706,2711 **** --- 2717,2732 ---- octave_value xdata; octave_value ydata; octave_value zdata; + octave_value cdata; + color_property facecolor; + octave_value facealpha; + color_property edgecolor; + octave_value linestyle; + octave_value linewidth; + octave_value marker; + octave_value markeredgecolor; + octave_value markerfacecolor; + octave_value markersize; octave_value keylabel; public: *************** *** 2713,2718 **** --- 2734,2749 ---- octave_value get_xdata (void) const { return xdata; } octave_value get_ydata (void) const { return ydata; } octave_value get_zdata (void) const { return zdata; } + octave_value get_cdata (void) const { return cdata; } + color_property get_facecolor (void) const { return facecolor; } + octave_value get_facealpha (void) const { return facealpha; } + color_property get_edgecolor (void) const { return edgecolor; } + octave_value get_linestyle (void) const { return linestyle; } + octave_value get_linewidth (void) const { return linewidth; } + octave_value get_marker (void) const { return marker; } + octave_value get_markeredgecolor (void) const { return markeredgecolor; } + octave_value get_markerfacecolor (void) const { return markerfacecolor; } + octave_value get_markersize (void) const { return markersize; } octave_value get_keylabel (void) const { return keylabel; } void set_xdata (const octave_value& val) *************** *** 2742,2747 **** --- 2773,2882 ---- } } + void set_cdata (const octave_value& val) + { + if (! error_state) + { + cdata = val; + mark_modified (); + } + } + + void set_facecolor (const color_property& val) + { + if (! error_state) + { + facecolor = val; + mark_modified (); + } + } + + void set_facecolor (const octave_value& val) + { + color_property tmp (facecolor); + tmp = val; + set_facecolor (tmp); + }; + + void set_facealpha (const octave_value& val) + { + if (! error_state) + { + facealpha = val; + mark_modified (); + } + } + + void set_edgecolor (const color_property& val) + { + if (! error_state) + { + edgecolor = val; + mark_modified (); + } + } + + void set_edgecolor (const octave_value& val) + { + color_property tmp (edgecolor); + tmp = val; + set_edgecolor (tmp); + }; + + void set_linestyle (const octave_value& val) + { + if (! error_state) + { + linestyle = val; + mark_modified (); + } + } + + void set_linewidth (const octave_value& val) + { + if (! error_state) + { + linewidth = val; + mark_modified (); + } + } + + void set_marker (const octave_value& val) + { + if (! error_state) + { + marker = val; + mark_modified (); + } + } + + void set_markeredgecolor (const octave_value& val) + { + if (! error_state) + { + markeredgecolor = val; + mark_modified (); + } + } + + void set_markerfacecolor (const octave_value& val) + { + if (! error_state) + { + markerfacecolor = val; + mark_modified (); + } + } + + void set_markersize (const octave_value& val) + { + if (! error_state) + { + markersize = val; + mark_modified (); + } + } + void set_keylabel (const octave_value& val) { if (! error_state) diff -cNr octave-2.9.16/src/graphics.h.in octave-2.9.17/src/graphics.h.in *** octave-2.9.16/src/graphics.h.in Tue Oct 23 20:32:44 2007 --- octave-2.9.17/src/graphics.h.in Fri Nov 9 13:01:45 2007 *************** *** 1606,1611 **** --- 1606,1612 ---- octave_value markeredgecolor octave_value markerfacecolor octave_value markersize + octave_value keylabel END_PROPERTIES static std::string go_name; *************** *** 1698,1703 **** --- 1699,1714 ---- octave_value xdata octave_value ydata octave_value zdata + octave_value cdata + color_property facecolor a + octave_value facealpha + color_property edgecolor a + octave_value linestyle + octave_value linewidth + octave_value marker + octave_value markeredgecolor + octave_value markerfacecolor + octave_value markersize octave_value keylabel END_PROPERTIES diff -cNr octave-2.9.16/src/help.cc octave-2.9.17/src/help.cc *** octave-2.9.16/src/help.cc Tue Oct 30 21:24:12 2007 --- octave-2.9.17/src/help.cc Fri Nov 2 12:13:44 2007 *************** *** 2130,2136 **** @deftypefn {Built-in Function} {@var{val} =} info_program ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val})\n\ Query or set the internal variable that specifies the name of the\n\ ! info program to run. The default initial value is\n\ @code{\"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info\"}\n\ in which @var{octave-home} is the directory where all of Octave is\n\ installed, @var{version} is the Octave version number, and @var{arch}\n\ --- 2130,2136 ---- @deftypefn {Built-in Function} {@var{val} =} info_program ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val})\n\ Query or set the internal variable that specifies the name of the\n\ ! info program to run. The default value is\n\ @code{\"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info\"}\n\ in which @var{octave-home} is the directory where all of Octave is\n\ installed, @var{version} is the Octave version number, and @var{arch}\n\ diff -cNr octave-2.9.16/src/input.cc octave-2.9.17/src/input.cc *** octave-2.9.16/src/input.cc Fri Oct 12 17:27:30 2007 --- octave-2.9.17/src/input.cc Fri Nov 2 13:24:24 2007 *************** *** 1189,1195 **** To change it, use a command like\n\ \n\ @example\n\ ! octave:13> PS1 = \"\\\\u@@\\\\H> \"\n\ @end example\n\ \n\ @noindent\n\ --- 1189,1195 ---- To change it, use a command like\n\ \n\ @example\n\ ! octave:13> PS1 (\"\\\\u@@\\\\H> \")\n\ @end example\n\ \n\ @noindent\n\ diff -cNr octave-2.9.16/src/parse.h octave-2.9.17/src/parse.h *** octave-2.9.16/src/parse.h Fri Oct 12 17:27:33 2007 --- octave-2.9.17/src/parse.h Tue Nov 6 12:02:12 2007 *************** *** 37,43 **** class tree; class tree_matrix; class tree_identifier; ! class octaev_function; class symbol_record; class symbol_table; --- 37,43 ---- class tree; class tree_matrix; class tree_identifier; ! class octave_function; class symbol_record; class symbol_table; diff -cNr octave-2.9.16/src/pr-output.cc octave-2.9.17/src/pr-output.cc *** octave-2.9.16/src/pr-output.cc Fri Oct 12 17:27:33 2007 --- octave-2.9.17/src/pr-output.cc Fri Nov 2 13:24:24 2007 *************** *** 2732,2738 **** You can convert the string back into a matrix as follows:\n\ \n\ @example\n\ ! eval(['[',rats(hilb(4)),'];'])\n\ @end example\n\ \n\ The optional second argument defines the maximum length of the string\n\ --- 2732,2739 ---- You can convert the string back into a matrix as follows:\n\ \n\ @example\n\ ! r = rats(hilb(4));\n\ ! x = str2num(r)\n\ @end example\n\ \n\ The optional second argument defines the maximum length of the string\n\ *************** *** 3127,3133 **** @group\n\ ans =\n\ \n\ - 3.1416\n\ 9.8696\n\ 97.409\n\ 9488.5\n\ --- 3128,3133 ---- *************** *** 3146,3152 **** @group\n\ ans =\n\ \n\ - 3.1416\n\ 9.8696\n\ 97.409\n\ 9488.5\n\ --- 3146,3151 ---- diff -cNr octave-2.9.16/src/pt-idx.cc octave-2.9.17/src/pt-idx.cc *** octave-2.9.16/src/pt-idx.cc Wed Oct 24 00:39:57 2007 --- octave-2.9.17/src/pt-idx.cc Mon Nov 5 18:42:01 2007 *************** *** 385,390 **** --- 385,394 ---- if (! error_state) { + bool have_new_struct_field = false; + + octave_idx_type new_struct_field_nel = 0; + // I think it is OK to have a copy here. const octave_value *tro = retval.object (); *************** *** 485,528 **** // Last indexing element. Will this result in a // comma-separated list? ! if (first_retval_object.is_map ()) { ! if (i > 0) { octave_value_list xidx = idx.back (); ! if (xidx.has_magic_colon ()) { ! std::string ttype = type.substr (0, i); octave_value_list tmp_list = first_retval_object.subsref (ttype, idx, 1); if (! error_state) ! { ! octave_value val = tmp_list(0); ! ! retval.numel (val.numel ()); ! } } ! else { ! octave_idx_type nel = 1; ! octave_idx_type nidx = xidx.length (); ! for (octave_idx_type j = 0; j < nidx; j++) { ! octave_value val = xidx(j); ! nel *= val.numel (); } - - retval.numel (nel); } } - else - retval.numel (first_retval_object.numel ()); } } --- 489,579 ---- // Last indexing element. Will this result in a // comma-separated list? ! if (have_new_struct_field) ! retval.numel (new_struct_field_nel); ! else if (i > 0) { ! std::string ttype = type.substr (0, i); ! ! char c = ttype[ttype.length()-1]; ! if (c == '(' || c == '{') { + octave_idx_type nel = 1; + octave_value_list xidx = idx.back (); ! octave_idx_type nidx = xidx.length (); ! ! for (octave_idx_type j = 0; j < nidx; j++) { ! octave_value val = xidx(j); + nel *= val.numel (); + } + + retval.numel (nel); + } + else if (first_retval_object.is_defined ()) + { + octave_value_list tmp_list + = first_retval_object.subsref (ttype, idx, 1); + + if (! error_state) + { + octave_value val = tmp_list(0); + + retval.numel (val.numel ()); + } + } + else + retval.numel (1); + } + else + { + if (first_retval_object.is_defined ()) + retval.numel (first_retval_object.numel ()); + else + retval.numel (1); + } + } + else + { + octave_value tobj = first_retval_object; + + if (! have_new_struct_field) + { + if (i > 0 && first_retval_object.is_defined ()) + { + std::string ttype = type.substr (0, i); + + char c = ttype[ttype.length()-1]; + + if (! (c == '(' || c == '{')) + { octave_value_list tmp_list = first_retval_object.subsref (ttype, idx, 1); if (! error_state) ! tobj = tmp_list(0); } ! } ! ! if (! error_state && tobj.is_map ()) ! { ! if (tidx.is_string ()) { ! Octave_map m = tobj.map_value (); ! std::string s = tidx.string_value (); ! if (! m.contains (s)) { ! have_new_struct_field = true; ! new_struct_field_nel = m.numel (); } } } } } *************** *** 552,557 **** --- 603,633 ---- return retval; } + /* + %!test + %! x = {1, 2, 3}; + %! [x{:}] = deal (4, 5, 6); + %! assert (x, {4, 5, 6}); + + %!test + %! [x.a, x.b.c] = deal (1, 2); + %! assert (x.a == 1 && x.b.c == 2); + + %!test + %! [x.a, x(2).b] = deal (1, 2); + %! assert (x(1).a == 1 && isempty (x(2).a) && isempty (x(1).b) && x(2).b == 2); + + %!test + %! x = struct (zeros (0, 1), {"a", "b"}); + %! x(2).b = 1; + %! assert (x(2).b == 1); + + %!test + %! x = struct (zeros (0, 1), {"a", "b"}); + %! x(2).b = 1; + %! assert (x(2).b == 1); + */ + void tree_index_expression::eval_error (void) const { diff -cNr octave-2.9.16/src/syscalls.cc octave-2.9.17/src/syscalls.cc *** octave-2.9.16/src/syscalls.cc Fri Oct 12 17:27:34 2007 --- octave-2.9.17/src/syscalls.cc Fri Nov 2 12:13:44 2007 *************** *** 1294,1300 **** be less than zero and @var{msg} will contain a system-dependent error\n\ message. The value of @var{status} contains additional system-dependent\n\ information about the subprocess that exited.\n\ ! @seealso{WNOHANG, WUNTRACED, WCONTINUED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ @end deftypefn") { octave_value_list retval; --- 1294,1300 ---- be less than zero and @var{msg} will contain a system-dependent error\n\ message. The value of @var{status} contains additional system-dependent\n\ information about the subprocess that exited.\n\ ! @seealso{WCONTINUED, WCOREDUMP, WEXITSTATUS, WIFCONTINUED, WIFSIGNALED, WIFSTOPPED, WNOHANG, WSTOPSIG, WTERMSIG, WUNTRACED}\n\ @end deftypefn") { octave_value_list retval; diff -cNr octave-2.9.16/src/toplev.cc octave-2.9.17/src/toplev.cc *** octave-2.9.16/src/toplev.cc Fri Oct 12 17:27:34 2007 --- octave-2.9.17/src/toplev.cc Tue Nov 6 12:18:41 2007 *************** *** 531,536 **** --- 531,542 ---- if (! error_state) { + #if defined (__WIN32__) && ! defined (__CYGWIN__) + // Work around weird double-quote handling on Windows systems. + if (type == et_sync) + cmd_str = "\"" + cmd_str + "\""; + #endif + if (type == et_async) { // FIXME -- maybe this should go in sysdep.cc? diff -cNr octave-2.9.16/src/version.h octave-2.9.17/src/version.h *** octave-2.9.16/src/version.h Wed Oct 31 17:29:24 2007 --- octave-2.9.17/src/version.h Sat Nov 10 00:18:09 2007 *************** *** 24,34 **** #if !defined (octave_version_h) #define octave_version_h 1 ! #define OCTAVE_VERSION "2.9.16" ! #define OCTAVE_API_VERSION "api-v28" ! #define OCTAVE_RELEASE_DATE "2007-10-31" #define OCTAVE_COPYRIGHT "Copyright (C) 2007 John W. Eaton and others." --- 24,34 ---- #if !defined (octave_version_h) #define octave_version_h 1 ! #define OCTAVE_VERSION "2.9.17" ! #define OCTAVE_API_VERSION "api-v29" ! #define OCTAVE_RELEASE_DATE "2007-11-10" #define OCTAVE_COPYRIGHT "Copyright (C) 2007 John W. Eaton and others." PATCH_EOF