Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to be able to calculate a covariance matrix for some data underlying a morphological component. Provided this data, I can write something like:

nlm = NonlinearModelFit[data, a*3^(b*r), {a, b}, r]

To retrieve a covariance matrix given some model and a dataset. Is there some way for me to ask ComponentMeasurements to do this for me for each morphological component in some set m? What about the fitting parameters for the model?

Of course, one can go ahead and grab the intensity values for the pixels by passing "IntensityData" to ComponentMeasurements, but I'd really like to know how pass a function to ComponentMeasurements to have it do the model fitting and return the covariance matrix or fitted parameters automatically in it's typical output format. Surely there's a neat way of doing this?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.