Linear optimization without explicitly specifying the linear components?
Hi,
Im wondering if there is an optimization routine where I can give it a linear function, but in a general form f(x), and just tell matlab "trust me, its linear"
The only linear solvers ive found, you have to explicitly give them a matrix A and so on. but i was hoping there was a way to do this automatically with and argument like 'linear' or something
thanks!
Posted Aug 2, 2020, 1:04 PM UTC
I'm not sure what you're asking, you want to optimize an already linear function into a linear function? If I understand correctly, you can use "polyfit", you have to specify the order of the polynomial though, so just n=1, data_x, data_y, and that's it.
Hi, I want to find parameters to a function that is linear in those parameters, without specifying how. Polyfit is not ideal because I don't want to specify what the function looks like.
For example lets say I had a function y = f(x,p), where x is some input and p the parameter i want to find.
then lets say i could use 'lsqnonlin'. The goal function would then be
F(p) = f(x,p) - y
where F(p) is not dependent on x and y since i replace those variables with data.
Now what i want is to tell matlab that f(x,p) is linear in p, in the call to lsqnonlin like:
p = lsqnonlin( F, p0, 'linear')
or something like that.
Hope this was more clear, i was on my phone earlier hence the brevity