# John D'Errico

### Retired

DON'T contact me. I won't answer questions. PERIOD. I don't do your homework. I won't do consulting. A retired mathematician, numerical analyst, woodworker, bridge player.

**Statistics**

RANK**11**

of 271,008

REPUTATION**18,688**

CONTRIBUTIONS

**13** Questions

**6,547** Answers

ANSWER ACCEPTANCE **
38.46%
**

VOTES RECEIVED**4,046**

RANK**4** of 18,280

REPUTATION**62,521**

AVERAGE RATING**4.80**

CONTRIBUTIONS**57** Files

DOWNLOADS **1459**

ALL TIME DOWNLOADS**563290**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**1** Highlight

AVERAGE NO. OF LIKES**8**

**Content Feed**

Broad confidence bound range when fitting in Matlab

Wide confidence limits are typically a symptom, a reflection of uncertainty in some form. And unfortunately, we don't have your ...

20 hours ago | 0

How to perform svd without using the inbuilt function?

Why? That is, why is SVD not acceptable? Yes, you could write a complete code to compute the SVD, without using a call to SVD. ...

1 day ago | 0

Why am I getting this error? "Array indices must be positive integers or logical values".

Is P0 a function? (NO. It is a scalar variable.) You have this: P_twitch_short(i) = P0(0.0258*(exp((stiff*RLS)))-0.0258); Did...

1 day ago | 1

How to recover jpg or RAW images?

I'd be looking at my backups. (A GREAT thing to do.) Of course, if you are asking this question, there are no backups. Before th...

1 day ago | 0

I need to smooth a 3d graph

x=1:10; y=1:21; z=[0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 -9 0 0 0 0; 0 0 0 0 -5 -7 0 0 0 0; 0 0 -10 -25 -15 -5 0 0 0 0; 0 -20 -32 -46...

1 day ago | 0

| accepted

How i can solve the problem of primitive root?

What you mistake is that a and p are represented as DOUBLES. Can you compute a number as you want to do? What happens? a = 3; ...

1 day ago | 1

| accepted

Best way to solve this non-linear equation?

dsolve is not used to solve a PDE. It applies ONLY to an ODE or a system of ODEs. help dsolve There are no symbolic solvers in...

2 days ago | 0

Empty sym: 0-by-1

Don't write a whole mess of code, withput actually thinking about whether virtially the very first (significant) line you write ...

2 days ago | 0

simpsons 1/3 rule calculating error

Before you worry about how to plot things, and compute the error, should you worry if your code is correct at all? Gosh, that ju...

2 days ago | 1

| accepted

How find the function (equation) of the fitting surface using interpolation (method biharmonic)?

This question is asked hundreds of times on the site. The answer is, there is no simple "equation" you can write down. That is t...

3 days ago | 1

What distribution is appropriate for my data?

Why would you expect a distribution like that, with a strange hump on one side to have some predefined distribution that fits it...

3 days ago | 0

Plot two functions in one diagramm with different y-axis limits

Easy peasy. x = linspace(-5,5,1000); y1 = sin(x); y2 = cos(x); y2(y2 > 0) = NaN; plot(x,y1,'b-',x,y2,'r-') ylim([-1,1]) y...

4 days ago | 1

| accepted

How to change Options of PSO during iterations?

Sorry, but no. You cannot change the options for a solver in the middle of the solve. This is essentially true for any solver. (...

4 days ago | 0

Solving Nonlinear System of Equations with 10 variables

Use fsolve. You are trying to formulate this in terrm of a symbolic variables, but fsolve is a NUMERICAL solver. So you need to ...

4 days ago | 0

i want to solve for 'L' using iteration method in MATLAB for the equation below

help fzero Consider that your question is the same as (gT^2)/(2*pi) tanh (2*pi*d/L) - L == 0

4 days ago | 0

How to find the maximum element by length without a loop?

I'm a bit confused as to your question. If you want to choose the longer of two strings, then do as @Florian Bidaud suggests. Bu...

4 days ago | 1

MatLab eig vs LAPACK

If I had to guess, you don't need to use it. A = randn(500); timeit(@() eig(A)) ans = 0.0800828164545 B = A + A'; timeit...

4 days ago | 0

How to solve 'Equation solved at initial point' with fsolve?

As is often necessary on a problem like this, it helps to look carefully at what you have. x = sym('x',[1 2]); mu_earth = 39...

4 days ago | 0

Optimization: Capacitated Facility Location Problem

First, what is the difference between the summation over i in a sum like this: sum(f(i)*yi)) and the dot product of two ve...

4 days ago | 1

im trying to solve a system of 4 nonlinear equations with 4 unknowns

x = sym('x',[1,4]) eq1 = x(1)+.17*x(1)-x(2)-x(3)-x(4) == 0 eq2 = (((x(3)^(1/2))*x(4))/x(2))-.465797 == 0 eq3 = 2*x(1)-2*x(2)-...

5 days ago | 0

Another question on eliminating for loops....

Try it. If you can't see ndgrid doing it, then look harder. :) (By the way, lower case l (L) is a really bad variable name to us...

5 days ago | 0

| accepted

How to do piecewise linear approximation from x and y points?

x = [20 60 240 480 1440 2880]; y = [0.0278 0.1626 1.8126 4.006 18.2491 44.4084]; plot(x,y,'o-') You have only 6 data points...

6 days ago | 0

How do I access an element of an array of equations

If x is symbolic, you CANNOT use it in a colon call. But in the end, you did not ask for a symbolic result, but a function of x....

6 days ago | 0

I want to build the square wave: build a 6 subplot figure to show the time domain, and use respectively 1, 3, 5, 10, 50, 500 frequencies.How can i achieve this?

Solve a problem that is too large for you to handle by breaking it up into small enough chunks to handle. Do you know how to u...

6 days ago | 0

How to get the numerical rank of the matrix in matlab?

To compute the numerical rank of a matrix, use rank. Surely that seems logical. And you even know about rank. Bu then you seem ...

6 days ago | 2

Function to solve an equation for a given variable

If it is symbolic problem, then it is trivial. Just assign those variables, subs them in, and use solve. WTP? If it is a numeri...

6 days ago | 0

| accepted

How to identify the infeasibility from the set of equality and inequality constraints

You have a scalar problem? But then, you have TWO equality constraints? So a solution will exist only if BOTH equalities are s...

7 days ago | 0

Problém with graph of implicit function

If you change the value of a, then the implicit function itself changes. So you MIGHT decide to use fimplicit3. But if you need...

7 days ago | 0

| accepted

degrees of freedom chi2inv

This really should be asked on a different forum, as only barely about MATLAB, and a good answer requires teaching a class in st...

7 days ago | 0