Rank: 151 based on 576 downloads (last 30 days) and 8 files submitted
photo

Mark Mikofski

E-mail
Company/University
SunPower
Lat/Long
37.91043, -122.35926

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Mark View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 Feb 2014 Screenshot polyfitZero Fit polynomial to data, forcing y-intercept to zero or arb. value and slope to zero or arb. value Author: Mark Mikofski mathematics, modeling, data exploration, interpolation, polyfit, polyval 120 8
  • 4.66667
4.7 | 6 ratings
27 Jan 2014 Screenshot Newton-Raphson solver Yet another solver that uses the backslash function to solve a set of non-linear equations. Author: Mark Mikofski mathematics, optimization, data exploration, interpolation, fsolve, lsqnonlin 261 16
  • 5.0
5.0 | 2 ratings
14 Oct 2013 Screenshot JGit4MATLAB JGit4MATLAB is a wrapper for JGit in MATLAB. It is meant to be used from the MATLAB command window. Author: Mark Mikofski git, scm, dvcs, version control, source control manage..., distributed version c... 26 11
  • 4.0
4.0 | 2 ratings
14 Oct 2013 Screenshot IAPWS_IF97 functional form with no slip Water and steam properties and derivatives based on the IAPWS IF97. Functional form. No slip. Author: Mark Mikofski control design, simulation, chemistry, modeling, hydrodynamics, thermodynamics 64 7
  • 4.75
4.8 | 4 ratings
03 May 2013 Screenshot Spline2D or Piecewise Continuous 2D Polynomials Fit a 2D function with piecewise continuous polynomials Author: Mark Mikofski data exploration, interpolation, mathematics, modeling, optimization 16 0
  • 5.0
5.0 | 1 rating
Comments and Ratings by Mark View all
Updated File Comments Rating
04 Feb 2014 Newton-Raphson solver Yet another solver that uses the backslash function to solve a set of non-linear equations. Author: Mark Mikofski

@Regan Dhakshnamurthy, the latest changes to newtonraphson now allow sparse matrices, and will also quit if your jacobian is singular, but there is no preconditioning. You could hack in to lines: 98-99 where it says "% TODO: let user set weights
weight = ones(numel(FUN(x0)),1);" and change the weights to something different, it's not really the same, but this is the matrix used to scale the Jacobian as you can see on line: 112, "Jstar = J./J0; % scale Jacobian" Good luck and let me know if it works and I will make the weights argument callable

26 Jan 2014 Using Doxygen with Matlab Extracts automatically comments from your Matlab .m files using Doxygen to generate documentation Author: Fabrice

try sphinx with the matlabdomain
https://pypi.python.org/pypi/sphinxcontrib-matlabdomain

26 Jan 2014 Automatic HTM documentation mfc2html helps to produce automatic HTML documentation in a folder containing MATLAB code Author: Massimiliano Versace

try sphinx with the matlabdomain
https://pypi.python.org/pypi/sphinxcontrib-matlabdomain

03 Jan 2014 Newton-Raphson solver Yet another solver that uses the backslash function to solve a set of non-linear equations. Author: Mark Mikofski

@ Regan: My guess is no, because if your matrix is so large that inverting is so expensive that you have to resort to pcg instead of just using the backslash operator, then it will be too big for newtonraphson, which also uses the backslash operator. If you want to try it anyway and you have sparse matrices then you'll have to comment out L108 and L181 or change `cond()` to `condest()`. Also you'll have to rewrite your objectives as `Ax - b = 0`, so that the residuals are zero.

27 Nov 2013 Newton-Raphson solver Yet another solver that uses the backslash function to solve a set of non-linear equations. Author: Mark Mikofski

There is a minor bug (or feature depending how you look at it). If your Jacobian has any `Inf` or `Nan`, then `cond` throws a confusing exception: "Input to SVD must not contain NaN or Inf." That's because `cond` calls `svd` or "single-value decomposition".

I can't remember why I chose `1/cond(J)` instead of `rcond(J)` which would have returned `NaN`. Regardless - this error means your Jacobian has `NaN` or `Inf`, and is therefore badly conditioned.

It's possible that the characteristic `J0` is the culprit b/c this is `1/TYPX` which is a positive non-zero value less than or equal to one (`TYPX = max(abs(x0), 1)`. Therefore if `x0` is **very** large, then `1/x0` will approach zero, causing `Jstar` to contain `Inf`.

EG: `1/(1/(1e999)) -> Inf`

That will cause this error - so lessons learned until a patch arrives:

(1) x0 must not be **very** big, EG: x0 < 1e99,

(2) if you get the `svd` error, your Jacobian is badly conditioned, pick better initial guesses and/or better governing equations and

(3) in the future this exception will be caught and return `rcond = NaN`.

Comments and Ratings on Mark's Files View all
Updated File Comment by Comments Rating
12 Mar 2014 polyfitZero Fit polynomial to data, forcing y-intercept to zero or arb. value and slope to zero or arb. value Author: Mark Mikofski Morales-Rivas, Lucia

04 Feb 2014 Newton-Raphson solver Yet another solver that uses the backslash function to solve a set of non-linear equations. Author: Mark Mikofski Mikofski, Mark

@Regan Dhakshnamurthy, the latest changes to newtonraphson now allow sparse matrices, and will also quit if your jacobian is singular, but there is no preconditioning. You could hack in to lines: 98-99 where it says "% TODO: let user set weights
weight = ones(numel(FUN(x0)),1);" and change the weights to something different, it's not really the same, but this is the matrix used to scale the Jacobian as you can see on line: 112, "Jstar = J./J0; % scale Jacobian" Good luck and let me know if it works and I will make the weights argument callable

03 Jan 2014 Newton-Raphson solver Yet another solver that uses the backslash function to solve a set of non-linear equations. Author: Mark Mikofski Mikofski, Mark

@ Regan: My guess is no, because if your matrix is so large that inverting is so expensive that you have to resort to pcg instead of just using the backslash operator, then it will be too big for newtonraphson, which also uses the backslash operator. If you want to try it anyway and you have sparse matrices then you'll have to comment out L108 and L181 or change `cond()` to `condest()`. Also you'll have to rewrite your objectives as `Ax - b = 0`, so that the residuals are zero.

02 Jan 2014 Newton-Raphson solver Yet another solver that uses the backslash function to solve a set of non-linear equations. Author: Mark Mikofski Dhakshnamurthy, Regan

could I substitute this solver to PCG for solving laplacian matrix..

02 Dec 2013 polyfitZero Fit polynomial to data, forcing y-intercept to zero or arb. value and slope to zero or arb. value Author: Mark Mikofski Mishra, Subhashree

Contact us