
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. I won't do consulting by mail.
統計
All
Content Feed
回答済み
Matlab simulation for projectile motion
I think I don't understand their not understanding. (Ok, that seems confusing even to me, and I wrote it.) I would just write i...
Matlab simulation for projectile motion
I think I don't understand their not understanding. (Ok, that seems confusing even to me, and I wrote it.) I would just write i...
約11時間 前 | 0
回答済み
Remove algebraic loop without delay
I don't know for sure how Simulink resolves the issue internally, but the answer seems straightforward. Consider the equation ...
Remove algebraic loop without delay
I don't know for sure how Simulink resolves the issue internally, but the answer seems straightforward. Consider the equation ...
2日 前 | 0
回答済み
Mathematical functions across variables
Is there a good reason why you would not just try this? A(1,1) + B(2,1) I think you are coming from a spreadsheet world. And f...
Mathematical functions across variables
Is there a good reason why you would not just try this? A(1,1) + B(2,1) I think you are coming from a spreadsheet world. And f...
3日 前 | 0
回答済み
Draw samples using a Non-Gaussian distribution
I think you don't understand random numbers, AND you don't understand indexing in MATLAB. What does this do? random('poisson',1...
Draw samples using a Non-Gaussian distribution
I think you don't understand random numbers, AND you don't understand indexing in MATLAB. What does this do? random('poisson',1...
3日 前 | 0
回答済み
how does fmincon deal with ill-conditioned problem?
fmincon assumes you know what you are doing. (Is that not a good idea?) It tries to solve what you gave it to solve. Surely that...
how does fmincon deal with ill-conditioned problem?
fmincon assumes you know what you are doing. (Is that not a good idea?) It tries to solve what you gave it to solve. Surely that...
5日 前 | 0
回答済み
Sub-optimal curve fitting, cannot find asymptotic value
I think you do not understand. Estimating an asymptote from data is a problem of extrapolation. It will be strongly dependent on...
Sub-optimal curve fitting, cannot find asymptotic value
I think you do not understand. Estimating an asymptote from data is a problem of extrapolation. It will be strongly dependent on...
7日 前 | 0
回答済み
unbounded in linear programming
First, read the warning message! "Warning: Length of lower bounds is < length(x); filling in missing lower bounds with -Inf." ...
unbounded in linear programming
First, read the warning message! "Warning: Length of lower bounds is < length(x); filling in missing lower bounds with -Inf." ...
7日 前 | 0
回答済み
Problem 2022. Find a Pythagorean triple
A simple enough solution... isTherePythagoreanTriple(1,2,3,4) isTherePythagoreanTriple(3,4,5,6) isTherePythagoreanTriple(12,1...
Problem 2022. Find a Pythagorean triple
A simple enough solution... isTherePythagoreanTriple(1,2,3,4) isTherePythagoreanTriple(3,4,5,6) isTherePythagoreanTriple(12,1...
8日 前 | 0
回答済み
I don't know why you're saying it's an invalid expression. Help me
You NEED to learn about the dotted operators, thus .*, ./, and .^ operators. When x is a vector, for example, this: x = 1:5 ...
I don't know why you're saying it's an invalid expression. Help me
You NEED to learn about the dotted operators, thus .*, ./, and .^ operators. When x is a vector, for example, this: x = 1:5 ...
9日 前 | 0
回答済み
How can I simplify the symbolic expressions?
clear clc syms q_bar delta_o theta1 theta2 q S CL_alpha CL_delta b e KT eqn1 = (2*theta1 - theta2 - q_bar.*theta1 + q_bar.*th...
How can I simplify the symbolic expressions?
clear clc syms q_bar delta_o theta1 theta2 q S CL_alpha CL_delta b e KT eqn1 = (2*theta1 - theta2 - q_bar.*theta1 + q_bar.*th...
10日 前 | 0
| 採用済み
回答済み
series computing is faster than parallel computing using parfor
There is no assurance that a parallel code will be faster than any specific serial code. ABSOLUTELY NONE. In fact, I can easily ...
series computing is faster than parallel computing using parfor
There is no assurance that a parallel code will be faster than any specific serial code. ABSOLUTELY NONE. In fact, I can easily ...
11日 前 | 0
回答済み
Elevar un polinomio al cuadrado
Easy enough. g = [3/2 -1/4 -1/3]; gsym = poly2sym(g); gsym^2 And as you know, it squares the polynomial, but does not expand...
Elevar un polinomio al cuadrado
Easy enough. g = [3/2 -1/4 -1/3]; gsym = poly2sym(g); gsym^2 And as you know, it squares the polynomial, but does not expand...
12日 前 | 0
| 採用済み
回答済み
Optimization of a matrix with integers with nonlinear objective functions and nonlinear constraints
You are correct, in that fmincon does not provide integer constraints as an option, and that a tool like intlinprog does not all...
Optimization of a matrix with integers with nonlinear objective functions and nonlinear constraints
You are correct, in that fmincon does not provide integer constraints as an option, and that a tool like intlinprog does not all...
12日 前 | 0
回答済み
Newton Raphson Method: while loop
There are many, MANY ways to stop a while loop. For example... tol = 1e-8; err = inf; iter = 0; itmax = 100; while (abs(err...
Newton Raphson Method: while loop
There are many, MANY ways to stop a while loop. For example... tol = 1e-8; err = inf; iter = 0; itmax = 100; while (abs(err...
12日 前 | 0
回答済み
Best way to count outputs for a 2D polynomial function along the curve of an implicit equation
Um, good luck at doing it at all well. Even anything in the right ball park would be a success. But you won't know how well you ...
Best way to count outputs for a 2D polynomial function along the curve of an implicit equation
Um, good luck at doing it at all well. Even anything in the right ball park would be a success. But you won't know how well you ...
13日 前 | 0
回答済み
Different Nonlinear Equality and Inequality Constraint Tolerances
As @Torsten said, the answer is a simple one. No. But sometimes, no can be a fuzzy word. :-) For example, suppose I have two co...
Different Nonlinear Equality and Inequality Constraint Tolerances
As @Torsten said, the answer is a simple one. No. But sometimes, no can be a fuzzy word. :-) For example, suppose I have two co...
13日 前 | 1
| 採用済み
回答済み
Converging on local minima using ga(). Ways to increase odds of finding global minima.
So big problems take time. Should this be a surprise? More time invested can be a gain, since here it will improve the ability o...
Converging on local minima using ga(). Ways to increase odds of finding global minima.
So big problems take time. Should this be a surprise? More time invested can be a gain, since here it will improve the ability o...
13日 前 | 1
回答済み
Name of islocalmin algorithm
You can read about it here: islocalmin But is there a specific "algorithm" that can be named? It seems a pretty simple algorit...
Name of islocalmin algorithm
You can read about it here: islocalmin But is there a specific "algorithm" that can be named? It seems a pretty simple algorit...
14日 前 | 0
| 採用済み
回答済み
Detrending still leaves a slope
It depends on how you define detrend. Clearly, you have a different definition from me, at least, as well as the author of the f...
Detrending still leaves a slope
It depends on how you define detrend. Clearly, you have a different definition from me, at least, as well as the author of the f...
14日 前 | 1
回答済み
Operator '*' is not supported for operands of type 'function_handle'.
Too many errors in this code to list them all out. Starting at the beginning... eta_0 = 1 % Initial value of eta That line doe...
Operator '*' is not supported for operands of type 'function_handle'.
Too many errors in this code to list them all out. Starting at the beginning... eta_0 = 1 % Initial value of eta That line doe...
14日 前 | 1
| 採用済み
回答済み
Why does it take MATLAB so long to print hello world?
To me, this all seems to be making a mountain out of a mole hill. Yes, if you are going to launch MATLAB, even with no gui inte...
Why does it take MATLAB so long to print hello world?
To me, this all seems to be making a mountain out of a mole hill. Yes, if you are going to launch MATLAB, even with no gui inte...
15日 前 | 0
回答済み
3D surface triangulation
What is the problem? Just delete any triangles with edges that are long. Since the CRUST code will span that hole, any triangles...
3D surface triangulation
What is the problem? Just delete any triangles with edges that are long. Since the CRUST code will span that hole, any triangles...
16日 前 | 0
回答済み
How to obtain curve fitting tool startpoints using code? Replicate Curve Fitter Toolbox
I'm sorry, but there is no magic. If you do not supply start points, then fit uses random numbers. This actually has SOME amount...
How to obtain curve fitting tool startpoints using code? Replicate Curve Fitter Toolbox
I'm sorry, but there is no magic. If you do not supply start points, then fit uses random numbers. This actually has SOME amount...
16日 前 | 0
| 採用済み
回答済み
When does an anonymous function reach a specified value?
Since you do not provide a value for a, there is no numerical solution possible. However, as long as the function is a simple ...
When does an anonymous function reach a specified value?
Since you do not provide a value for a, there is no numerical solution possible. However, as long as the function is a simple ...
16日 前 | 1
回答済み
How to define partial fraction expansion?
You already know about the existence of the function residue.m. Therefore your question is truly to "explain the development" ...
How to define partial fraction expansion?
You already know about the existence of the function residue.m. Therefore your question is truly to "explain the development" ...
16日 前 | 0
回答済み
Determine adjacent points in a logical matrix
Trivial. Learn to think in terms of MATLAB operations. I've added another 1 in there, just to make it clear what the problem is....
Determine adjacent points in a logical matrix
Trivial. Learn to think in terms of MATLAB operations. I've added another 1 in there, just to make it clear what the problem is....
17日 前 | 0
| 採用済み
回答済み
How to automatically find the function that linearizes another function.
If, given the function f(x), your problem is simply to find a new function g(x), such that f(x)*g(x) is linear, then it is absol...
How to automatically find the function that linearizes another function.
If, given the function f(x), your problem is simply to find a new function g(x), such that f(x)*g(x) is linear, then it is absol...
17日 前 | 0
回答済み
Attempt to execute SCRIPT interp2 as a function:
Did you mistakenly edit interp2, and then save it, after deleting the function header? Are you POSITIVE there is no script by ...
Attempt to execute SCRIPT interp2 as a function:
Did you mistakenly edit interp2, and then save it, after deleting the function header? Are you POSITIVE there is no script by ...
20日 前 | 0
回答済み
Replacing segmented equations within equation with variables
Literally trivial. For example... syms x y z EQ = y/x + sin(x^2/y^2) simplify(subs(EQ,x,y*z))
Replacing segmented equations within equation with variables
Literally trivial. For example... syms x y z EQ = y/x + sin(x^2/y^2) simplify(subs(EQ,x,y*z))
21日 前 | 0
回答済み
fit accuracy using custom equation
First, the model you show is not even a valid expression. The parens don't match up. y=a*log(1+exp(x/b))-c) 2 left parens,...
fit accuracy using custom equation
First, the model you show is not even a valid expression. The parens don't match up. y=a*log(1+exp(x/b))-c) 2 left parens,...
22日 前 | 0