Community Profile

photo

John D'Errico


Last seen: Today

Retired

5.713 total contributions since 2006

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.

Contact

John D'Errico's Badges

  • Revival Level 4
  • Master
  • 36 Month Streak
  • Quiz Master
  • Promoter
  • Speed Demon
  • Top Downloads 2020
  • Top Downloads 2019
  • Personal Best Downloads Level 5
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Thankful Level 4
  • Knowledgeable Level 4

View all

Contributions in
View by

Answered
Can I change a 3-tensor into a matrix by indexing with a matrix?
A = randn(4,4,3) % Not very creative in making up numbers. So sue me. :) [~,I] = min(abs(A),[],3) What is I? For every combina...

circa 3 ore ago | 1

| accepted

Answered
Newton Raphson Method not solving
This answer is here just to add some information. I try to teach that one should always plot everything, then look at what they ...

1 giorno ago | 0

Answered
How do I fit along the curve.
Why would there be code written to do something completely strange? Well, perhaps I should not call it strange, but your idea of...

1 giorno ago | 0

Answered
Interpolation error for one column increasing and one column decreasing
This is impossible to answer, since what you show is clearly not what you have. The error that is given indicates the vector (x...

2 giorni ago | 1

Answered
How can I test a long function in Matlab?
Don't test your long function. Because you should be writing SHORT functions. Then you can test each piece, verify it works as d...

2 giorni ago | 0

Answered
Simple limit returning NaN: f(x) = exp(-1/x)
Think of it like this. For a limit to exist at x==0, it MUST have the same limit as x approaches 0 from above, as it does when x...

2 giorni ago | 1

| accepted

Answered
Continuity of a function in a interval
It may seem basic to you. However, that just means you need to understand computing and floating point arithmetic. Nope. In fac...

3 giorni ago | 0

Answered
How to stop MATLAB from opening every time I switch on my computer?
This is not MATLAB that is your problem, but your MAC, and what you apparently told it to do. :) You have MATLAB set as a start...

3 giorni ago | 0

Answered
understanding "<" operator line
In order to understand this, I'd STRONGLY recommend you do the MATLAB Onramp tutorials. Try some examples. Look at what happens!...

4 giorni ago | 0

| accepted

Answered
Logical indexing of table failing
No. You do NOT know it contains 0.35. In fact, MATLAB cannot represent 0.35 exactly in floating point arithmetic. This is for th...

4 giorni ago | 0

Answered
Summing using simspons rule for a given range
If I might suggest, your goal is actively a poor one. Why? Simpson's rule is a higher order rule. It tries to give you a higher...

5 giorni ago | 0

Answered
Successive over-relaxation of Laplace equation is converging to slightly wrong value. Floating-point error or code error?
To understand what is happening, you need to first understand what the equations represent! Is this effectively a partial diffe...

5 giorni ago | 0

Answered
How can I find the eigenvalues of an n-by-n matrix using For Loops?
Simpler than what Matt has suggested is to just use matrix multiplication, coupled with deflation. That is, can you find the LA...

6 giorni ago | 0

Answered
Linear approximation of data set's points.
Don't do it that way!!!!!!! You cannot achieve a continuous piecewise linear function that way. Instead, use a tool designed to ...

6 giorni ago | 1

Answered
Matlab integration of numerical data
In order for it to be truly general, you will need to interpolate the "function". For example, we might do this: x = 0:10; y =...

6 giorni ago | 0

Answered
How to select complementary elements from a vector?
d = [3 2 1 5 6 7 8 9 0]; I = [1 3 7]; setdiff(d,I) Note that your example is actually incorrect, in that you claim 7 should...

7 giorni ago | 0

Answered
Applying Newton's Method to Sound Level Equation
Since we cannot solve it directly.... Are you absolutely positive of that? L0 = 80; beta = 32.2; L = 20; syms r solve(L0...

8 giorni ago | 0

Answered
Output all possible results on a 7 equation system
First, it can be proven that not all mathematical equations of this sort can be "solved". This goes back as far as Abel-Ruffini....

8 giorni ago | 1

| accepted

Answered
solving equations with trigonometric functions
Note that x1, x2, x5, x6 are just NUMBERS. Defining them as syms in advance does nothing. MATLAB is a language with dynamic vari...

8 giorni ago | 1

Answered
error in matrix multiplication while solving system of differential equations
What you do not understand is that the exponential function is exp. Thus, instead of writing e^(-t), you write exp(-t). Next, y...

8 giorni ago | 0

Answered
How to solve an optimization problem over two variables using fmincon?
You CANNOT use fmincon on a problem with binary variables or any form of discrete variables. However, IF y is indeed binary, th...

9 giorni ago | 0

Answered
Equation to Matlab code
ALWAYS show what you wrote. Ony you know what you mean by dealing with vectors, etc. In the first case, do you have a vector of ...

9 giorni ago | 0

| accepted

Answered
How to calculate partial area-under-the-curve?
After all of those comments, to be honest, sorry, but you were both working far too hard on a moderately simple problem. Simpl...

10 giorni ago | 0

Answered
How to call fminsearch on my function
Um, you misunderstand the problem. Your function has TWO arguments. PR and PC, both of which you want to be optimized. And while...

11 giorni ago | 0

Answered
Uniform Random Variable PDF
What are you doing wrong? Um, pretty much everything? Sorry, but true. ;) However, you do seem to have made some credible effort...

11 giorni ago | 0

Answered
Solving Exponencial fuction is not returning the right answer
Yes, you THINK the true answer is 3. But it is not. format long g log(2653/2500) / log(51/50) And that is effectively the exa...

12 giorni ago | 1

| accepted

Answered
Solving an inequation of first degree issue
syms x a = 3*x + 21 <= 5*x + 13 asol = solve(a,'returnconditions',true) asol.x asol.conditions It looks like x >= 4 is the ...

13 giorni ago | 1

| accepted

Answered
datetime values appear to be equal but return not equal
format long does NOT tell you every single digit in the number!!!! format long does NOT tell you every single digit in the numb...

13 giorni ago | 0

| accepted

Answered
Distribute data in the form of a circle
You say you want to distribute data, which implies you want to see random numbers, based on some vague, unspecified distribution...

13 giorni ago | 0

| accepted

Answered
Cody Problem 19. Swap the first and last columns
This is NOT a provblem with the Cody problem, but with your code to solve it. First, see what happens when A is 1. I'll show wh...

14 giorni ago | 0

| accepted

Load more