Answered
Area of two identical overlapping ellipses
Pretty simple actually as just a transformation of variables. You claim to have the analytical solution for a pair of circles...

9 years ago | 0

| accepted

Answered
How to find the number of triangles formed in below code?
What does this tell you? size(tri,1) Even simpler is to recognize that this is a rectangular grid, of size 15x15, so a l...

9 years ago | 1

| accepted

Answered
Does roots have an issue with large coefficients?
Why would you be even remotely surprised? Roots works in DOUBLE precision arithmetic. Of course big coefficients can be a proble...

9 years ago | 2

| accepted

Answered
how can i generate 100*12 unitary complex matrix in matlab. can anyone plese tell me
Works fine for me. a=orth(randn(100,12)+1i*randn(100,12)); Note that I added a call to orth. whos a Name ...

9 years ago | 0

| accepted

Answered
how to write cubic function as modelfun for nlinfit?
Again, you only THINK you need to use nlinfit. But you simply don't. x = rand(1,10); y = rand(1,10); P3 = polyfit(x...

9 years ago | 0

Answered
I am working in a project and i have to work out these matrices, and it keeps appearing this statement: Warning: Matrix is singular to working precision.? what i have to do ?
Since we don't know where the matrix comes from, and how you generated it, there is no answer. Your matrix is singular, and ...

9 years ago | 0

Answered
How can I make a categorical variable based on a simple rule for a numeric variable?
You don't define how the rule works when y == 12. I made a choice for you. y = double(yraw >= 12); You don't really need...

9 years ago | 1

| accepted

Answered
Red object detection picking up yellow color.
You extracted ONLY the red channel. Then you looked for red colors. But there are other colors which have the red channel maxxed...

9 years ago | 0

| accepted

Answered
How can I set the numbers of decimals (precision) of the solution of fminunc?
"I want the solver to "jump" from 0.53 to 0.54 between iterations (minimum step), so the solution has 2 decimals and it doesn't ...

9 years ago | 0

Answered
Find positive roots of trigonometrical equation
So lets see. You have a problem with infinitely many solutions, but no analytical solution. You want to find ALL of them. Infini...

9 years ago | 0

| accepted

Answered
Simple ODE solution from MATLAB and Mathematic disagree
First of all, I sincerely doubt that is the true output directly from Alpha. I think you did some editing. In some places I see ...

9 years ago | 1

| accepted

Answered
FInd maximum in cubic spline interpolant
Too late possibly, but you can always use my <https://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-mode...

9 years ago | 0

Answered
condition on two arrays
Since it now appears that you care only about those elements of z that also lie in y, the solution is simple. The code you wrote...

9 years ago | 1

| accepted

Answered
It is necessary to declare the data type each time I change the value?
MATLAB does not give you the ability to set a variable name as automatically a specific data type. (Unlike old Fortran, where I ...

9 years ago | 3

| accepted

Answered
Help with Central Difference Code
You need to learn to use MATLAB, creating arrays programmatically. So just write a loop that creates those coefficients on th...

9 years ago | 0

Answered
Help me with this question please....
Your loop sums only the integers from 1 to n, not the product of consecutive integers. But, hey, you were close, and you made a ...

9 years ago | 2

Answered
I need to solve or just plot a function p(x,y) of two variables knowing just its gradient which is a vector, any suggestions
If all you know is the gradient, then the original function is not fully recoverable. You can think of it as if you are lacking ...

9 years ago | 0

Answered
ECG trace fitted to a polynomial (concentration of minima and maxima is too high at the end and too low over the rest of the graph)
You have won the prize for being the 1 millionth person to make this mistake. I.e., just increase the order of the polynomial un...

9 years ago | 0

Answered
how to change Function value intiialization? mine is start with 0. i want start with -1
The trivial answer is to subtract one from the array of zeros. Or, replace the zeros with -1. Thus f(:) = -1; Or, lea...

9 years ago | 0

| accepted

Answered
All possible combinations of adding two matrices elementwise
Easy, peasy, that is, IF you have a current MATLAB release. A one line solution... A = rand(2,2) A = 0.37803 ...

9 years ago | 1

| accepted

Answered
Complex number on optimization
It is just simulated annealing. It won't be harmed if you just slap a penalty on the objective. Return inf to the annealing code...

9 years ago | 0

Answered
fsolve not giving the right answers for nonlinear equation
Please read to the end here, because there is a lot of ground that I cover in explaining the real issue with your problem. 1....

9 years ago | 6

| accepted

Answered
Creating a diagonal matrix with specific diagonal vectors
Learn yo use the tools for such a problem. Here spdiags is the correct tool, creating a sparse matrix as a result. help ...

9 years ago | 1

Answered
Reshape won't work for my application. Why?
Reshape will NOT change the number of elements. Regardless of what something named reshape does in Python, MATLAB is not Python....

9 years ago | 0

Answered
Need help with matlab question
Where you are going wrong is in your understanding of the linear algebra. You are trying to solve the problem A*x=B, when A ...

9 years ago | 0

| accepted

Answered
Find the largest possible submatrix with non-zero elements
Come on. What have you tried? If nothing, then why not? Your definition of computationally feasible is relative to you, as someo...

9 years ago | 0

Answered
How to retrieve image name
Having loaded an image into a variable, the original name of the image in the file it was stored in is NOT carried along. No...

9 years ago | 0

Answered
How can i create a program (or app) in Matlab?
This is not a question with any real answer, except that you learn to use the language, and then you learn to solve the problems...

9 years ago | 0

| accepted

Answered
Find inverse and determinant of a positive definite matrix
Many questions. How come the default inverse has so much error? Etc... Answer: The reason why you were given this homework as...

9 years ago | 1

Load more