Community Profile

Fang


23 total contributions since 2012

Contact

Contributions in
View by

Responded


Re: Error when building the simple example C mex file
Anyone knows what happened?

3 years ago | 1169 views

Posted


Error when building the simple example C mex file
I have tried to compile C code in matlab. I tested with the simple example code in the matlabroot/extern/examples subfolders. I...

3 years ago | 1169 views

Posted


How to choose InitBarrierParam when using interior-point algorithm in fmincon
I have large-size problems. The number of variables is between 500000 and 3000000, depending on different input datasets. The th...

3 years ago | 2197 views

Responded


Re: Is there a way to pass inverse Hessian matrix to fmincon when
Thank you very much. I am sorry that I forget to mention that I do not have nonlinear constraints in my problem and the hessian ...

3 years ago | 1990 views

Posted


Is there a way to pass inverse Hessian matrix to fmincon when using interior-point method?
For my understanding, if I pass the hessian matrix and gradient vector to fmincon, inside the fmincon function, the interior-poi...

3 years ago | 1990 views

Responded


Re: fmincon, Hessian and extra parameters
Yes, you are right. Thank you very much.

3 years ago | 5933 views

Responded


Re: fmincon, Hessian and extra parameters
I tried this method, but I got an error message Error Using @(x, lambda)fun_hessian(x, lambda, k, S_T1, iS_T2, xy_h, xy_d) Too m...

3 years ago | 5933 views

Responded


Re: How to use lsqnonlin with the option "JacobPattern"
Thank you very much, Alan. So JacobPattern is to pass the locations of the nonzero derivatives, but how to pass the nonzero elem...

3 years ago | 2477 views

Posted


How to use lsqnonlin with the option "JacobPattern"
I have a large-size problem, and the Jacobian matrix is sparse. In the document, there is a "JacobPattern" option, but I cannot ...

3 years ago | 2477 views

Posted


How to pass an empty string to executive command?
I have a function myfun(string1, string2). I matlab, I can use it like this: It works fine. string2 is an empty string. The pro...

4 years ago | 979 views

Posted


how to write a sparsy hessian matrix for fmincon
I am using the function fmincon, and I calculated the hessian matrix for the minimization function. It is like this [0 A 0 0 0 0...

4 years ago | 1669 views

Posted


how to build an array of function handles
I need to create an array of function handles. My code is like this: b=[@(x)x+1, @(x)x+2]; The message is Error using horzcat...

4 years ago | 13333 views

Posted


How to create a list of functions
I have to use my function list in this way: FunctionList={@(x)x.*t(1)-s(1)}; ... FunctionList={@(x)x.*t(1)-s(1), @(x)x.*t(2)-s(...

4 years ago | 1047 views

Posted


minimizing the sum of the absolute difference for nonlinear function
I have a nonlinear function y=f(x,coef). x and y are the input and output, and I need to estimate the coefficient coef. The pro...

4 years ago | 3183 views

Posted


how to compile an linux executable command in windows?
I have matlab in my windows system, and I want to compile my *.m source file, and run it in linux. How can I do it? Use mcc?

4 years ago | 1012 views

Posted


How to set 'Display' to 'off' in fit()
I use fit() for curve fitting. 'Method' is set to 'linearLeastSquares'. Is there a way to set 'Display' to 'off'? I notice for t...

4 years ago | 722 views

Posted


Is there a function for robust linear regression with lb and ub?
I was using lsqlin() for linear regression with upper and lower bounds, and it works fine. Now I want to add a robust estimation...

4 years ago | 1402 views

Responded


Re: nonlinear curve-fitting
I don't think robustfit or linearModel can do the work, because the problem I need to solve is nonlinear, and with constraints. ...

4 years ago | 2425 views

Posted


nonlinear curve-fitting

4 years ago | 2425 views

Responded


Re: what's wrong with lsqcurvefit()
You are right. Actually, I want to estimate the parameter of a linear model, say, y=-x./a+b. The input is x, and output is y. y ...

4 years ago | 2253 views

Posted


what's wrong with lsqcurvefit()
I tried to use lsqcurvefit to estimate the parameter 'para' in function 'F': F = @(para, x)((para(2) - x ./ para(1)) .* ((para(2...

4 years ago | 2253 views

Responded


Re: Can I use lsqlin() to solve this equation y=(ax+b).*((ax+b)>0) ?
Sorry! The example should be: x=[10 20 30 40 50 60 70] y=[54 23 9 24 0 8 0]

4 years ago | 2558 views

Posted


Can I use lsqlin() to solve this equation y=(ax+b).*((ax+b)>0) ?
The model of the system is defined as: y = ax+b if ax+b>=0, and y = 0 if ax+b < 0 x is the input. The value is fixed: x=[10 20 ...

4 years ago | 2558 views