Rank: 129 based on 369 downloads (last 30 days) and 27 files submitted
photo

Miroslav Balda

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Miroslav View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
23 Apr 2013 Screenshot LMFnlsq2 Solution of one or more nonlinear equations in the least squares sense. Author: Miroslav Balda nonlinear least squar..., curve fitting, identification, optimization, measurement 30 5
  • 5.0
5.0 | 1 rating
16 Jul 2012 Screenshot GETK Wait for and identify a pressed key Author: Miroslav Balda waiting, keyboard, keys, control design, measurement, optimization 4 0
25 Feb 2012 Soft interrupting of long computer runs Long run of the program can be interrupted without any loss of data in a workspace. Author: Miroslav Balda run interrupt, cycle interrupt, demo, optimization, simulation, gui 3 0
25 Feb 2012 Screenshot LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda fig and separator, optimization, marquardt, levenberg, least squares, fletcher 84 37
  • 4.57143
4.6 | 27 ratings
30 Dec 2011 deal2 - Multiple assignment The function deal2 is an extension of the function deal. Author: Miroslav Balda multiple assignment 1 0
Comments and Ratings by Miroslav View all
Updated File Comments Rating
09 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

@Jose
Yes, your residuals are in order, but the brackets. However, we apply penalty functions in case, when we want to constrain a solution. Your proposal does not influence the solution at all, because all iterations remain in the square of the side = 4. You may try what happens, if you introduce bounds +-0.5 or +-0.25. Try it. Or look at the example from LMFnlsqtest file, where is more complex (circular) area, where the solution should be.

Weights are active only for current iteration outside bounds. It means, that it is not necessary to try to find "optimal" weights, because no optimal weight exists. The solution should be insensitive to the weight value. Therefore, only residuals corresponding penalty functions have to generate bigger residuals than other equations to keep iterations within bounds, where they are zero.. It may be very fast to guess that w=(10 up to 1000) could be appropriate. The final solution may not depend on the right value of the weight.

04 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

@Jose 3.4.2013
No, it can not operate due to three reasons:
1. Formally, the chosen interval does not reduce the domain of feasible solution, that is within the interval. However, the most important reasons are:
2. your condition
(x(2)>2)*(x(2)<-2)*x(2)*w2 is a combination of two conditions. Thus you have to set up two residuals:
(x(2)>2)*(x(2)-2)*w2;
(x(2)<-2)*(x(2)+2)*w2;
Both residuals are zero for false condition, however they are linearly dependent on the distance from the limit value due to the second term (before the weight w2).
3. your proposed condition is identically equal zero, because the product of two logical terms equals zero for any x.

The weight w2 should be chosen carefully in such a way that it gives the solution just on the limit in case when the minimum lays outside the interval. It should be not to small and simultaneously not too large.

02 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

@Kat
I am preparing the function npeaks.m that decomposes a function into a sum of Gaussian functions with the use of LMFnlsq function. It will occur in a short time.

@Jose
Bounds can be introduced by additional residuals in the form of penalty functions.
The residual (x(4)<0)*x(4)*w4
will keep x(4) nonnegative, if the user-defined weight w4 be suitable positive real value. It should be found experimentally.

26 Mar 2013 LMFsolve.m: Levenberg-Marquardt-Fletcher algorithm for nonlinear least squares problems LMFsolve.m finds least-squares solution of an overdetermined system of nonlinear equations Author: Miroslav Balda

@Tomas
Sorry for late reply. I recommend you to use the function LMFnlsq or LMFnlsq2, that are also in File Exchange. The advantage is that both functions are maintained, while LMFsolve not. Both functions are also more stable and use almost equal data files. As far as any constraines is concerned, they may be solved by introduction of additional "penalty" residual for k-th unknown, say

(x(k)>30)*(x(k)-30)*w,

where w is a suitable weight, the value of which is found by experiment. If you have more troubles, you may send me your data and i'll try to solve it.

01 Mar 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

@Surpan
Your problem is solvable after introducing new variable d=a+b and constraints on the variables to be real. If you send me your data, I'll try to solve it.

