Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Coding up a simple geometric algebra in MATLAB

  1. Oct 12, 2015 #1

    hunt_mat

    User Avatar
    Homework Helper

    Hi,

    I have been wanting to do this for a while but not too sure how to go about it. I have the following geometric algebra
    [itex]\lbrace\mathbf{e}_{i}\rbrace_{i=0}^{3}[/itex] which satisfy the following relations: [tex]\mathbf{e}_{i}\mathbf{e}_{j}=-\mathbf{e}_{j}\mathbf{e}_{i}[/tex] and [tex]\mathbf{e}_{1}^{2}=\mathbf{e}_{2}^{2}=\mathbf{e}_{3}^{3}=1\quad \mathbf{e}_{0}^{2}=\frac{1}{\varepsilon}[/tex]

    There are 16 elements in this geometric algebra. I thought about doing it as one long vector but didn't know if there was a better way of doing it. I also am not quite sure about dealing with the [itex]\varepsilon[/itex], any suggestions?

    Mat
     
  2. jcsd
  3. Oct 12, 2015 #2

    kreil

    User Avatar
    Gold Member

  4. Oct 13, 2015 #3

    hunt_mat

    User Avatar
    Homework Helper

    I am aware of GABLE but it's not the geometric algebra which I am interested in.
     
  5. Oct 22, 2015 #4

    kreil

    User Avatar
    Gold Member

    I wasn't really suggesting you use GABLE, but that you use the same type of object oriented approach that was used to create GABLE.

    You can write a class that creates objects of the geometric algebra with all of the properties you listed.

    Here is another example that implements a Clifford Alebra using an object oriented approach:

    http://www.mathworks.com/matlabcentral/fileexchange/34286-clifford-algebra
     
  6. Jan 28, 2016 #5

    hunt_mat

    User Avatar
    Homework Helper

    Anyone else care to comment?
     
  7. Feb 3, 2016 #6
    I think Kriel's approach is the right one. You could represent multivectors as ordinary 1-D arrays, and then write functions to work with them, but an object oriented approach seems like the most user-friendly way to go about it.
     
  8. Feb 3, 2016 #7

    hunt_mat

    User Avatar
    Homework Helper

    The trick comes in with how to represent epsilon in te code which I have no idea what to do with it.

    I've not done much OO, and NONE with matlab.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Coding up a simple geometric algebra in MATLAB
  1. Matlab code (Replies: 0)

  2. MATLAB simple code (Replies: 4)

  3. Matlab Code (Replies: 2)

  4. Simple MATLAB loop (Replies: 3)

Loading...