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.
Statistics
62 Files
Cody HighlightsRANK
11
of 283,652
REPUTATION
20,521
CONTRIBUTIONS
15 Questions
7,278 Answers
ANSWER ACCEPTANCE
46.67%
VOTES RECEIVED
4,424
RANK
4 of 19,154
REPUTATION
64,111
AVERAGE RATING
4.80
CONTRIBUTIONS
62 Files
DOWNLOADS
1331
ALL TIME DOWNLOADS
577771
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
1 Highlight
AVERAGE NO. OF LIKES
8
Content Feed
How to use MATLAB to complete the rank of a matrix?
Trivial. Replace the offending columns with vectors of random numbers. DONE. With probability 1, the result will be full rank. ...
13 hours ago | 0
how to solve a simplified 2D trajectory problem with defined points and derivatives
I think what you are missing is the time required to perform this movement between points. You have specified the start locati...
1 day ago | 1
| accepted
How to count the occurrence of numbers in certain value range (show 0 if no occurrence)
The simple answer is you want to use the wrong tool. Yes, it looks like you want to use groupcounts. But you don't. P=[1 1 3 4 ...
1 day ago | 0
| accepted
How to extrapolate the first 5 points
load points.mat x = points(:,1); y = points(:,2); i1 = 1:5; i2 = 6:336; plot(x(i1),y(i1),'ro',x(i2),y(i2),'g.') I have no ...
2 days ago | 0
What is the mechanism or math behind the function islocalmax(A)?
Someone who is not an employee of TMW cannot see the code. (I can't, as I am not an employee.) And if someone is an employee, th...
3 days ago | 1
| accepted
how to find data points of function passed through a distorted "pipe"?
A difficult question to answer, since so much is left to guess. And the vaguesness of your question suggests all you want is a r...
3 days ago | 0
| accepted
How can we solve an equation if it has infinite number of solutions?
Can you ALWAYS find all solutions to a problem in some interval? NO. Sometimes, the use of returnconditions will help, since it ...
3 days ago | 0
Converting from symbolic to numerical data
Do you understand that sin and cos assume RADIANS, NOT degrees? But you are substituting in angles that are clearly in terms of ...
4 days ago | 1
| accepted
How can I make a vector that looks like this [2 1 2 1 1 4 1 1 6 1 1 8...1 100 1]?
If I had to guess, you might want to do this: V = ones(1,151); V(1) = 2; V(3:3:end) = 2:2:100; V The last few elements of...
4 days ago | 1
MATLAB, draw tolerances in a plot similar to errorbar in matlab, but perpendicular to points in the curve.
You can want code to do as you want, but it won't help. And there is no version of errorbar that will do as you want. This means...
7 days ago | 0
New to matlab, trying to understand basic functions still
If you are this new to MATLAB, then you seriously need to spend some tie reading the tutorials available. The MATLAB Onramp is ...
8 days ago | 0
ITERATIVE SOLUTION OF ONE UNKNOWN VALUE IN AN EQUATION
Hint: try solving for t. syms x y t tsol = solve(x == cos(t) - y*sin(t),t) So there are two solutions. Much of the time, a f...
9 days ago | 0
| accepted
Unable to find explicit solution
It is not just that MATLAB could not solve it. In fact, it is trivially easy to write down equations where there is no algebraic...
9 days ago | 0
| accepted
Using biterr with negative numbers
Did I not just answer how to solve essentially the same problem, but in the other direction? Read my answer to your last questio...
11 days ago | 0
Do you know how to convert existing graph into coding. I don't have the equations. I have the graph picture in my textbook but i need it to include in my matlab apps
I'm sorry. There is no magic way to know the formula of a given graph in a textbook. And no magic way to just turn that graph in...
11 days ago | 1
How do I generate a random number vector composed of just 1 and -1
The trick is always to start with something you can do, and see if there is a way to modify it so it will work. For example, yo...
11 days ago | 1
I am a university student and this is my university email: redacted@eng.zu.edu.eg Can I get Matlab for free? If possible, how do I get the activation key?
I assume you are a student in Egypt, given the address. MATLAB is not offered for free. However, you need to contact your unive...
12 days ago | 0
Solve these equations to get x and y in normal number
USE DOUBLE. You already saw that in the answer to your last question. syms x y equ1 = 2760*sind(200)+x*sind(107.5)+y*sind(307....
12 days ago | 0
How to deal with the Hermitian matrix that is meant to be positive semidefinite but turned out to have negative eigenvalue due to numerical issues?
This is not a question of a precision you can set. You can download my nearestSPD function from the file exchange. It finds the...
13 days ago | 1
| accepted
i was calculate using gauss jacobi method with 4x4 matrice, why does NaN appear? what should i do?
You write a function that allows you to pass in A and B, but then you define A anb B in the function? Sigh. I think you do not u...
13 days ago | 0
Graphing changing constants using for loops
Why do you think it is not? Ok, there are multiple problems in your code. First, maybe I should ask what you think this line do...
14 days ago | 0
| accepted
Best practice: should a function return a row vector or a column vector
Let me disagree with a basic assumption of your question, in that there must be some best practice at all on this. Instead, I'll...
15 days ago | 2
I don't understand why this script is outputting imaginary values
Hint: the log of a negative number is imaginary. Hint: The sqrt of a negative number is imaginary. Do you take logs in there?...
15 days ago | 1
I need help figuring out the mistake in my function approximation
Avoid the use of the normal equations as you used, i.e., this crapola that you called the least squares method. Backslash is jus...
16 days ago | 0
quadratic curvature doesn't went smoothly
load steam % Fit a first degree polynomial to the data. [p s]= polyfit(x,y,2); y1=polyval(p,x); % PLOTTING DATA plot(x,y,'o...
18 days ago | 0
surf for n-dimensional cartesian matrix
You cannot do so. That makes no sense at all, sorry. You actually have a FOUR dimensional problem, thus W(x,y,z). This is beca...
19 days ago | 0
problem with symbolic factorization with two symbols
That you want to see a simple set of factors is not relevant. You essentially need to obtain the roots of this cubic polynomial ...
21 days ago | 1
| accepted
fmincon: optimize till nonlinear condition is false
It does not just skip" the interval. It probably never saw it. An optimizer does not plot your function. It has no clue what it ...
22 days ago | 1
Save text of script in .mat file?
Is it really a common problem? Not that I've ever seen any need for in 35 years of MATLAB use, nor in any question I can recall ...
25 days ago | 0
The function ''vpasolve'' cannot find a solution with specified range even if its option 'random' was set to true, however the specified range does include 1 solution.
d1=-8;d2=-1;d3=6; t1=2.2187;t2=1.2392;t3=1.4223; v=6.038;a1=v*t1/2;a2=v*t2/2;a3=v*t3/2; c1=d1/2;c2=d2/2;c3=d3/2; b1=sqrt(a1^...
25 days ago | 1