GithubHelp home page GithubHelp logo

linear_algebra_jp's Introduction

This was my attempt at an interactive linear algebra program. What resulted was
basically an extremely small subset of MATLAB.

The program can do some basic matrix operations (multiplication, addition and
subtraction) and can even do those operations on single numbers (although they
are stored internally as 1x1 matrices). The main purpose of the program was
originally to test two common linear algebra algorithms. LU decompostion and QR
(and it's more numerically stable cousin Modified Grahm Schmidt) decompostion.

From a programming side this is somewhat interesting in that I implemented
variables so you can do things like A = 1 and then A * 2, etc. I also
implemented something that is more or less a parse tree so it can handle
arbitrary legal expressions up to a certain length. Less interesting is that
the syntax relies on spaces between every token. Also rather annoying is that
odd matrix syntax I devised (probably on the fly) as I was writing this. The
begginning and end of a matrix isn't specified (although it may be wrapped in
paranthesis) and pipes ("|") are used to delimit rows.

An example would be A = 1 1 | 1 1 This produces a 2x2 matrix of all ones.

Lastly, in order to test the output of the algorithms I implemented reading
matrices from files and writing matrices to files in a simple format that
MATLAB supports.

Write takes a file name and writes a variable currently in memory into it. 

write file_name var 

Read takes a file name and read its contents into a variable which may be new. 

read file_name var

Below is a link to the source code. Feel free to take a look or compile and try
it out, a makefile is included. This code is released under the BSD license.

linear_algebra_jp's People

Contributors

jeffreypicard avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.