Community Profile

# John D'Errico

### Retired

5.312 total contributions since 2006

(Don't contact me. I won't answer questions.) A retired mathematician, numerical animalist, woodworker, bridge player.

#### John D'Errico's Badges

View all

Contributions in
View by

fixed point Iterative method for finding root of an equation
To understand fixed point iteration, we need to know why and when it will diverge. When does it converge? For some problems, the...

alrededor de 20 horas ago | 1

| accepted

How to find all solutions to a system of two nonlinear equations?
Here is the rub - you are in trouble IF you really want to find ALL solutions of a system of totally general nonlinear equations...

1 día ago | 1

| accepted

inverse matrix calculation problem
You need to understand that the matrix a=[1 2 3;4 5 6;7 8 9] is singular. Therefore it has no inverse. You may as well have s...

3 días ago | 0

Matlab code for fractions
Confusing question. Do you know the value of s? s = 7 s = 7 >> 1.5/s ans = 0.214285714285714 >> format rat...

4 días ago | 1

Direction between points from [0,360]
The function atan2d gives angles that are from -180 to 180. Not a problem. This works: mod(atan2d(y,x),360) But you want the a...

6 días ago | 2

| accepted

Well, you did make an effort, and it was pretty close. But did you read my response? Did you read the help for tand and cosd? W...

6 días ago | 0

| accepted

Exponential Piecewise function creation.
A spline is not a piecewise exponential function, so using spline directly would be a waste of time, IF you truly need a piecewi...

6 días ago | 1

| accepted

minimum value of one inequality
This is just mathematics. r = 0.001; s = 7; n ALWAYS appears as 2^(-n/2). So calling that number x, first write the problem ...

7 días ago | 4

| accepted

Generate random sequence number with condition
I think you still do not appreciate that you cannot just say something is "random" and not define the distribution. For exampl...

8 días ago | 1

error using cross (A and B must have at least one dimension of length 3.)
I'm not sure what you want in terms of a 25000 dimensional cross produt between two vectors. What do you think it means? After a...

8 días ago | 1

| accepted

Diagonalising a Skew-Symmetric Matrix
Matrices that are defective will not have a complete set of eigenvectors. https://en.wikipedia.org/wiki/Defective_matrix " In...

8 días ago | 0

Molecules on flat surface by using the package of Atomistic Topology Operations
Without more carefully reading the help for the code you are using, when I go to that link, it describes Box_dim as a variable. ...

8 días ago | 0

Taylor polynomial of a not infinitely differentiable function.
Your question has absolutely nothing to do with MATLAB, but you seem to have made some effort. So I will point out that you may ...

9 días ago | 1

| accepted

Numerical integration over (0, x1)
If t is unknown, then you need to use symbolic tools to do the integration. syms x t K = 1/((exp(0.014342/(x * t)) - 1)) * (1/...

9 días ago | 1

| accepted

How can i compute an interpolated curve?
You don't provide the actual data. But you are asking to do something which is trivially easy for the eye to do, more difficult ...

10 días ago | 1

| accepted

how can I draw half circle in matlab ?
Sigh. You DID make an effort. It is not even a terrible solution, though what you did will not work, since it will at best be a ...

10 días ago | 2

| accepted

linprog cannot find solution
While you claim a solution exists, initially, I sincerely wonder if it truly does. I may learn differently by the time I am done...

11 días ago | 1

How to Run PSO with Real Data
You can't. That is, the optimal is just the optimal value at each point in your sample. You cannot do better than that, at least...

11 días ago | 0

How to solve for x in an sin equation?
No. There are INFINITELY many solutions. So you cannot say you want the OTHER solution. You can simply enough find a positive so...

12 días ago | 0

| accepted

linearly independent eigen vectors
And for some strange reason, you think that eig as applied to a diagonal matrix does not produce a set of independent eigenvecto...

13 días ago | 0

| accepted

How can large sparse matrix (Y bus matrix of order 800*800) be done inverse in Matlab?
An 800 by 800 matrix is barely what I would call large anymore. Perhaps 40 years ago, yes. Today, it is almost tiny. Ok, not tin...

13 días ago | 0

| accepted

How to subtract from a vector array and, if the answer is lees than 0, have it return a value of 0
Simple. No need to test anything either. Just use the max function. x = [1 2 3]; x(1) = max(x(1) - 2,0); x x = 0 ...

15 días ago | 0

Calculate factorial with 2 variables
Why do you feel you need to use loops? You should never write your own code for something that is far better computed using an e...

15 días ago | 2

Random number from 1 to 100 if the number between 20 to 30 add 100 if the number 50 to 60 minus 100.
I'll generate 10 samples. N = 10; X = randi(100,1,N); ind = (X >= 20) & (X <= 30); X(ind) = X(ind) + 100; ind = (X >= 5...

17 días ago | 0

Curve Fitting and Distribution Fitting
You have what, 13 data points? A model with many exponents in it? A model that is surely based on no real physical meaning of th...

20 días ago | 0

Integral of bessel function returns all zeros
It is a really bad idea to use gamma as a variable name because you are now stepping on the name of a very useful function in MA...

20 días ago | 0

| accepted

Sampling data using contraints
Use my randFixedLinearCombination tool, as found on the file exchange. (I did just post an update today, fixing a bug the code t...

20 días ago | 1

| accepted

Submitted

randFixedLinearCombination
Uniform random samples over a n-dimensional hyper-rectangle, subject to a linear equality constraint

20 días ago | 7 downloads |

recursive function to check a Palindrome
Why not try? I won't write it for you, as the entire problem is to make you think. I'll give you one hint, and I will hope nobod...

20 días ago | 1