Borrar filtros
Borrar filtros

Comparing multiple curves to an optimal curve

3 visualizaciones (últimos 30 días)
Ben
Ben el 31 de En. de 2013
I am collecting twice a total of 240 Trials of 4 secs each. Subjects are required to apply a certain amount of force (depending on the day's max force) at the time point 3secs with their thumb. This results in a 240 different curves per day. I manage to compute the graphs for the 240 trials. My Question now is: How can I fit an additional curve to the 240 curves which depicts the perfect curve, usinf on only a handfull of data-points based on the day's max force(the program I am using currently collects 4000 data points during the 4 secs, which is way to much to write down by hand)? Furthermore how do I calculate the average difference between each trial and the optimal curve? So far I am only using plot() to generate the graphs.
Thank you very much

Respuestas (1)

Shashank Prasanna
Shashank Prasanna el 31 de En. de 2013
Depends on how you define your "perfect curve" there should be some criterion. Do you want to average it? If you want to fit the average curve, then depending on the curve choose an equation or model that best describes your curve and fit it using curve fitting or optimization.
Once you have your "optimal curve" you can always find a sum or squares error or MSE
  7 comentarios
Shashank Prasanna
Shashank Prasanna el 8 de Feb. de 2013
Are you sure? that data looks nothing like the curve in your picture.
In anycase you can fit the curve using curve fitting toolbox, and the way to check is to try the following command in MATLAB.
>> cftool
It is intuitive enough that you can get to work immediately. If you don't then you will have to set up an optimization problem to do the same. You can start here:
Ben
Ben el 14 de Feb. de 2013
I realised that I typed the data in completely wrong.
I added the following plot to the curves x= [0; 1000;2000;3000;3500;4000;4500;5000;6000;7000;8000] y=[0;0;0;0;0.625;1.25;0.625;0;0;0;0] plot(x,y, 'k', 'linewidth',3)
I would like it to look a bit more curve shaped without adding much more data points, as for each subjects I would have to type it in by hand. I would then like to calculate the difference between the black line and all the other curves.

Iniciar sesión para comentar.

Categorías

Más información sobre Nonlinear Optimization en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by