Fitting a Transcendental Equation with Multiple Solutions

Hey all,
I would like to know if there is a way to fit a transcendental equation with multiple solutions. For example, if I had an equation y = f(x,y) that had multiple solutions and thus multiple outputs y for any given input x, is it possible to fit it to a data set that say, takes the form of a matrix, where each column of the matrix represents the set of outputs y, at a specific value of x.
Hopefully my question makes sense!
Thanks.

4 Comments

What do you want to fit if your model equation reads
y - f(x,y) = 0
?
Sorry, let me see if I can be a little more explicit. Suppose I had an equation f(x,y,a1,a2,a3) = c for some constant c and some parameters a1,a2, and a3 that I want to determine by fitting to a data set. Now suppose then that for each value of x, there were multiple values of y that satisfied satisfied the equation. Similarly, the data I want to fit the parameters to is a plot where each value of x has multiple values of y. Is there a way I can determine a1,a2, and a3 such that when I plot the solutions (x,y) to the equation f(x,y,a1,a2,a3) = c, the plot will match that produced by the data set?
Do I understand correctly that you have a set of x values, and a matrix M of y values with the same number of columns as numel(x), such that M(:,K) is the complete set of y values that are possible for X(K) ? If so are the values in sorted order, or do they "follow" the branches?
Imagine two sine waves of different phases: at some point they cross. Would it be like
.48 .5 .52
.53 .51 .49
where the rows follow the path from the previous row, or would it be like
.48 .5 .49
.53 .51 .52
where the columns are in sorted order?
The difference would be in the code to figure out which branch to interpolate against.
Hi, the answer to your first question ("Do I understand correctly that you have a set of x values, and a matrix M of y values with the same number of columns as numel(x), such that M(:,K) is the complete set of y values that are possible for X(K) ?") is yes.
For your second question, the answer is that they follow the branches. So the columns would be as in your first example.

Sign in to comment.

 Accepted Answer

You can try "lsqnonlin" with the functions F_ij defined as
F_ij = f(a1,a2,a3,x_i,y_ji) - c
Here, the y_ji are the y-values corresponding to x_i that should satisfy
f(a1,a2,a3,x_i,y_ji) - c = 0

More Answers (0)

Categories

Asked:

bil
on 15 Mar 2023

Moved:

on 16 Mar 2023

Community Treasure Hunt

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

Start Hunting!