How can I implement these equations in Matlab programming?

Hi guys, I got to analyse image that is created by Atomic Force Microscope so contains different height values. But I want to make sure I implement these equations correctly, can somebody please help. Would be much appreciated.
Best regards, Matiss

2 comentarios

Matt J
Matt J el 25 de Sept. de 2015
It's hard to help unless you show us the code you've written.
There is no code I have Written yet. I got to understand how to express these mathematical expressions in the matlab. I have 2 D matrix. MN is the area of the image, I know that. and Z are the image values. but how do I get the integrations and the whole equation.

Respuestas (1)

Thorsten
Thorsten el 25 de Sept. de 2015
Editada: Thorsten el 25 de Sept. de 2015
If you have your height values in a 2D matrix Z, use
sa = mean2(abs(Z));
sq = sqrt(mean2(Z.^2))
sz = max(Z(:)) - min(Z(:))

3 comentarios

Matiss Ozols
Matiss Ozols el 25 de Sept. de 2015
Editada: Matiss Ozols el 25 de Sept. de 2015
hmm, these equation outputs somehow doesnt match the results that have been analysed with a different software. dont I need to divide with MN (area of the image too)? also wouldnt Sa be a mean2 aswell as it is mainly same equations?
@Matiss - you need to divide by area if you want normalized numbers. You can be rest assured these results from code by @Thorsten is only off by a constant scale factor (of area of image in question with additional fixed constants) from this other software you are mentioning.
Thorsten
Thorsten el 27 de Sept. de 2015
Editada: Thorsten el 27 de Sept. de 2015
You don't have to divide by MN, this is done by the mean2 function. Can you check results with small images an find out which result is correct?

La pregunta está cerrada.

Etiquetas

Preguntada:

el 25 de Sept. de 2015

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by