From: Paul K. <pki...@us...> - 2005-01-18 07:30:33
|
This is not really a bug, except maybe in documentation, or lack thereof. Arguably anything which makes a package harder to use than it could be is a bug, but I have no plans to address that. You need to say 'symbols' before using the symbolic package. Putting it into your .octaverc file if you are often using the symbolic package would be useful. octave:1> symbols Then you need to define you symbolic variables: octave:2> x = sym('x') x = x And the expressions which use them: octave:3> A = Cos(x) A = cos(x) Before you can manipulate those expressions: octave:4> differentiate(A,x) ans = -sin(x) Note that if you don't like using Cos(x) you can use the dispatch mechanism to define cos(x) -> Cos(x) for symbolic x as follows: octave:5> dispatch('cos','Cos','ex') octave:6> A = cos(x) A = cos(x) octave:7> differentiate(A,x) ans = -sin(x) - Paul On Jan 13, 2005, at 10:24 PM, Dirk Eddelbuettel wrote: > On Thu, Jan 13, 2005 at 10:09:30AM -0700, Andre Lehovich wrote: >> Package: octave-forge >> Version: 2004.11.16-3 >> Severity: normal >> >> While experimenting with symbolic manipulation I was able to >> crash octave. This may be due to operator error; I don't >> know how to use octave-forge's symbolic toolbox, so I'm just >> feeding random stuff at it. Here is a transcript: >> >> |# 0 home ~; octave >> |GNU Octave, version 2.1.64 (i386-pc-linux-gnu). >> |Copyright (C) 2004 John W. Eaton. >> |This is free software; see the source code for copying conditions. >> |There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or >> |FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. >> | >> |Additional information about Octave is available at >> http://www.octave.org. >> | >> |Please contribute if you find this software useful. >> |For more information, visit http://www.octave.org/help-wanted.html >> | >> |Report bugs to <bu...@oc...> (but first, please read >> |http://www.octave.org/bugs.html to learn how to write a helpful >> report). >> | >> |octave:1> A = sym('Cos(x)') >> |A = >> | >> |Cos(x) >> |octave:2> x = sym('x') >> |x = >> | >> |x >> |octave:3> differentiate(A,x) >> |panic: Segmentation fault -- stopping myself... >> |attempting to save variables to `octave-core'... >> |error: octave_base_value::save_binary(): wrong type argument `ex' >> |save to `octave-core' complete >> |Segmentation fault > > Ok, thanks, will pass that along. > > Dirk > > >> -- System Information: >> Debian Release: 3.1 >> APT prefers testing >> APT policy: (900, 'testing') >> Architecture: i386 (i586) >> Kernel: Linux 2.4.28 >> Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) >> >> Versions of packages octave-forge depends on: >> ii atlas3-base [liblapack.s 3.6.0-19 Automatically Tuned >> Linear Algebra >> ii fftw3 3.0.1-11 Library for computing >> Fast Fourier >> ii libc6 2.3.2.ds1-20 GNU C Library: Shared >> libraries an >> ii libcln3 1.1.9-1 Class Library for >> Numbers (C++) >> ii libg2c0 1:3.3.5-5 Runtime library for GNU >> Fortran 77 >> ii libgcc1 1:3.4.3-6 GCC support library >> ii libginac1.3 1.3.0-1 The GiNaC framework >> (runtime libra >> ii libgmp3 4.1.4-5 Multiprecision >> arithmetic library >> ii libgsl0 1.5-2 The GNU Scientific >> Library (GSL) - >> ii libhdf5-serial-1.6.2-0 [ 1.6.2-3 Hierarchical Data Format >> 5 (HDF5) >> ii libice6 4.3.0.dfsg.1-10 Inter-Client Exchange >> library >> ii libjpeg62 6b-9 The Independent JPEG >> Group's JPEG >> ii libncurses5 5.4-4 Shared libraries for >> terminal hand >> ii libpng12-0 1.2.8rel-1 PNG library - runtime >> ii libqhull5 2003.1-1 Calculate convex hulls >> and related >> ii libreadline4 4.3-11 GNU readline and history >> libraries >> ii libsm6 4.3.0.dfsg.1-10 X Window System Session >> Management >> ii libstdc++5 1:3.3.5-5 The GNU Standard C++ >> Library v3 >> ii libx11-6 4.3.0.dfsg.1-10 X Window System protocol >> client li >> ii octave2.1 2.1.64-1 The GNU Octave language >> for numeri >> ii xlibs 4.3.0.dfsg.1-10 X Keyboard Extension >> (XKB) configu >> ii zlib1g 1:1.2.2-3 compression library - >> runtime >> >> -- no debconf information > > -- > Better to have an approximate answer to the right question than a > precise > answer to the wrong question. -- John Tukey as quoted by John > Chambers > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev > |