- #1

Supershandy

- 1

- 0

- TL;DR Summary
- Not entirely sure if the equations I put in are working, Although I won't know what the answer is until I put in the data, I could do with a few pointers and help to determine if the answer I'm getting is correct

Hello everyone.

I'm trying to do a Kubelka Munk equation for paint samples and would like to do the calculation in Excel first before moving it over to a programming language outside of MATLAB. I have Spectroscopic scans of the samples and put them into a database where the K/S values have been determined. But this is where I get stuck.

Taking ideas from the following link and paper - Spectrophotometric color formulation based on two-constant Kubelka-Munk theory

Starting from page 24 of the document, I have the KSCOEFS array completed and populated with 33 mixtures that have their paint concentrations and K/S values. From this I need to find a solution vector KANDS by multiplying the KSCOEFS with itself and then creating the inverse which is then multiplied by the KSCOEF and then the OBS vector. I use the following formula in excel in a 10 x 1 matrix

={MINVERSE(MMULT(TRANSPOSE([KSCOEFS]),KSCOEFS))*TRANSPOSE([KSCOEFS])*[OBS]}

Now, because the OBS vector is populated with zeros (with a constraining 1 at the end), the only answer that is provided in the whole KANDS solution vector is 0, which I'm not sure is correct or not which also means that I'm unsure if the equation works. I then populated the OBS vector with some readom values and it started spitting out numbers.

The paper is a little vague on what should be in the OBS vector and with no working example it's hard to tell if I'm actually doing it correctly?

I've attached an example excel file that has one part of the KSCOEF array for the wavelength at 400nm as well as the OBS and solution Vector. I'm not looking for an answer, but more a general idea if I'm actually doing it correctly or not as it has been a very long time since I've done Matrix Multiplications.

I'm trying to do a Kubelka Munk equation for paint samples and would like to do the calculation in Excel first before moving it over to a programming language outside of MATLAB. I have Spectroscopic scans of the samples and put them into a database where the K/S values have been determined. But this is where I get stuck.

Taking ideas from the following link and paper - Spectrophotometric color formulation based on two-constant Kubelka-Munk theory

Starting from page 24 of the document, I have the KSCOEFS array completed and populated with 33 mixtures that have their paint concentrations and K/S values. From this I need to find a solution vector KANDS by multiplying the KSCOEFS with itself and then creating the inverse which is then multiplied by the KSCOEF and then the OBS vector. I use the following formula in excel in a 10 x 1 matrix

={MINVERSE(MMULT(TRANSPOSE([KSCOEFS]),KSCOEFS))*TRANSPOSE([KSCOEFS])*[OBS]}

Now, because the OBS vector is populated with zeros (with a constraining 1 at the end), the only answer that is provided in the whole KANDS solution vector is 0, which I'm not sure is correct or not which also means that I'm unsure if the equation works. I then populated the OBS vector with some readom values and it started spitting out numbers.

The paper is a little vague on what should be in the OBS vector and with no working example it's hard to tell if I'm actually doing it correctly?

I've attached an example excel file that has one part of the KSCOEF array for the wavelength at 400nm as well as the OBS and solution Vector. I'm not looking for an answer, but more a general idea if I'm actually doing it correctly or not as it has been a very long time since I've done Matrix Multiplications.