Rank: 158 based on 526 downloads (last 30 days) and 28 files submitted
photo

Miroslav Balda

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Miroslav Balda View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
26 Sep 2014 Screenshot SINIDE - Parameter identification of a sine-wave from a measured signal Frequency, amplitude, phase shift and mean value of the best sinus fit to a sampled signal. Author: Miroslav Balda signal processing, parameter identificat..., harmonic process 29 6
  • 1.0
1.0 | 1 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 36 18
  • 5.0
5.0 | 6 ratings
16 Jul 2012 Screenshot GETK Wait for and identify a pressed key Author: Miroslav Balda waiting, keyboard, keys, control design, measurement, optimization 9 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 14 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 optimization, levenberg, marquardt, fletcher, least squares, fig and separator 107 45
  • 4.6
4.6 | 32 ratings
Comments and Ratings by Miroslav Balda View all
Updated File Comments Rating
28 Nov 2014 LMFnlsq2 Solution of one or more nonlinear equations in the least squares sense. Author: Miroslav Balda

@Li
You may solve your problem as 3 independent examples, because there is no coupling among the equations. In that case, you build a body of your function FUN for residuals in the form
global x
res = fi(x,c) - yi;
where yi is the value of required fi.

Of course, you may to solve your problem also in one go, if you prepare the body of function FUN in the following way:
global x
res = [f1(x,c(1:2)) - y1
f2(x,c(3:4)) - y2
f3(x,c(5:6)) - y3];
This approach seems to be better, because you do not need to prepare 3 functions FUN.

If you have any issue with you problem, don't hesitate to contact me again or send me just data of your problem.

11 Nov 2014 SINIDE - Parameter identification of a sine-wave from a measured signal Frequency, amplitude, phase shift and mean value of the best sinus fit to a sampled signal. Author: Miroslav Balda

@Don
I thank you for your interest in my function sinide.m. However, as long as I might help you, the message that it works wrong is too vague to find the reason for the error message knowing nothihg about your task. Please, could you send me your code and data with desciption what it should do? After that, I may analyze your issue. and help you.

26 Sep 2014 SINIDE - Parameter identification of a sine-wave from a measured signal Frequency, amplitude, phase shift and mean value of the best sinus fit to a sampled signal. Author: Miroslav Balda

@Matthew
I am sorry that you recommend me to withdraw the contribution. I'll not obey you, because the function is very useful for those, who need it. If you don't like it, don't use it.

18 Aug 2014 Frequency, amplitude, phase and mean value of sine wave The function sinfapm evaluates parameters of sampled sine wave Author: Miroslav Balda

The function sinfapm is not maintained any more. Use the function sinide instead, which is much more stable. See

sinide: www.mathworks.com/matlabcentral/fileexchange/45567

15 Jul 2014 LMFnlsq2 Solution of one or more nonlinear equations in the least squares sense. Author: Miroslav Balda

@Liu
The answer is trivial:
Let you have one set of 12 values of lefthand side, say in the column vector hmnp. Make a function for evaluation of differences (residuals) between righthand sides and lefthand sides, say resid.m in the form

function r = resid(x)
r = [x(1)+x(2)*p+ ... +(x(11)+x(12)*p)*n] - hmnp;

Here x(1) up to x(6) correspond C1 to C6 and x(7) up to x(12) correspon D1 up to D6. The simplest call of the function to solve the problem could be

[x,ssq,cnt] = LMFnlsq2('resid',x0);

A better way would be

[x,ssq,cnt] = LMFnlsq2('resid',x0,'Display',-50);

Of course that you have to supply a good estimate of the solution - coefficients C1, ..., D6. It is very important that you are able to do it, say from a nature of your experiment. The elements of x0 must not be zeros!

Since THe solution of your task has as many unknowns as equations, there is no
any degree of freedom. In consequence of it the solution should yield ssq->0.

I wish you good luck.

Mira

Comments and Ratings on Miroslav Balda's Files View all
Updated File Comment by Comments Rating
26 Dec 2014 LMFnlsq2 Solution of one or more nonlinear equations in the least squares sense. Author: Miroslav Balda Hugo Luis Manterola

Hello! I've a question regarding a problem I'm working on. I have two images X1 and X2 of size nxn, and a transformation matrix T with size nxn as well, where every component of T is a 2x2 matrix that "transform" every pixel of X1.
In my problem, I know that every matrix of T is very close to be the identity (difference of around ~e+-7). I want to use this method to, given X1 and X2, find out which is the transformation T that converted X1 in X2. I'm using T as a nxn matrix of 2x2 identities.
I'm not managing to get more than one iteration, because the method results in the identity as the better result even though I know that it isn't. I'll apreciate some advise in this regard. Thank you!

28 Nov 2014 LMFnlsq2 Solution of one or more nonlinear equations in the least squares sense. Author: Miroslav Balda Miroslav Balda

@Li
You may solve your problem as 3 independent examples, because there is no coupling among the equations. In that case, you build a body of your function FUN for residuals in the form
global x
res = fi(x,c) - yi;
where yi is the value of required fi.

Of course, you may to solve your problem also in one go, if you prepare the body of function FUN in the following way:
global x
res = [f1(x,c(1:2)) - y1
f2(x,c(3:4)) - y2
f3(x,c(5:6)) - y3];
This approach seems to be better, because you do not need to prepare 3 functions FUN.

If you have any issue with you problem, don't hesitate to contact me again or send me just data of your problem.

28 Nov 2014 LMFnlsq2 Solution of one or more nonlinear equations in the least squares sense. Author: Miroslav Balda Li

Dear Pro. Balda,
Does this file work with curve-fitting problems with several objective functions?
For example,
We obtain a set of experimental data: x(may be a vector),f1, f2, f3(f1, f2, f3 are scalars). We want to fit the following three euqations:
f1(x,c1,c2);f2(x,c3,c4);f3(x,c5,c6);
How should I implement the algorithm with LMFnlsq2?
Many thanks!

11 Nov 2014 SINIDE - Parameter identification of a sine-wave from a measured signal Frequency, amplitude, phase shift and mean value of the best sinus fit to a sampled signal. Author: Miroslav Balda Miroslav Balda

@Don
I thank you for your interest in my function sinide.m. However, as long as I might help you, the message that it works wrong is too vague to find the reason for the error message knowing nothihg about your task. Please, could you send me your code and data with desciption what it should do? After that, I may analyze your issue. and help you.

10 Nov 2014 SINIDE - Parameter identification of a sine-wave from a measured signal Frequency, amplitude, phase shift and mean value of the best sinus fit to a sampled signal. Author: Miroslav Balda Don

The "Fatal Case" branch in sinide.m has a bug... "Matrix dimensions must agree" error in line 100 when the input data is rescaled. Maybe a little more fatal than intended? I believe this branch means that my sampling rate is too high for the detected signal freq.

Contact us