Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
12 Oct 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Balda, Miroslav

Read my answer dated 04 jun 2009. I'll answer you later by e-mail.

11 Oct 2009 Frequency, amplitude, phase and mean value of sine wave The function sinfapm evaluates parameters of sampled sine wave Author: Miroslav Balda juho

When I implement this function for noisy sine vawes, the amplitudes seem to be very far from reality. Often, amplitudes have even minus signs(?). Any ideas why ?

01 Oct 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Uehara, Shin-ichi

Hi,

I want to do curve fitting of some laboratory results with a model.
The model which I want to use can not explained by a single function,
but is explained by a series of differential equations.
In this case, I do not know how to apply LMFnlsq.
It is very helpful if you give any advice.

Thanks.

(I am applying "fminsearch" to this problem so far, but
the description of "fminsearch" mentions that this code is
not suitable to this kind of problems.)

15 Aug 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Doan, Jon

Very nice

11 Jun 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda thomas

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

This part of the submission is intended for Comments and Ratings. More over, I pleased anybody to write me by e-mail on errors and improvements, see the section Other requirements. This is the reason why I'll not communicate here anymore.

03 Jun 2009 Simple formatted ASCII output Easy formatted output of ASCII data Author: Miroslav Balda Joseph

great

03 Jun 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda SOLEIMANI, Hossein

Hi

how can I give an interval for the results, i don't need negative values for answers or I need some answers higher
than some values,

you also helped me before Mira

thanks.

03 Jun 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda jeyasenthil

i try to run the Example Rosenbrock's function ( SQP)with "xy" in the output arguments ..but it not work ...it shows xy =[ ] empty matrix...can any body clear this to me?...

function ros = rosen(x)
 d = sqrt(x(1)^2+x(2)^2)-1.5;
 r=1.5;
  ros = [ 10*(x(2)-x(1)^2) % first part, f1(x)
1-x(1) % second part, f2(x)
(d>0)*d*1000 ];

 
x0=[-1.9,2];
>> options=LMFnlsq;
>> [x,ssq,cnt,nfJ,XY] = LMFnlsq('rosen',x0,options)

01 Jun 2009 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 jeyasenthil

24 May 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Kevin

Professor Blada:
I truly apprecate you helping me out to solve nonlinear equation.
Your code worked beautifully for me and thanks again for your prompt feedback in weekend time.
Thanks again, Dr. Balda.

24 May 2009 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 Kevin

Professor Balda:
I truly appreciate you for helping me out to solve non-linear equations. Your code beautifully worked out for me. Also, thanks again to correct matrix in your weekend time.
Dr. Balda, Thanks again for your great help and prompt support.
D. Kim

18 May 2009 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 SOLEIMANI, Hossein

18 May 2009 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 SOLEIMANI, Hossein

18 May 2009 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 SOLEIMANI, Hossein

Hi

I want to solve a set of nonlinear equations that has a degree of freedom of 4 , and I want to use the experimental data in order to find the best results.
1. I have read the explanation about the FUN and I dont know how to put the funtions and also where I should include my experimental data?

please help me,

regards

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

txs a lot =)).
 i need it that mean

28 Feb 2009 Multiple assignment The function arg2vars enables to assign more items to a list of variables Author: Miroslav Balda Balda, Miroslav

I am sorry that I have not known that the function deal exist. I always learn something new. BTW, the last example may be simplified on the right hand side of assignment by arg2vars([]).

27 Feb 2009 Multiple assignment The function arg2vars enables to assign more items to a list of variables Author: Miroslav Balda Jos

Most of this behavior can be handled by DEAL, for instance, a,b,c] = deal([])
(btw, the later example is rather strange as I would expect
"[E,b,c...] = arg2vars" to do the job ...)

The need for putting cell arrays into a cell to assign it to a single variable is in my opinion very contra-intuitive given the fact that a regular array is not split into separate variables.

To me, the only advantage of this submission seems to be that unassigned output arguments are set to empty, but a simple wrapper function around deal will do the same:

function [varargout] = mydeal(varargin) ;

varargout([1 2:nargout]) = {[]} ; % return [] when called without any in/output arguments
if nargin,
    N = max(min(nargin,nargout), 1) ;
    % how many things do we have to be DEALt with?
    [varargout{1:N}] = deal(varargin{1:N}) ;
end

11 Feb 2009 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 Balda, Miroslav

To Judith. What is wrong with your computer is difficult to find from your message. If you used the script LMFsolvetest, which is a part of the zipped file, you would get the solution. The stability has been reached in this case by a careful selection of optional parameters. It is written in the description, that the code is not perfectly stable and that it is better to use the function LMFnlsq (See the comment dated 06 Dec 2007).
If you try the old version (LMFsolveOLD), you would get also the answer. The solution of the problems could be solved much easier, if you read the last sentence in the section "Other requirements".

