The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: computation time of function lsqnonlin
Replies: 12   Last Post: Sep 17, 2013 5:24 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Toan Cao

Posts: 55
Registered: 10/15/10
computation time of function lsqnonlin
Posted: Sep 12, 2013 11:38 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I write an objective function in both m-file (fileA1.m) and C mex file (fileA2.c). Given an input to this objective function, computation time in C mex file is 15 times faster than that of m- file. However, when i use the objective function in function lsqnonlin of Matlab, computation time which lsqnonlin gets a optimal solution is almost the same for both files (~101 minutes for C mex file and ~104 minutes for m-file).
I hope when i use C mex file, i will save more time for optimization process, but it is not.
Can you help me explain why lsqnonlin spends almost the same computation time?
I would like to understand more how lsqnonlin of Matlab works to reduce its time?
Thanks in advance!


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.