How to align gaussian fits at their maximum peaks?
Mostrar comentarios más antiguos
Hello, currently I have 5 sets of data saved as .csv files. Each set of data has its maximum y value corresponding to the same x value. I have loaded them into Matlab, and plotted them onto a Matlab Figure. My final goal is to have all of the peaks aligned at their maximum values. In other words, I want the maximum y value for each data peak to correspond to an x value of zero (it doesn't actually matter which x-value, this is just an example). I have attached a screenshot of my graph as it is now. Currently, the maximum y values are lined up, however this does not automatically correspond to the Gaussian fits themselves lining up. Any help with this would be greatly appreciated!
Also, if I have a gaussian fit defined as fsig, is there a way to extract its maximum value? Currently I am using the code a = max(fisg). However, I get this error message: Invalid data type. First argument must be numeric or logical. I am assuming that somehow I need to change the fsig fit to an set of integers and then call on the max. Is there a way to do this and to get rid of this error message?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with Curve Fitting Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!