Community Profile

photo

John D'Errico


Retired

4 673 total contributions since 2006

Please don't contact me. I won't answer questions.

Contact

John D'Errico's Badges

  • Master
  • Revival Level 3
  • 36 Month Streak
  • Promoter
  • Speed Demon
  • CUP Challenge Master
  • Personal Best Downloads Level 5
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer
  • Creator

View all

Contributions in
View by

Answered
Difference between cumsum and cumtrapz to find area under a curve?
Why should they be the same? They do different things, solving different problems. Is a sum the same thing as an integral? Of c...

2 jours ago | 4

Answered
Distinct sum of 3 variable which ranges between 1-255
As you recognize yourself, if you simply form the sum of three integers, you cannot then recover the original values from only t...

6 jours ago | 1

Answered
How to initialize an array such that the values satisfies an equation
Too bad, in the sense that for smaller L, say on the order of 8 or so, this is not that difficult to do exactly. (I have written...

6 jours ago | 1

Answered
Solving non linear equations sytem
I would reduce this to a 2 variable problem first. That is, use equation 1 to solve for x1. x1 = b1/cos(a1 + x2) Likewise,...

7 jours ago | 1

Answered
sparse to gridded 3-D interpolation
First, should MATLAB use all of the CPU capability? That is difficult in what you are doing, becaue it is not easily parallelize...

7 jours ago | 0

Answered
Regularization for Non-linear fitting with fitnlm.
(Please don't add answers to make a comment. Use comments for that.) But how can you do a simple regularization on the coeffici...

7 jours ago | 2

Answered
185k1*185k Matrix
Think of it like this: If all of the elements in that matrix are non-zeros, then you have 185000^2 ans = 3.4225e+10 So 3...

7 jours ago | 0

Answered
A function to find prime number
Hey, you wrote some code! Credit for that. :-) But what did you do? function isPrime(number) tf=isprime(number); if tf==tru...

7 jours ago | 0

Answered
Question about the tolerance of lsqcurvefit
This is not a problem of lsqcurvefit tolerance. Instead, see that the error makes a statement about INTEGRATION tolerances. That...

7 jours ago | 0

| accepted

Answered
I am trying to integrate IMU and GPS data to find roll of ground vehicle on the same road at different velocities. But, I am getting inconsistent results and an error at higher velocities (45mph) compared to lower velocities(25mph).
The singular matrix suggests why it is you are getting garbage, as once you have that, nothing will likely make any sense. Is th...

8 jours ago | 0

Answered
Linspace with varying increment
The problem is, vendor provided software cannot work like that. You have descibed several cases of potential interest to you, fr...

8 jours ago | 1

Answered
Linear Constraint based on two variables fmincon
Why, if you already have other inequality constraints, is this a question? And how you wrote it, using A is inconsistent with yo...

8 jours ago | 1

Answered
I need to solve an equation involving squares and cubes.
You have many values for both d and p? Do you want to solve it for all combinations of d and p? Anyway, first, I would recogniz...

9 jours ago | 1

Answered
decrease calculation accuracy to speed up running time
You essentially cannot do what you want, with one small caveat. That is, you canot arbitrarily tell MATLAB to do all computation...

9 jours ago | 3

Answered
how to plot an ellipse having her equation?
First, learn how to write a function. fun = @(x,y) x.^2 / 25 + y.^2 / 9 - 1; Note the use of the .^ operators. They will be im...

9 jours ago | 0

Answered
Unable to predict data well enough
I would point out that your code shows you using the first SEVEN data points, not the first 10, despite your claim otherwise. n...

9 jours ago | 0

Answered
how can i find the intersection point between the vertical lines and the curve (xmin,ymin) ?
The red curve is a piecewise linear interpolation, not really a curve, just connect the dots by the plotting routine. The green...

10 jours ago | 1

| accepted

Answered
lsqcurvefit: is the output of this function unique for a given set of initial conditions (and deterministic model)?
The problem is, that is not your code. Not all of it. That is just how you call lsqcurvefit. We do not see the pandemic1Dall2 co...

10 jours ago | 1

Answered
change a logical array value based on the index of another matrix
If you want to create x on the fly, then just do this: x = A > 4; If you for some reason really want to modify an existing vec...

10 jours ago | 0

| accepted

Answered
What's the meaning of instrucment sound in Matlab?
Let me just answer this as if you asked for an explanation of what a sound is in the world of MATLAB. For example, if we try: l...

11 jours ago | 0

Answered
vector to upper and lower triangular matrix
What you fail to see is that while your code works for a 3x3 matrrix, it must always fail for any n other than n==3. You want t...

11 jours ago | 0

| accepted

Answered
double differentiation and double integration of sine wave
This is not a question about MATLAB, just understanding some basic mathematics. At least, understanding calc 101. First, you ne...

12 jours ago | 0

Answered
Diagonal/Symmetric matrix
I don't even think your code works for a 3x3 matrix. The matrix it produces is OD OD = 81 23 18....

12 jours ago | 0

| accepted

Answered
How do I open a pcode (.p) file created in a version older than MATLAB R2007b? My Matlab version is R2018b.
You cannot edit a .p file, if that is what you mean by open. That is true in any version. If the .p file is too old, but you s...

13 jours ago | 0

Answered
How to transfer a Matlab toolbox I have in my machine to the machine of a colleague ?
If this is a toolbox that you have purchased from Mathworks, you cannot give it to someone else. If this is a toolbox you have ...

13 jours ago | 0

Answered
For loop for matrix division
Why would you want to use any loop at all? For example, if A is an mxn matrix, and V is a vector of size mx1, then consider what...

13 jours ago | 0

Answered
Can someone explain the concept of B= null(A) in simple words?
Think of A as a vector pointing someplace in a 5 dimensional space. Got that? It points somewhere. Now, in 5 dimensions, we co...

15 jours ago | 1

| accepted

Answered
How to get more decimal places in my output?
In fact, it does NOT neglect that term. It is in there, just too small for you to see in only 4 decimal places. help format Yo...

15 jours ago | 1

Answered
How to remove last characters from String using mod?
It is generally a bad idea to use names for variables that are already useful function names. So here rem is one such bad idea. ...

16 jours ago | 2

| accepted

Answered
Random sampling of elements from an array based on a target condition in MATLAB
Are you looking for an exact match to V1? An approximate sum equal to V1? If so, then how close of a tolerance do you need? Is ...

16 jours ago | 1

Load more