matlab,binary-data,nonlinear-functions,quantization

this piece of your code is completely wrong ,you change s(k) but you use s(k+1), it means that changing s(k) has not any effect! for k =1: N if s1(k)== -1 s1(k) = 0; end b(k) = 0.5*s1(k+1) + 0.5*b(k+1); end true one is: for k =1: N+1 if s1(k)==...

matlab,equation,nonlinear-functions

There are several mistakes in your code. For a start, fzero is for finding numerical roots of a non-linear equation, it is not for symbolic computations (check the documentation), so get rid of syms x. The correct way to call fzero in your case is a as follows: A =...

python,sympy,nonlinear-functions

Although you had the right sign of the difference of r in f1 and f3, if you write in terms of squares (where the sign no longer matters) as is already done in f2 you obtain 2 real answers: >>> f1=(x0-x1)**2+(y0-y1)**2-(r0 - r1)**2 >>> f2=(zqua-x0)**2+(yqua-y0)**2-r0**2 >>> f3=(x0-x3)**2+(y0-rm)**2-(r3 - r0)**2 >>>...

Well, you could either write the code for the jacobian yourself: J = @(x,y,z) [ 5*x.^4, 3*y.^2.*z.^4, 4*y.^3*z.^3; ... 2*x.*y.*z, x.^2.*z, x.^2.*y; ... 0, 0, 4*z.^3]; Or directly generate a function handle from the symbolic expression using matlabFunction: syms x y z; J = matlabFunction(jacobian([x^5 + y^3*z^4 + 1 ;...

r,nonlinear-functions,nls,non-linear-regression

I am not aware of such packages and personally I don't think that you need one as the problem can be solved using a base R. nls is sensitive to the starting parameters, so you should begin with a good starting guess. You can easily evaluate Q because it corresponds...

wolfram-mathematica,curve-fitting,nonlinear-functions

This can be done easily with the Quantile regression with B-splines package by Anton Antonov (direct link to the M-file): Needs["QuantileRegression`"] qfunc = QuantileRegression[data, data[[;; , 1]], {0.5}, InterpolationOrder -> 2][[1]]; // Quiet Plot[qfunc[x], {x, Min[data[[All, 1]]], Max[data[[All, 1]]]}, Frame -> True, PlotStyle -> Red, Prolog -> Point[data], PlotLabel ->...

matlab,equation,equation-solving,nonlinear-functions

I see, I got to almost the same place as you, however, I got to line 309, since apparently using isfinite on a sym does not cause a crash in matlab 2014b. However, isfinite returns false, still giving an error. But to the point: it seems that fzero is not...

python,performance,nonlinear-functions

It's hard to say how to fix it without seeing the context in the rest of your code; but one thing that might speed it up is pre-computing dummy quantities with numpy. For example, you could make a numpy array of each agent's total_balance and sum_qualification, compute a corresponding array...

matlab,image-processing,nonlinear-functions

Your curve function as look-up table, the simplest way to execute look up table is: lookuptable=[ 9 8 7 6 5 4 3 2 1 0 ]; I=[ 1 3 4; 5 3 8]; Itransformed=lookuptable(I) Notice that the index of the lookuptable is accessed by the value of the pixel....

Sounds like the problem is too stiff for fsolve, or you've got a poor starting guess. The code you have looks fine, however, if you may want to use a parametrized anonymous function: x = data1(:,1); y = data1(:,2); n = length(x); p0 = [0 0 0 0]; options =...

c++,polynomial-math,nonlinear-functions

This approach makes use of the bisection method, and the fact that you can do a little math to find an upper bound for the highest zero, respectively. Reproduced at http://ideone.com/fFLjsh #include <iostream> #include <iomanip> #include <cmath> #include <vector> #include <utility> #define MINX (-20.0f) //MAXX Happens to be an upper...

sas,nonlinear-functions,nonlinear-optimization,enterprise-guide

First, there is no WYSIWYG in EG that I know of to do this. You can use a number of procedures, getting them to converge (PROC MODEL comes to mind as a likely candidate) is not easy. I used PROC OPTMODEL from SAS/OR in this example. data test; do i=1...

r,nonlinear-functions,natural-logarithm

In R, log is the natural logarithm. In calculators, log usually means base 10 logarithm. To achieve that in R you can use the log10 function. log(5) ## [1] 1.609438 log10 ## [1] 0.69897(5) As for your formula, it seems correct, since log is the natural logarithm. Hope it helps,...