# John D'Errico

### Retired

A retired applied mathematician, consultant, sometime mechanical engineer, numerical analyst, woodworker, bridge player. Please DON'T contact me, as too many students then decide I am their personal consultant if I allow it. I won't do consulting by mail.

**Statistics**

RANK**10**

of 287,635

REPUTATION**20,979**

CONTRIBUTIONS

**15** Questions

**7,413** Answers

ANSWER ACCEPTANCE **
46.67%
**

VOTES RECEIVED**4,542**

RANK**4** of 19,421

REPUTATION**64,572**

AVERAGE RATING**4.80**

CONTRIBUTIONS**62** Files

DOWNLOADS **1146**

ALL TIME DOWNLOADS**581724**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**1** Highlight

AVERAGE NO. OF LIKES**8**

**Content Feed**

generating every possible trajectory in a workspace

Um, no. There are infinitely many possible trajectories, if we consider the variables as continuous. But even if all variables w...

12 hours ago | 0

| accepted

How do I request participation or sponsorship from MathWorks on behalf of my social organization at my University?

Answers is not the correct place to ask your question. Instead, I would contact support directly. Possibly through this link: h...

12 hours ago | 0

Solving tridiagonal Matlab matrix using Gauss siedel ( can't use other method )

Why in the name of god and little green apples are you using Gauss-Seidel for this? (I can only assume this is a homework assign...

1 day ago | 1

| accepted

How do I change my code so that the numbers 1112, 2111, 1211 or 1121 work in this code to reach Kaprekar's Constant?

Numbers in MATLAB do not have leading zeros. Sorry. That is not a valid number, just a string of numeric digits. If you need le...

1 day ago | 1

| accepted

What Does the Symbolic Math Toolbox Mean by 0 < s When s is Complex?

Just test it yourself. :) Admittedly, it may not have been obvious to perform this test. But we can use it to learn how MATLAB s...

2 days ago | 0

| accepted

how can I calculate my expression with double integration?

The important takeaway to use is, you CANNOT perform arithmetic operations between a pair of function handles. Maybe you think y...

2 days ago | 0

fsolve with bound constraints - transformation method

The transformation need not be one to one. For example, a common and reasonably good way to perform an optimization subject to b...

3 days ago | 0

| accepted

How to get a random possible solution from 'solve' function when getting unknown parameters z1 and conditions

Solve cannot return a random possible solution. Wanting code to do what it is not designed to do will never be sufficient. If ...

4 days ago | 1

| accepted

How to get a surface plot for the given function to know how many minima are there?

You cannot plot 4 independent variables. In fact, you would need 5 dimensions to plot, since you want to plot the result of that...

4 days ago | 0

I can't comput the following commands

Sure you "can". It is just that MATLAB fails due to an error. :) Anyway, you seem to think an if statement applies to each elem...

4 days ago | 0

How to plot four variable vector-valued function in MATLAB?

It is no problem. Well, at least not if you have a hyper-dimensional holographic monitor. (Mine is broken, and awaiting parts de...

5 days ago | 0

Not auto change sec(x) to 1/cos(x)?

The problem is, which form is simpler? Simple in your eyes need not always be simple in the "eyes" of your computer. The point ...

5 days ago | 0

How to count how often a variable returns to zero and then increases from zero

It appears this parameter never goes negative. Are your sets ALWAYS such that a zero is always alone? So when it hits zero, it ...

6 days ago | 0

Fastest possible prime number detection without using break or return

You did write working code to find primes. Well done there. But the fastest code? Without breaks, or returns. Easy peasy. Write...

7 days ago | 0

I am new to matlab and I am trying to get prime numbers

But these loops will not result in prime numbers. (As you have found.) I think you are trying to do a simple sieve, or something...

7 days ago | 2

| accepted

How can i calculate the area under two curves that intersect?

1. Subtract the two curves. 2. Take the absolute value of the difference. 3. Compute the integral. Note that you ...

7 days ago | 1

the arc using the chord

Your question is far too general, too vague to have an answer. There are infinitely many "arcs" that will pass through two poin...

7 days ago | 0

MIL SIL equivalence check.

A literally impossible question to answer. Both far too broad, too vague, and yet extremely specific. It is not even clear what ...

8 days ago | 0

How do I create a variable H which contains the product of 5 and the values of B in the 1st and 9th rows, and the 1st and 2nd column.

Ok, first, you do understand how to extract the elements from B. Good there. I think maybe the question wording is confusing you...

8 days ago | 1

| accepted

Is this a logical Error in Matlab ? exp (pi*i*6) = 1.000000000000000 - 0.000000000000001i. WHY an i component ?, should just be 1

Remember that pi in MATLAB is not truly pi, any more than pi is 3.14, or even 3.14159. pi is a transcendental number. There are ...

9 days ago | 2

| accepted

How can MATLAB's extensive suite of functions for data analysis and visualization be utilized to import, process, and analyze simulation data, including performing frequency a

Um, learn MATLAB. That means you need to learn how to read the help, the documentation for those tools. Start by doing the bas...

9 days ago | 0

Symbolic integration has 3 solutions based on integration variable range, how to extract one of these?

Or do this: syms r umax Radius mom_2 = int((umax*(1-r/Radius)^(1/7))^2*2*pi*r,r,0,Radius) subs(mom_2,Radius,1) Note that it ...

10 days ago | 0

How do I find the most stable N consecutive numbers?

The mean difference? What is that exactly? In terms of mathematics? Are you looking for the 50 element consecutive subset with ...

10 days ago | 0

Possibly spurious solutions - Matlab blocked with no answers

You are attempting to solve for an analytical solution of 12 simultaneous nonlinear equations, in 12 unknowns. This, even if it ...

13 days ago | 1

| accepted

Solving goal programming problem with MATLAB

READ THE ERROR MESSAGE! What did it say? "Failure in initial user-supplied objective function evaluation. Optimization cannot c...

13 days ago | 0

How to set an axis with arbitrary, but equally spaced, scaling.

You could not plot versus the numbers 0,1,2,3, but then set the x-tick labels as you wish? x = [1/3 1/2 1 inf]; xfake = [0 1 2...

14 days ago | 1

| accepted

All possible combinations of a matrix

Did you intend to write 1.024^13? This is not even an integer, and only a little larger than 1. 1.024^13 So there are 1.3611 u...

14 days ago | 1

cubic spline interpolation - mixed boundary conditions possible?

You generally don't want to do this. That is, fit one spline, then construct a second spline to match the first. The result will...

16 days ago | 0

what's the relation between A , B and M,G for this Nonlinear system of equation ?

This is not even remotely a question about MATLAB. As such, it should arguably not even be on Answers. But I have a minute to re...

17 days ago | 0

Check code compatibility with older releases

A way to automatically check code compatibility with older releases, and see at what point a feature that you use makes your cod...

17 days ago | 0

| accepted