10 Feb 2009 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 Brands, Judith

Analysing the example in the introduction of the file (Rosenbrock) gives different results on my computer as given in the example (cnt=7; ssq much larger). Furthermore, the results using this M-File are identical as to the results obtained with fminsearch? What goes wrong on my computer?

27 Jan 2009 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Polarman

13 Jan 2009 inp.m The function inp.m serves for keyboard input supported by default value Author: Miroslav Balda Balda, Miroslav

Your solution is much simpler than that of mine, however, an operator doesn't know in advance, what he (she) is accepting as default.

13 Jan 2009 inp.m The function inp.m serves for keyboard input supported by default value Author: Miroslav Balda Jos

What is wrong with:
a = input('Give value?') ;
if isempty(a),
  a = defaultvalue ;
end

28 Oct 2008 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda White, Steven

This is a great bit of code that does exactly what it says. I used it to replace lsqcurvefit as I no longer have the optimisation toolbox.

I would suggest that the author also considers using additional examples, as the ones given are very complicated to understand if you come from a very different field. However, after a little search I found this by the author, which I found much more useful:
http://mathforum.org/kb/message.jspa?messageID=6283753&tstart=0

It tells you how to use the function to fit a curve to some data. This should be easily modified for fitting other functions/data etc.

11 Oct 2008 Quick search for local extremes New fast and reliable function for finding local extremes in a real vector. Author: Miroslav Balda abdelrahaman, ahmed

hi

i like to make an algorithm to compute the distance between two time series using just extreme point (extreme points warping)

can you help me

25 Sep 2008 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Schwalm, C

24 Sep 2008 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Hunyadi, Levente

15 Aug 2008 Smart text separator A tool for design of neat apperance records on data processing. Author: Miroslav Balda Shvorob, Dimitri

As the previous submission - and what has changed, by the way? - this one just writes out a separator line. You can do anything that it does with a single line; in fact, you can do better, by writing out separated strings from a cell array with a single 'sprintf'. Btw, is 'inputparser' available in Matlab 2006b?

24 Jul 2008 Frequency, amplitude, phase and mean value of sine wave The function sinfapm evaluates parameters of sampled sine wave Author: Miroslav Balda sweeney, david

How do I get this file to run????

15 Jul 2008 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Jackson, Jon

Works well, thanks.

For others who may be looking for the LMFtest dependencies, they are file ID numbers 9033, 9035 and 11725 (as documented in the pdf file appendix).

08 Jul 2008 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Balda, Miroslav

I tested the function LMFnlsq once again after reading your comments and an evaluation. I am sorry with you that you are not able to copy and paste ascii lines without errors. You did not try the script LMFtest, which is included in the zip file together with LMFnlsq, where you could get results without any copying. Was it sou difficult to look at it and find how to use the function LMFnlsq. I am afraid of the reaction of other people, who could use even better function than that they may find in the Optimization Toolbox, but seeing your evaluation they will pass it. It is not fair. I thing that you evaluated you yourself.

07 Jul 2008 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda Wiggin, Ender

The solution does not work. I get an error whenever I copy and paste the code than run it on MATLAB

06 Jun 2008 Time Series Library - tslib The library contains a set of functions for manipulation and processing of 3D-time-series arrays Author: Miroslav Balda -, Peter

The key-issue in calculations with 3d matrices is the fact that for-loops are slow in matlab, compared to matrix operations. When operating MIMO sound-samples for example the number of iterations of a for-loop is like 44100 per second of the sample. This library uses for-loops and therefore doesn't really solve the problem

31 May 2008 Frequency, amplitude, phase and mean value of sine wave The function sinfapm evaluates parameters of sampled sine wave Author: Miroslav Balda Pachar, Ramesh

16 Apr 2008 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 Firman, Nanang

24 Jan 2008 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 Shin, Ki-Young

Wow!! I have been looking for LM algorithm (m file) for a long time.

06 Dec 2007 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 Balda, Miroslav

The function LMFsolve can be replaced by far more stable function LMFnlsq, FEX Id 17534

08 Oct 2007 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 Balda, Miroslav

The new extended description and help solves both notes.

05 Oct 2007 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 Nicholson, Ilpo

I cannot either understand the example (Rosenbrock function minimization with constraint) and the code (first & second part, penalty function). Maybe a some other curve fitting example would be more rewarding...?

04 Oct 2007 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 Gang, Xie

