Finding the optimal minimum of two vectors
Show older comments
I have two vectors (97x1) where each element is a standard deviation of a range of data from a larger vector (145x1). I want to find where the optimal solution is to minimize both standard deviations (so not the absolute minimum of each vector individually). I tried looking at some of the optimization tools but couldn't figure out how to apply them to this problem... Any help would be appreciated but please be specific since I am not an experienced programmer.
5 Comments
Alan Weiss
on 28 Mar 2017
I'm not sure that I understand you. Is the question to choose the best 97 elements out of 145 elements? I mean, you have a way to figure out a "goodness" for a given set of 97 elements, and you want MATLAB to pick the best 97 out of 145? Or is there something else that you are trying to do?
Alan Weiss
MATLAB mathematical toolbox documentation
Aaron Morrison
on 28 Mar 2017
Torsten
on 29 Mar 2017
So you try to minimize 1/2*(x1(i)+x2(i)) where x1,x2 are the two (97x1) vectors ?
Or which other "shared form of a minimum" do you have in mind ?
Best wishes
Torsten.
John D'Errico
on 29 Mar 2017
Edited: John D'Errico
on 29 Mar 2017
This is not making any sense at all. Sorry, but still it is not. Almost always when that happens, it is because the person is trying to solve a problem they have not thought out themselves, or do not themselves understand. So it is not your fault, but a question of communication. And if we cannot understand what you are asking, then we cannot show how to write code for something that is not clearly understood.
A good way to resolve the problem is to give an example. Start with two SMALL vectors. Random numbers may be sufficient.
u = rand(1,5)
v = rand(1,6)
u =
0.6004 0.56389 0.55587 0.58886 0.44195
v =
0.13 0.44605 0.3695 0.35616 0.86208 0.6484
Now, what would you have us compute on those two vectors? Give an example! Without that, it becomes impossible to guess your intentions.
Aaron Morrison
on 30 Mar 2017
Accepted Answer
More Answers (0)
Categories
Find more on Optimization Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!