# 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,487

REPUTATION**18,760**

CONTRIBUTIONS

**13** Questions

**6,568** Answers

ANSWER ACCEPTANCE **
38.46%
**

VOTES RECEIVED**4,058**

RANK**4** of 18,315

REPUTATION**62,559**

AVERAGE RATING**4.80**

CONTRIBUTIONS**58** Files

DOWNLOADS **1464**

ALL TIME DOWNLOADS**563666**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**1** Highlight

AVERAGE NO. OF LIKES**8**

**Content Feed**

Optimization of a multivariable function within given solution space

100 variable problems are hugely more complex than 3 variable problems on a very limited search space. You can often solve the s...

10 hours ago | 1

Mirror a point cloud (nx3 matrix) with respect to a plane

Pretty simple really. The YZ plane lies at X == 0, and is perpendicular to the x axis. So just negate the value of x, in each ...

1 day ago | 0

| accepted

New to matlab and I do not understand given code

As much as I dislike doing homework for students, this is a case where I will relent, because it is very uncear why one would su...

1 day ago | 0

| accepted

Is there a function to find the paired factors of an integer?

allfactorpairs = @(n) [divisors(n)',n./divisors(n)']; allfactorpairs(16) If you want only those pairs where the first elemen...

1 day ago | 0

| accepted

How to detect cluster of radial lines which are generated from same point ?

Surely there is a tool you can find in image processing to search for lines. Use it. Find all lines in the image. For EACH dark...

2 days ago | 0

Symbolic solution for intersection points between a torus and a circle. How to make it concise? (for rewriting to C++).

How would I do it? Simple enoiucgh. The equation of a torus is easy to write in a parametric form, so as a function of two angle...

2 days ago | 0

new interface for QR decomposition in Matlab 2022a

Yes. You are correct, in that QR now returns only the upper triangular factor. A = rand(5,3); result = qr(A) In the release h...

2 days ago | 0

Polyfit coeffs weird output

You don't really need to show anything more than this: [p,s] = polyfit(x1,y,15); A degree 15 polynomial. That means the equati...

2 days ago | 1

| accepted

how to derivate an equation of x and y without taking any variable constant?

Specify that y is a function of x. You o so like this: syms y(x) Now you can differentiate that expression with respect to x. ...

3 days ago | 1

while loop keeps running forever

I think you seriously need to spend some time with the MATLAB tutorials. while is not terminated by endwhile A while loop is n...

3 days ago | 1

Power of a binary matrix

This is really pretty simple. Far simpler than you might think. You want to do a powermod operation, on a matrix, so mod(...

3 days ago | 1

| accepted

Submitted

minkowskiSum

Compute the Minkowski sum of any two polygons or polyshapes, convex or concave.

4 days ago | 2 downloads |

Generalized Minkowski Sum calculation

https://en.wikipedia.org/wiki/Minkowski_addition The convex case is quite simple to solve. I could write code for that in a few...

4 days ago | 2

| accepted

I need a graph to be smooth

You asked this question before. I answered it. In fact, you even show the code I wrote. And you accepted my answer then as I rec...

5 days ago | 0

Why does Matlab's divisors function take so long when working on an ordinary integer?

You ALWAYS. ALWAYS. ALWAYS need to consider the arguments for a function. Does it work in double precision, or as a sym? Don't f...

5 days ago | 0

boundry value third order problem

I don't know if this is homework. But it possibly is. So I'll just point you in a decent direction. And if you are going to sol...

5 days ago | 1

Normalizing a set of data to zero

Do you want ALL of those minima to be zero? If so, then you will need to do something especially artful. If all you want is the ...

6 days ago | 0

Random 3D Array of Cylinders with Random Rotation and Fixed Length

THERE IS NO SIMPLE SOLUTION. Accept that. For example, even for as simple a problem as random sphere packing, where you want to ...

6 days ago | 0

Why my polynomial function is wavy

A simple rule applies: Polynomials oscillate. Not infinitely many times. But this is a fundamental nature of polynomials. As the...

6 days ago | 0

| accepted

NEED URGENT HELP! Code keeps returning the desired variables as empty 0x1

Must a solution exist for all problems? No. Of course not. Those empty syms are a signal that MATLAB was unable to solve your pr...

7 days ago | 0

Trying to find area under my plot

You don't give your data. You show only a plot. So make a polyshape of it. Then compute the area. t = linspace(0,2*pi,50); x =...

7 days ago | 0

Replacing special character 'É' to 'E'

Easy peasy. str = 'ABCDEFGHIJKÉÉÀÀÄÄabcdefghijkl' strrep(str,'É','E') If there are other special characters you want replaced...

7 days ago | 0

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 ...

8 days ago | 1

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. ...

8 days 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...

9 days 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...

9 days 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...

9 days ago | 0

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; ...

9 days 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...

9 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 ...

9 days ago | 0