Excuse me, sir. I can't catch the command:
R = @(x) sqrt(x'*x)-.5; % A distance from the radius r=0.5
ros= @(x) [10*(x(2)-x(1)^2); 1-x(1); (R(x)>0)*R(x)*1000];
I use MATLAB6.5.
Thanks.

03 Sep 2007 Display text separator Creates separating text line on display Author: Miroslav Balda Balda, Miroslav

It looks that you did not read, what the widget is able to do. Your repmat(...) is only one of possible statements doing the same underscore good for primitive separating sections on display. However, when creating records, it is possible to make more complicated outputs, say,

separator([mfilename ' ' datum],'@',33),

which may be done by other MATLAB statements, but by more complicated way. Sorry, but I don't agree with your evaluation.

03 Sep 2007 Display text separator Creates separating text line on display Author: Miroslav Balda Shvorob, Dimitri

.. or, you can use something like
> repmat('-',1,100)

24 Jul 2007 Time Series Library - tslib The library contains a set of functions for manipulation and processing of 3D-time-series arrays Author: Miroslav Balda Datta, Dibakar

excillent

22 May 2007 Quick search for local extremes New fast and reliable function for finding local extremes in a real vector. Author: Miroslav Balda Rodriguez, Julio

I need your help Mr. Miroslav Balda.
This paper "Processing of Blade Monitoring System Data", complete document, data this proyect, information in general

Thanks for attention

10 May 2007 Free format read - ffread.m ffread.m is applicable for reading character information from strings or files. Author: Miroslav Balda Opare, Emmanuel

05 Apr 2007 Time Series Library - tslib The library contains a set of functions for manipulation and processing of 3D-time-series arrays Author: Miroslav Balda Shvorob, Dimitri

I think that the title is misleading: the functions can be used to work with multivariate time series, but these are not date/time functions per se. I also wish the PDF offered more details on the functions: surprisingly, a chapter named 'An example' shows no Matlab code. Personally, I have not had trouble working with 3D array - how hard is it to code a loop, when 'x(i,j,:)' can't be used? - but other people may find your code useful, if you just explain upfront what it does. (For example, 'tsarr2mtx - ts array to ts matrix conversion' - what is that?). How about an HTML sample session?

26 Jan 2007 Select path and filename - getpf.m It enables to put path and filename into variables Author: Miroslav Balda Balda, Miroslav

I beg those users, who loaded already the file, for an excuse, because of an error, which is now removed. Any messages on errors send directly to my e-mail address, please.

04 Jul 2006 Free format read - ffread.m ffread.m is applicable for reading character information from strings or files. Author: Miroslav Balda bihnam, basim

09 Mar 2006 Quick search for local extremes New fast and reliable function for finding local extremes in a real vector. Author: Miroslav Balda Balda, Miroslav

I will not continue in discussions here. More by e-mail.

09 Mar 2006 Quick search for local extremes New fast and reliable function for finding local extremes in a real vector. Author: Miroslav Balda Pastushenko, Vassili

Hi Miroslav!
Here is my comparison. It is known that the calc. speed depends on memory limitations. By me vectors 1e6 long are already problematic. Therefore I have selected 1e6, not 1e7. How many people need longer vectors?

Again, you have compared with MAXALL which DID INTERPOLATION. I compare both versions, with and without interpolation.

Yes, without interpolation your extr is apparently 0.5 sec faster for 1e6 vector. But this is again not completely correct, because both progs do different jobs. The user needs BOTH POSITIONS AND VALUES. You analize only y-data, and my prog. searches for both x and y values for extrema. But can a user write down several additional lines within 0.5 sec, in order to extract necessary positions and values?

I was very glad to see that the interpolation is extremely fast: only about 0.2 sec was additionally necessary. I disagree that interpolation is not important. It is frequently nesessary for real data. Typical and quite frequent case is std(diff(signal,2)) comparable with experimental noise amplitude.

As to plateaus: I could agree if you work mainly with double(int8 or int16, uint too). This is however a special niche. In a standard situation, if your sampled data obey a continuous distribution and are represented by double, the probability of such a plateau-extremum is close to zero.

Let users decide, which version they like better.
  
EXAMPLE: I have filtered somewhat randn, in order to create some similarity with possible real data.

x=savfilt(randn(1,1000000),10);
tic,L=extr(x);te=toc; %time extr
tic,[xp,yp]=maxall(x,0);tm=toc; %time maxall,no interp
tic,[xpi,ypi]=maxall(x);tmi=toc; %time maxall with interpolation

T=[te,tm,tmi] % all times
NUM=[sum(L{2}),length(xp),length(xpi)] %numb. of maxima

T = 0.406 0.906 1.125

NUM = 193980 193980 193980

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com