How do you correlate 2 unique inputs to the 3 outputs given?

3 views (last 30 days)
If I have a system with 2 influencing inputs (e.g. i1 & i2) and a combination of these two inputs will provide 3 outputs (e.g. o1, o2 & o3).
i.e. f(i1, i2) = [o1, o2, o3]
How can you extract the correct 2 input values that correspond with the 3 output values given?
Thanks
  2 Comments
Ethan Gardner
Ethan Gardner on 11 Sep 2017
Yes, for example, if I provide this table of how the three output values vary with the input values, is it possible to extract the input values being given just the three outputs?
Is there an analytical approach to see how each o varies with i1 and i2 or is the best method some form of lookup table?
Many thanks.

Sign in to comment.

Answers (1)

OCDER
OCDER on 9 Sep 2017
Edited: OCDER on 9 Sep 2017
Use fminsearch to determine [i1, i2] that satisfies [o1, o2, o3] within a tolerance range.
Let's say a function (func) takes 2 inputs and returns 3 outputs.
function Out = func(In)
Out(1, 1) = In(1);
Out(2, 1) = In(1) + In(2);
Out(3, 1) = In(2);
Make an objective function (objfunc) that takes an input vector and returns a smaller scalar value the closer you are to the desired output (DesiredOut). Provide an initial guess for the inputs (InitGuess).
objFunc = @(I)max(abs(func(I) - DesiredOut));
Desired0ut = [1; 3; 2];
InitGuess = [1; 1];
Find the best inputs that minimizes objfunc.
BestI = fminsearch(objfunc, InitGuess)
BestI =
1
2

Products

Community Treasure Hunt

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

Start Hunting!