How to represent a basis of vectors in Matlab?

818 views Asked by At

I'm creating a function which given two basis for a vector space, it returns the change of basis matrix from one basis to the other. The problem is that I don't know how to represent a basis. A basis is basically a set (where duplicates are not possible) of vectors.

How can I represent a basis in Matlab? Which data structure should I use? You can give more than one possibility, but of course efficient matters, even though it's a secondary problem for now.

Should I simply use a normal matrix, where for example the columns would represent the vectors of the basis? Is there a better solution?

1

There are 1 answers

0
Daniel On

A matrix is the best choice, it is easy to use and very efficient. This is also what the built-in function orth chose to return a basis.