Clear Filters
Clear Filters

Finding Coefficients to Construct a Vector Using Defined Basis

17 views (last 30 days)
I am working on a project in MATLAB where I have a set of basis vectors, and am attempting to reconstruct a vector outside the test set used to generate the basis vectors (i.e. I'm trying to find the individual unique coefficients corresponding to the basis vectors for one vector, if that makes sense). Each vector has too many components and there are too many basis vectors to make this process feasible by hand. I know there is a way to find these coefficients using linear algebra, and perhaps generate them using a function in MATLAB, but I am a novice in both linear algebra and MATLAB and need help. Please let me know if my explanation was not clear, or if you have any guidance to solve my problem. Thanks in advance!

Accepted Answer

Matt J
Matt J on 6 Jul 2022
Edited: Matt J on 6 Jul 2022
Make the basis vectors the columns of a matrix A and then use mldivide,
Here b is the column vector you are trying to reconstruct coefficients from.
Torsten on 10 Jul 2022
I know there's a distinct difference between the reconstructed image and the original
If you divide by 0, there will be a distinct difference indicated between the reconstructed image and the original, although in reality, there might not be such a difference.
nms09 on 11 Jul 2022
Torsten - I used subtraction as well and it yielded a similar distinct pattern to the image.
Matt - A similar example visually would be an image of a pond with overlapping ripples, whether the data set from which the basis is constructed is a set of many similar images of pond ripples. The external image is also an image of the same lake, same frame/shot, with ripples. When the image is reconstructed and compared to the original and divided or subtracted, the resulting difference image has distinct circular patterns that the original image had that the reconstructed image didn't catch. In this context every relevant image can be assumed to have been taken from the exact same frozen spot and the density of the ripples is the same from image to image where to the naked eye the images seen nearly identical (but each image differs from the next slighly). Also, the images are in black and white. Hopefully this example makes sense.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!