# 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. Anyway. I won't answer questions. PERIOD. I don't do your homework. I won't do consulting by mail.

**Statistics**

RANK**11**

of 275 786

REPUTATION**19 634**

CONTRIBUTIONS

**14** Questions

**6 941** Answers

ANSWER ACCEPTANCE **
35.71%
**

VOTES RECEIVED**4 228**

RANK**4** of 18 575

REPUTATION**63 102**

AVERAGE RATING**4.80**

CONTRIBUTIONS**62** Files

DOWNLOADS **1561**

ALL TIME DOWNLOADS**568328**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**1** Highlight

AVERAGE NO. OF LIKES**8**

**Content Feed**

Why can't the index variable of a for loop be stored in a structure or other array?

Surely this is not a big problem? for ind = 1:10 status.ind = ind; % do Stuff end

ungefär 12 timmar ago | 0

is there any way to get a 2nd order polynominal through 2 points(each end point)

You want to fit a 2nd degree polynomial through two points? Of course only a straight line would work there through two points, ...

ungefär 12 timmar ago | 1

Is there an option to overwrite the old release when installing a new one?

I'll admit, I typically have 3 to 6 releases, and usually at the high end of that scale. They are useful to me in case I might w...

ungefär 13 timmar ago | 0

Volume of retinal lesion

It seems clear. You have multiple slices. Compute the area of each slice. At that point, you could just sum the area of each sli...

ungefär 17 timmar ago | 0

Plot complex signal with imaginary and complex

n = 2000; t = linspace(0,500,n); Signal = cos(t/10) + i*sin(t/10); % a simple signal, as a function of time. plot3(t,real(S...

ungefär 19 timmar ago | 0

Simplex optimisation using fminsearch

You are still looking for help on this? There is ABSOLUTELY no need to use a simplex optimizer for this problem. NONE AT ALL. L...

ungefär 21 timmar ago | 0

3rd order approximation solving for variable

x = (0.2:0.2:0.8); y = [.3168, .7404, 1.3736, 2.2692]; format long g p = polyfit(x,y,3) So, to within floating point trash...

en dag ago | 0

| accepted

General variable creation question

Don't generate a zillion variables. Instead, learn to use arrays. Cell arrays, structs, multi-dimensional arrays. This will leav...

en dag ago | 0

How can I make a 3d plot with two equations and one variable?

By the way, there is NO reason to define f as symbolic, and then assign the number 0.0405 to f. f is now double preicsion. syms...

en dag ago | 0

Solving an equation gives me three possible answers. How can I reference only one of these answers?

syms v f eta; f=0.0394; f = 0.0394; eqnvel = (9.801-3.802*v)*v*eta==(((f*200*(pi/4)*0.1^2)/6.434)+((27*(pi/4)*0.1^2)/64.34))*...

en dag ago | 1

| accepted

Expanded use of .* operator

R2016b No need for access. That is when it appeared. Before that, bsxfun was needed. bsxfun appeared in R2007a. Before that, w...

en dag ago | 0

| accepted

Problem with convergence using newtons method

First, you CANNOT prove that Newton's method has quadratic convergence using any existing function, or any such piece of code. ...

en dag ago | 0

How to specify a domain of x and y values for a graph?

Did you read the help for fsurf? What does the second argument do? help fsurf syms x y f = y^2*(...

en dag ago | 0

| accepted

I would like to plot the possible solutions (x, y, z) of the following equation system: dn^2=(x-xn)^2+(y-yn)^2+(z-zn)^2 where n=1 to 3 and dn, xn, yn, zn are known

You have 3 spheres, with known centers and radii. Expand those equations. Then subtract them from each other. So maybe Eq1-Eq2...

en dag ago | 0

f(x)=0 matlab code for fixed point

You have been given a function f(x), and you now want to write a fixed point solver that will first, automatically create g(x) b...

2 dagar ago | 0

| accepted

How to prevent MATLAB from using parallel calculations for QR factorization?

https://www.mathworks.com/matlabcentral/answers/103133-how-can-i-limit-the-number-of-computational-threads-used-by-matlab-in-mat...

3 dagar ago | 0

How to make a linear regression coefficient algorithm

Why do you want to write your own linear regression code? This is generally a bad idea. Never write code to do what a profession...

3 dagar ago | 0

Populating off-diagonal blocks of diagonal matrix and making it sparse

There are several mistakes you seem to be making here, surprising if you have been reading a lot about sparse matrices lately. ...

3 dagar ago | 0

lsqnonlin initial conditions (transcendental equation)

This does not make sense. x_data = importdata("x_data.mat"); x_data Your x_data vector is identically constant values. uniqu...

4 dagar ago | 0

Philosophical question: How to get a vector from the output of solve? Why isn't it a vector already?

I tried it with a vector, wondering if that might make solve work more easily. And it does work. A = magic(3); X = sym('X',[3,...

4 dagar ago | 0

Why does fmincon using the sqp algorithm need a full matrix to specify linear constraints?

This sounds like a good excuse for a feature request to me. However, my gut tells me there is a technical reason in the algorith...

4 dagar ago | 0

How to build a function fun that takes as input the matrix A and as output provides the matrix B which is produced out of A in the following ways.

Possibly homework. (I never trust simple problems like this, where the goal is simply to move thigns around in a matrix. They ar...

4 dagar ago | 0

How to get numerical values of nonlinear implicit function?

This is far easier then you may think. Um, trivially so. Just solve for t, as a function of y. Pencil and paper suffice for that...

4 dagar ago | 0

How to write the equation in matlab I= A A* T² exp (qob/kT) exp (q(V - Rs I /kT)) (exp (-1/n) ? Why is the curve not shown in the drawing?

n=5.2; %Ideality factor A =8.16; %Richardson constant q = 1.602e-19; % electron charge K = 1.380e-23; %Boltzmann constant...

5 dagar ago | 0

How to find a point on this plot?

X = [-205078000000000.00 -190430000000000.00 -175781000000000.00 -156250000000000.00 -141602000000000.00 -117188000000000.0...

5 dagar ago | 0

| accepted

How to find a coordinate of a circle with a given equation tangent to the circle

You (apparently) want to find the circle of radius 4, with center at (0,y0), where y0 is unknown, that is tangent to the curve. ...

5 dagar ago | 0

| accepted

Fsolve can't solve this simple nonlinear equation

c = 3; eq = @(z) c - (z.^3/3 - z); [xsol,fval,exitflag] = fsolve(eq,0) fplot(eq,'b') hold on plot(xsol,fval,'rs') grid o...

5 dagar ago | 2

| accepted

Unrecognized function or variable 'imnoise2'.

which imnoise2 -all We cannot help you to use a function that does not exist as part of MATLAB, Possibly, the code you are usi...

5 dagar ago | 0

how to construct this in matlab? can anyone explain step by step?

One line of code. The explanation is right there. If you want more depth, the read the doc for jacobian. The good thing is, MATL...

5 dagar ago | 0

Colon syntax for creating a sequence of numbers that skips a given number?

You can't, at least not directly. But it is quite simple. For example: setdiff(1:10,3) % 1:10, missing 3 There are probably ot...

5 dagar ago | 0