Why is this code returning values of zero?
Does zero for all variables trivially satisfy the equations? (Yes.) Did you request a solution of the equations? (Yes.) Do you...

13 days ago | 0

How to use secant method to solve two equations
The secant method does not have a simple extension into multiple dimensions, although I am sure one could cobble something up. F...

13 days ago | 0

Negative floats to Binary
Just extract the bits. I'll get you started, like this. X = -0.942; hex = sprintf('%bx',X) hex = 'bfee24dd2f1a9fbe' The...

13 days ago | 0

| accepted

Finding PDF for difference of two PDFs
Why in the name of god and little green apples would you use a convolution to compute the distribution of the difference of two ...

14 days ago | 0

not recognizing 3.2220e+03 as a positive integer?
Because it is not an integer. Yes, if you type in 3.2220e+03, MATLAB is smart enough to know that is an integer. But how do yo...

14 days ago | 1

What are the values ​​of single?
realmax('single') ans = single 3.4028e+38 -realmax('single') ans = single -3.4028e+38 The sign is not rele...

14 days ago | 2

Sum of the random array cannot reach the upper limit sum
Let me try to explain. You are trying to do this: lb=[56 65 21 21 16 7 31 32 35 32 17 40 79 114 104 69 56 41 16 16 11 9 10 19 3...

15 days ago | 1

| accepted

can someone help me ? , something error in my code
Please don't post a picture of your error. Text works just fine, and then we can copy your code and paste it into MATLAB. Anywa...

15 days ago | 0

Im having trouble with the forward eulers method.
An array or vector index indicates where in memory you want to stuff some information. MATLAB uses a 1-based index scheme. So x...

16 days ago | 0

how to generate complex matrix with variable diamension???
A very confusing question. Are you asking how to generate a matrix with complex elements? MATLAB automatically uses complex form...

16 days ago | 0

Assuming that you mean a model of the form Y = A + Bx^2 + C x^4 Simple is to download my polyfitn from the file exchange, whic...

17 days ago | 0

| accepted

HOW CAN I DO BILATERAL FITERING ON AN IMAGE?
Do you have the image processing toolbox (properly) installed? What MATLAB release do you have? An old release may be too old t...

17 days ago | 0

Monte Carlo technique for normally distributed random variable
I'd suggest that a better way is to employ a truncated normal distribution. So, if you carefully sample points from a truncated ...

17 days ago | 0

Why std function returns NaN?
LOOK AT WHAT YOU ARE DOING. R(7) ans = 49.8875023348093 R(40) ans = 47.332112186806 R(7):R(40) ans ...

20 days ago | 2

can't find all the solutions
syms B vpasolve(sin(B-0.361)+sin(0.361)*exp(-B/0.377) == 0,B,3) ans = 3.5026252445445116308012726555233

21 days ago | 0

| accepted

How to pre-allocate for unknown size vector?
There are several simple ways to do this. Over-allocate the array. r will never be larger than 4. Therefore, the array will nev...

21 days ago | 1

Can't seem to get polyfit to work.
I'd suggest that you are confused. Nothing you do will fit a cubic polynomial well to that data. It seems to have two points wh...

21 days ago | 1

| accepted

How can I get A knowing Ap and p?
No. There is insufficient information. You can view this as knowing n pieces of information, but needing to output n^2 pieces of...

21 days ago | 0

How do i solve a cubic function giving the answer in a matrix
This is not a cubic polynomial. Fact. A cubic polynomial is of the form: a + b*x + c*x^2 + d*x^3 What you have is a rationa...

21 days ago | 1

I am getting zero eigenvector while using sym/eig. What is the problem?
The problem is not with MATLAB. It appears that your matrix is defective. It does not have a complete basis set of eigenvectors....

22 days ago | 0

Newton method to find polinom roots?
+1 to Torsten, because his answer is completely correct and should be the one you accept. All this answer does is be a bit more ...

22 days ago | 0

MxM correlation Matrix output
What does that even remotely have to do with a covariance matrix? :) Now, IF your goal really is just to create that array, the...

22 days ago | 0

Sorry, but it would be a breach of license for someone to send you the code of imfindcircles.m. As well, that code would not run...

23 days ago | 0

How to divide a matrix by a polynomial?
In general, you can't. This is not aquestion of "dividing a matrix by a polynomial". In fact, that makes no sense at all. You h...

23 days ago | 1

| accepted

Is there anybody help me to solve the follwing equation?
These lines do absolutely nothing: a>=0; c>0; They are not some sort of advance declaration about the values of a and c. Nutt...

23 days ago | 0

Concatenating cell arrays in matlab
Easy peasy? a a = 1×3 cell array {37720×155 double} {37720×155 double} {37720×155 double} b b = 1×3 cell ...

23 days ago | 2

Solving system of three non linear equations??
Fsolve is a nonlinear optimization tool. It NEEDS startinng values. Good starting values are often important if your system is n...

24 days ago | 0

Optimization toolbox: "lsqnonlin" stopped because it exceeded the function evaluation limit
Note that I don't know which release of MATLAB you are using. But what did you try? This seems clear: opts = optimoptions('lsqn...

25 days ago | 2

| accepted