Answered
Distance between a point and the intersection of two spheres
This is confusing, possibly because of how you are trying to solve it. I think you are working too hard. The intersection betwe...

6 years ago | 0

| accepted

Answered
How to plot polynomial function correctly?
Hmm. Why does this feel like deja vu? (Answer: I just answered almost the same question for someone else, not 5 minutes ago.) d...

6 years ago | 1

Answered
Plotting a graph with a confusing equation
How to lie with statistics. ;-) (Yes, that is the name of a little book I read long ago.) My point is, not that you or anyone i...

6 years ago | 1

| accepted

Answered
Matrices with different numbers of equations
You know the size of the matrix. You already know you need to use zeros to initialize it. A = zeros(2*N,2*N); b = zeros(2*N,1)...

6 years ago | 1

Answered
plotting a natural cubic spline
Are you allowed to use existing code? So if you have the curve fitting toolbox, you can just use csape. x = 0:4; y = [1 3 3 4 ...

6 years ago | 1

Answered
Find the vector sum combination that gives the minimum vector length
First, NEVER store data in multiple variables like this. Instead, LEARN TO USE ARRAYS. There is no reason why you cannot store a...

6 years ago | 2

| accepted

Answered
Unrecognized function or variable 'carsmall'
This is not a question of you updating your version. I can see what you did, but not what you were hoping to do. Suppose I try t...

6 years ago | 1

| accepted

Answered
Is the Trapz feature always accurate?
trapz is not a "feature". It is a piece of software that embodies the trapezoidal rule, something that students may be exposed t...

6 years ago | 2

Answered
Why do I get this error in my Taylor Expansion?
It might seem a subtle point. But what is the shape of sqrt(sin(x)), where x is near zero? (I'll just disregard the +2, since th...

6 years ago | 1

Answered
What is the reason that a Hessian should be positive definite? And what is the relation between an ill-conditioned Hessian and convergence?
(This is not really a MATLAB question, but you are asking a question about the behavior of MTLAB solvers. Therefore close enoug...

6 years ago | 1

Answered
Why can't I write this row vector?
Very often, people who are just starting to use MATLAB, think that if you don't know the value of something, then it must be sym...

6 years ago | 2

| accepted

Answered
Hyerbolic Functions causing issues with Contour Plots.
Ugh. Learn how to use MATLAB, and scrap the crapola inpuptdlg interface. Next, learn NOT to use variable names like a lower cas...

6 years ago | 0

Answered
Linears equations summation+combination optimization
Let me see. The use of globals here is unecessary, better would have been to use anonymous functions. Globals just complicate ho...

6 years ago | 1

Answered
Making a Matrix Strictly Diagonally-Dominant
Can you solve this? Yes, sometimes, and there is no need for random permutations of the matrix. In fact, that is a poor solution...

6 years ago | 8

Answered
How would i adapt this code to make it work for a whole phrase, not just one word?
Simplest would be to extract each word, one at a time. For example, consider this sentence (taken from your question): phrase =...

6 years ago | 0

Answered
How can i replace all positive values of a matrix whit their square root ?
If you need to do it in one line, this will work: A(A>0) = sqrt(A(A>0)); Or, you could do the test in advance, saving some CPU...

6 years ago | 1

Answered
How to quickly find the column index of the last non-zero element in all rows in a sparse matrix?
It is important that if your matrix is sparse, that we use sparse matrix examples to test anything out. Regardless, I would alw...

6 years ago | 4

Answered
Find ones blocks in upper triangular matrix
Let me plead for you to change how you are doing things. What you are asking to do is perhaps the most silly form of information...

6 years ago | 0

| accepted

Answered
How to find cct of LEDs in cie 1960 graph?
I don't have the data you show for those curves. However, an orthogonal projection of a point onto a curve in space is not that ...

6 years ago | 1

Answered
I'm trying to create a code that determines whether a word (or phrase) is a palindrome. The code only needs to look at the actual letters within the input string, but I'm not sure how to do that.
Well, you did show some effort, actually a credible one at that. :) You already know how to use tools like lower, so try a few o...

6 years ago | 0

| accepted

Answered
How to reshape a matrix
This has nothing to do with what in MATLAB is describd as a reshape, since a reshape cannot change the number of elements in the...

6 years ago | 2

Answered
how to create recursive title
Slow down. This has absolutely nothing to do with recusrsion. Next, there is absolutely no need to use eval. You are making thin...

6 years ago | 0

| accepted

Answered
BATTLESHIP game ship placment
You don't get the compiuter to do anything. You write the program. You are in complete control. For example, can you randomly c...

6 years ago | 0

| accepted

Answered
Polynomial line fitting to dense data
Of course it is. help polyfit Do NOT fit anything of higher order than a straight line to that crap though. You will be kiddin...

6 years ago | 0

Answered
unknown code- can anyone help me with what this code does?
If I had to guess, it looks like a poorly written attempt at a sorting code, to sort a vector of numbers in decreasing order. My...

6 years ago | 0

Answered
what are the perfect skin colors values?
As I recall, the set of colors that represent skin tones is a rather strangely shaped set. depending on the color space you woul...

6 years ago | 0

Answered
Delaunay Triangulation removal of a box toward the center
Were it my problem to solve, I'd try one of several things. Simplest seems to be to start with a coarse quadtrilateration, thus...

6 years ago | 1

| accepted

Answered
Prevent nodes from seeing each other across a circle.
Your problem is you are trying to use a delaunay triangulation tool to create the result. A general delaunay triangulation descr...

6 years ago | 1

| accepted

Answered
What is preventing me from opening a figure made in R2019b in an older version of Matlab?
I would point out that the handle graphics have changed, and massively so. So older versions of MATLAB cannot understand what th...

6 years ago | 0

Answered
Printing pascals triangle binomial in loop
Well, you have made a reasonable start, and all you really need is to find a way to output what you have done. The conv trick h...

6 years ago | 0

| accepted

Load more