MATLAB Answers


Fit data using a function

Asked by Sanchit Sharma on 1 Jul 2019
Latest activity Commented on by the cyclist
on 1 Jul 2019
I am an absolute beginner in MATLAB. I want to fit my attached data as per this equation.
In attached data------ Y axis = data.mat
X axis = ED.mat
Many thanks!


Sign in to comment.

1 Answer

the cyclist
Answer by the cyclist
on 1 Jul 2019
Edited by the cyclist
on 1 Jul 2019
 Accepted Answer

The equation you have written there has no parameters. It has only constants and the data.
But if each of those constants (e.g. 0.06769) is actually a parameter that you are hoping to find via fitting, then I suggest using the fitnlm function from the Statistics and Machine Learning Toolbox.


Yes those are actually my parameters. I already know my parameters from literature. I am just trying to do Gaussian Energy Broadning. Can you please let me know how to do that?
the cyclist
on 1 Jul 2019
Sorry, I've never heard of that technique, and a quick google search did not turn up much for me.
Next time you ask a question, you might want to put more detail like that into it. It saves everyone's time.

Sign in to comment.