Saturday 23 February 2019

Symbolic Math using Octave and Matlab

For Octave 4.4.1

  1. download the symbolic-win-py-bundle-2.7.1.zip file at our github releases page.
  2. start Octave, change folder to where your downloads are.
  3. type pkg install symbolic-win-py-bundle-2.7.1.zip
  4. type pkg load symbolic
  5. type syms x

https://github.com/cbm755/octsympy/wiki/Notes-on-Windows-installation

Get the list of functions from here:
https://octave.sourceforge.io/list_functions.php?sort=alphabetic

Octave has the vector package i.e. 1 dimensional matrix and its cross product.

However it does not have units and physical constants, unike Maxima.

Maxima 5.42.2 does not have a workable image load function. Its only load_xpm() is broken.
  • cross  octave
  • Compute the vector cross product of two 3-dimensional vectors X and Y.
Symbolic cross product.

a = [sym('a1'); sym('a2'); sym('a3')];
b = [sym('b1'); sym('b2'); sym('b3')];
cross(a, b)
  • solve (sym)  symbolic
    Symbolic solutions of equations, inequalities and systems.

    syms x
    solve(x == 2*x + 6, x)
      ⇒ ans = (sym) -6
    solve(x^2 + 6 == 5*x, x)
      
    vpasolve  symbolic
    Numerical solution of a symbolic equation. 
    dsolve (sym)  symbolic
    Solve ordinary differential equations (ODEs) symbolically.

    syms y(x)
    DE = diff(y, x) - 4*y == 0
      ⇒ DE = (sym)
                    d
          -4⋅y(x) + ──(y(x)) = 0
                    dx
    
    sol = dsolve (DE)
      ⇒ sol = (sym)
                     4⋅x
          y(x) = C₁⋅ℯ
     

     

No comments: