Community Profile

# John D'Errico

### Retired

4,735 total contributions since 2006

View all

Contributions in
View by

Symbolic solution trigonometric equation
Why not try it? syms a b c x >> xsol = solve(a*sin(b*x) + sin(c*x) == 0,x) Warning: Unable to find explicit solution. For opt...

16 hours ago | 0

How do i calculate these 3 unknows in these Equations
Easy enough. syms a b c x y z EQ(1) = a^2 + b^2 + a*b == x^2; EQ(2) = b^2 + c^2 + b*c == y^2; EQ(3) = a^2 + c^2 + a*c == z^2...

17 hours ago | 0

How to create a best fit line for data with an aymptote?
It partly depends on your goal. Do you just want to best estimate the constant asymptote? Or, are you looking for some function ...

2 days ago | 0

selection of n disticnt vector
Easy enough. A = 1:10; index = randperm(10,6); a = A(index(1:3)); b = A(index(4:6)); Since randperm generates samples witho...

3 days ago | 0

how do I write variance in percentage?
A percentage of what? Percentage always implies you are comparing one number to another. That is, suppose you have some variable...

3 days ago | 0

Can I update a toolbox without updating Matlab?
Short answer: No. Long answer: Nnnnnooooooooo. Why not? You can't do it, because then the versions would not be consistent. Ju...

3 days ago | 0

| accepted

Matlab implementation of AlphaZero
Now that I have some free time... I'm pretty sure the answer is no. Alphazero is a tool that was developed that could learn g...

4 days ago | 0

scatter3 error i not understand
Hmm. It took me a minute to see what the answer was from the error that was generated. scatter3(X,Y,Z,P) Error using scatter3 ...

4 days ago | 1

How can I write a function for this
Use plotregion, found on the file echange. https://www.mathworks.com/matlabcentral/fileexchange/9261-plot-2d-3d-region Note th...

4 days ago | 0

Getting the linear portion of a non-linear curve
As is often the case on a question like this, you have been too vague for us to comprehensively understand what you do "have". (...

4 days ago | 2

rotating this curve 20degrees
I would normally ask why not try it yourself, but I realize there are some issues that can easily catch you here. H = plot(t,sd...

5 days ago | 2

Why 4.8/1.6 is not equal to 3?
While there has been a lot of good discussion in the other answer, let me add a few points. When you type 4.8 in MATLAB, does ...

7 days ago | 1

How can I solve linear equation system in parallel?
You already are doing that! That is, decomposition uses all of the cores you have available for large problems. Watching my ac...

8 days ago | 1

| accepted

How can I get confidence intervals when the Jacobian matrix has an almost zero vector?
This is probably not a failure of the assumption of Gaussian arrors, though that may indeed be the case too. I cannot know. Wha...

8 days ago | 0

Can I run MAtLab on mac
Yes. Apparently so. https://www.mathworks.com/support/requirements/matlab-system-requirements.html

8 days ago | 0

Fit a conic section without mirror image hyperbola
This goes back to basic algebra. When does a conic section describe an ellipse versus a hyperbola? https://en.wikipedia.org/wik...

8 days ago | 0

Distance between points of a 3D centreline
Why not try diff? For example, what does diff(CL,[],1) do? TRY IT! What is distance? Does that give you something you might b...

10 days ago | 0

Signal into tolerance range - Comparison algorithm
It is often the case when my answer wants to be both no and yes. That is, no, there is no direct tool that does what you seem to...

10 days ago | 0

How to graphically represent the global minimum of an optimization problem with more than two variables?
Do you have a multi-dimensional holographic monitor? Yes, I know, this will not be invented for many years if ever, but that is ...

11 days ago | 0

Fast method to find average pairwise distance of a very large matrix?
You cannot compute the 100 billion pairwise distances, because the matrix won't fit in memeory. (Ok, symmetry reduces it to be o...

11 days ago | 0

| accepted

How to get multiple outputs from a function?
[x,y] = subfuntest(a,b); When you call it with no arguments, it returns only the first, putting it in the default variable name...

12 days ago | 1

| accepted

how to find the sum of rows in an array, that fit a condition?
When a problem is too complex to solve, then break it down into SMALLER parts, that you can handle. You want to know how many r...

12 days ago | 1

| accepted

Normal Distribution Specifying parameters
Hint: What does normcdf tell you? (In fact, I think this totally gives the answer away, IF you understand what the CDF means.) ...

13 days ago | 0

Solve equationsystem (A*V).'*B*(A*V)=C for matrix A
As it turns out though, your problem is actually quite simple. Assume that V is full rank. As long as that is true, then as can...

13 days ago | 0

| accepted

Does the cubic Hermite spline interpolation of a monotone data with known slopes guarantee the monotonicity in interpolation segments?
pchip always gaurantees a monotonic interpolant if the data is itself monotone. However... If you provide the derivatives yours...

14 days ago | 0

MATLAB equivalent to ls -l
It depends on what you want from it. What exactly are you looking for? D = dir MAY give you much of what you may want, if you ...

14 days ago | 0

| accepted

How to write matlab code for modular multiplicative inverse in cryptography
A multiplicative inverse modulo some number p means that mod(x*xinv,p) == 1 That is, x has a mutiplicative inverse modulo p,...

14 days ago | 2

Why Power of Matrix with decimal values gives really big numbers?
This is basic linear algebra. I think you do not understand what is happening, or perhaps you do not understand Markov transitio...

14 days ago | 2

| accepted

When using interp3, do the input grids need to have evenly spaced values?
No. They do not need to be EVENLY spaced. So a grid spacing of [1 2 4 8 15 17 23 100] is entirely valid. Though depending on the...

15 days ago | 0

| accepted