Comments and Ratings on Miroslav's Files View all
Updated File Comment by Comments Rating
27 Jun 2013 Quick search for local extremes New fast and reliable function for finding local extremes in a real vector. Author: Miroslav Balda Shirah

Hello, good piece of work. By the way, does anybody know how to replicate those identified extrema onto a grayscale image.

Thank You

09 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Balda, Miroslav

@Jose
Yes, your residuals are in order, but the brackets. However, we apply penalty functions in case, when we want to constrain a solution. Your proposal does not influence the solution at all, because all iterations remain in the square of the side = 4. You may try what happens, if you introduce bounds +-0.5 or +-0.25. Try it. Or look at the example from LMFnlsqtest file, where is more complex (circular) area, where the solution should be.

Weights are active only for current iteration outside bounds. It means, that it is not necessary to try to find "optimal" weights, because no optimal weight exists. The solution should be insensitive to the weight value. Therefore, only residuals corresponding penalty functions have to generate bigger residuals than other equations to keep iterations within bounds, where they are zero.. It may be very fast to guess that w=(10 up to 1000) could be appropriate. The final solution may not depend on the right value of the weight.

07 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Jose

Dear Prof. Balda,
Thank you so much, I understand it better now!
For the bounded Rosenbrock problem:
-2 <= x[1] <= 2
-2 <= x[2] <= 2
We need 4 penalty functions:
(x[1]>2)*(x[1]-2)*w2,
(x[1]<-2)*(x[1]+2)*w2,
(x[2]>2)*(x[2]-2)*w2,
(x[2]<-2)*(x[2]+2)*w2
And we try several values for w2, for example 0.1, 0.2, 0.4, ..., 1.9 to get the "best" value for w2.
Is this correct?

04 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Balda, Miroslav

@Jose 3.4.2013
No, it can not operate due to three reasons:
1. Formally, the chosen interval does not reduce the domain of feasible solution, that is within the interval. However, the most important reasons are:
2. your condition
(x(2)>2)*(x(2)<-2)*x(2)*w2 is a combination of two conditions. Thus you have to set up two residuals:
(x(2)>2)*(x(2)-2)*w2;
(x(2)<-2)*(x(2)+2)*w2;
Both residuals are zero for false condition, however they are linearly dependent on the distance from the limit value due to the second term (before the weight w2).
3. your proposed condition is identically equal zero, because the product of two logical terms equals zero for any x.

The weight w2 should be chosen carefully in such a way that it gives the solution just on the limit in case when the minimum lays outside the interval. It should be not to small and simultaneously not too large.

03 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Jose

Dear Prof. Balda,
Thank you for your reply.
So, for the Rosenbrock problem with bounds:
-2 <= x <= 2
The penalty function is:
(x(2) > 2)*(x(2) < -2)*x(2)*w2
What is the best way to find experimentally w2?

Top Tags Applied by Miroslav
optimization, utilities, files, path, directories
Files Tagged by Miroslav View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
23 Apr 2013 Screenshot LMFnlsq2 Solution of one or more nonlinear equations in the least squares sense. Author: Miroslav Balda nonlinear least squar..., curve fitting, identification, optimization, measurement 30 5
  • 5.0
5.0 | 1 rating
16 Jul 2012 Screenshot GETK Wait for and identify a pressed key Author: Miroslav Balda waiting, keyboard, keys, control design, measurement, optimization 4 0
25 Feb 2012 Soft interrupting of long computer runs Long run of the program can be interrupted without any loss of data in a workspace. Author: Miroslav Balda run interrupt, cycle interrupt, demo, optimization, simulation, gui 3 0
25 Feb 2012 Screenshot LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda fig and separator, optimization, marquardt, levenberg, least squares, fletcher 84 37
  • 4.57143
4.6 | 27 ratings
30 Dec 2011 deal2 - Multiple assignment The function deal2 is an extension of the function deal. Author: Miroslav Balda multiple assignment 1 0

Contact us