Community Profile John D'Errico

Retired

Last seen: Today Active 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.

Statistics

All
• • • • • • • • • • • • Content Feed

View by

Finding all local/global minima of an Optimization Problem
Do you understand there are infinitely many such equivalent solutions to that problem, not just TWO? And, while I'd like to writ...

alrededor de 12 horas ago | 0

how to make a vector z that consists of odd-indexed entries of y (y=[100:1])?
A very confusing question. I'll take a wild guess. If this does not answer your question, then you need to be FAR more lear. y ...

alrededor de 12 horas ago | 0

Is applying a binary operator (+,-,*,/) to char arrays supported by MATLAB or just a "trick"
The plus operator has long been supported, as it applies to character arrays. I recall it existing for as long as I go back usin...

alrededor de 12 horas ago | 0

| accepted

if statement for every possibility
Ok. Let me see if I understand. A wierd number x is a positive integer, such that given the set of proper divisors of x (that is...

alrededor de 24 horas ago | 2

random matrix with a minimum number difference for adjacent numbers accepted
Let me start out by saying it is a terrible idea to use max and min as variable names. Your next anguished question will be why ...

1 día ago | 0

| accepted

How to solve for unknown function in integral equation?
One idea can lie in the use of a family of functions the decompose the unknown f. Choose an orthogonal family over the chosen do...

1 día ago | 0

Numeric derivative with multiple variables
Here is a simple trick to remember. See how I used da1 and da2 below. f = @(a) sin(a(1)) + cos(a(2)) + a(1) - 2*a(2); a0 = [...

1 día ago | 2

| accepted

Is there any easy way to calculate integral with cylinder coordinates in Matlab numerically?
It seems pretty easy. Go back to calc 101. Maybe 102. WTP? For example, what is the integral of z*(x^2+y^2), over a unit cylind...

1 día ago | 0

| accepted

How to get multi-solution using 'lsqnonlin'?
lsqnonlin is a numerical optimization tool. It iterations fro mthe start point to a solution. And the solution you get is depend...

1 día ago | 1

What can I use instead of 'lsqcurvefit'
A solver CANNOT know if it is in the global minimum or a local minimum. Even a putatively "global" solver cannot be certain exce...

3 días ago | 0

What is the meaning of sol(31,: ,1)
Do you understand indexing? Perhaps you really need to start with a tutorial, the Onramp tutorials may be a good place to start....

5 días ago | 0

| accepted

How to show an answer in decimal
a = 0.25; b = 0.5; T = 0.07; k1 = 0.6; k2 = 0.55; k3 = 1; sympref('FloatingPointOutput',true) syms s ; expr =(T.*s+k2)....

6 días ago | 0

A very strange problem
I suppose this is a subtle problem that bears explanation. D0=1;D1=1; f='@(dt)[(-D0)*dt^0.5+(-D0*D1)*dt^1.5/2;1/2*(-1+(1)+(2*D...

7 días ago | 0

| accepted

MatLab single precision epsilon versus double precision epsilon
By the way. I am 100% sure that MATLAB's machine epsilon is correct for both single and double. :) One subtle issue lies in the...

7 días ago | 0

| accepted

A matlab function is not running. Can someone help me?
No problem. It runs fine, using EXACTLY the code you posted. I will point out that when you report an error, please report the ...

7 días ago | 0

| accepted

Time arithmetic (no dates)
4:30 is not a number. In order for you to work with something like that, you need to first convert it to a vector of TWO numbers...

7 días ago | 0

Is it possible to create a modular equation solver?
Is it possible? Um. sure. Virtually anything is possible. But having lots of things in separate m-files is a bad idea here. Now ...

7 días ago | 0

Excluding 0.5 from rounding
You cannot do this. That is, there are only a few specific classes of rounds you can do, embodied in round, fix, floor, and ceil...

8 días ago | 1

| accepted

Where is the library ?
There are two hits I found for quaternion.m. One is one the file exchange, where you can download it. https://www.mathworks.com...

8 días ago | 0

I am trying to find values of four constants from four equations. Yet the code is unable to give out values
When will people learn to use vectors instead of numbering their variables? And learn to use semicolons on your lines, in the ri...

8 días ago | 0

How to fit an uniform distribution to a histogram?
If you have histfit, then you would also have unifit. data = unifrnd(-100,100,1000,1); [AHAT,BHAT,ACI,BCI] = unifit(data) his...

8 días ago | 0

| accepted

The lowest distance of two points on two curves
PDIST, from the stats toolbox can compute the set of all interpoint distances between two sets of data. Then you could just take...

8 días ago | 0

how to use betafit for a data that is outside the range of 0 to 1.?
You essentially have a 4 parameter beta distribution that you wish to fit. That is, the upper and lower limits can be part of it...

8 días ago | 0

| accepted

If z is a vector , what is the difference between angle(z) and atan2(z)
Perhaps you did not use atan2 properly. Consider this example: z = [1+i,1-i,-1+i,-1-i]; angle(z) atan2(imag(z),real(z)) If y...

9 días ago | 0

| accepted

I use MATLAB 2013a because of some specific set of programs used in office only works on this version -- wont work in any other version
Um, not really. Your question is far too general of course for any specific answer. But you cannot just set some flag that tells...

9 días ago | 0

| accepted

How does Matlab perform large integer modular arithmetics using Symbolic Math Toolbox?
You won't get the exact algorithms. MathWorks does not hand out their internal code for this sort of thing, unless you have a jo...

9 días ago | 0

How to do symbolic interpolation in matlab?
You cannot define a symbolic spline. At least not in MATLAB. Could you write such a code? Well, yes. But you would need to under...

10 días ago | 0

Calculating the shortest distance of any given coordinate point to the line y=3x+2
You have done a fair amount. Surely you could just look online. https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line ...

10 días ago | 1

| accepted