1

I have a function that can be written as following:

[y1, y2] = function(x1,x2,a,b)

And I have some experimental data, is there any function in MATLAB that can help me in the fitting procedure? The function is non-linear and it is defined in an external file (matlab function). I have some experimental data that, given x1 and x2, provides the outputs y1 and y2. I only have to determine the parameters "a" and "b".

I've tried using the curve fitting app, but it works only for single-output function. Same holds for the "fit" MATLAB function.

Yuri
  • 11
  • 2
  • It seems that you could solve your issue with a **Neural Network**. Can you have access to the Deep Learning toolbox ? – alpereira7 Oct 25 '18 at 07:51
  • Well, there is no reason why a (non-linear) least square method should not work on data 2D -> 2D. If you formulate it that way, any minimization algorithm would basically do. – mikuszefski Oct 25 '18 at 09:37
  • Yes, I can use the Neural Network toolbox... Maybe, that can be a possibility I ignored so far. For what it concerns the second comment: I know this can be done by hand, my question was about a possible MATLAB function that does it automatically without creating my own numerical procedure. The fitting toolbox does not provide this feature. Thanks Y – Yuri Oct 25 '18 at 10:16
  • For what it's worth, an according residual function is likely to be a two-liner. `fminsearch` does the rest. – mikuszefski Oct 25 '18 at 12:01
  • ...and BTW... that's what 'LSQNONLIN' requires anyway. – mikuszefski Oct 25 '18 at 12:26

0 Answers0