Answered
Revised Simplex Method Solution
I would say to read the docs for linprog, where this will have been explained in some depth. But perhaps it may be confusing sti...

8 years ago | 2

Answered
Symbolic indefinite integral of piecewise function gives wrong results
Personally, I'd suggest trying to define a piecewise function using abs is a dangerous thing, something that will only get you i...

8 years ago | 0

Answered
how do I use the factorial function in a for loop
I see one other problem in the code you have written. I would guess that really, the formula you WANTED to write is: W(h) = N...

8 years ago | 0

Answered
Critical points for system of 3 first order differential equations
What would you define a critical point to be? Perhaps one where u'1=u'2=u'3=0? How would you identify that set of points? Perha...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 0

Answered
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...

8 years ago | 1

Answered
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...

8 years ago | 1

| accepted

Answered
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 ...

8 years ago | 0

Answered
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...

8 years ago | 1

Answered
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...

8 years ago | 2

Answered
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...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 0

Answered
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...

8 years ago | 0

Answered
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...

8 years ago | 0

Answered
Please help on curve fitting
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...

8 years ago | 0

| accepted

Answered
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...

8 years ago | 0

Answered
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 ...

8 years ago | 0

Answered
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 ...

8 years ago | 2

Answered
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

8 years ago | 0

| accepted

Answered
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...

8 years ago | 3

Answered
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...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 0

Answered
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...

8 years ago | 1

Answered
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....

8 years ago | 0

Answered
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 ...

8 years ago | 0

Answered
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...

8 years ago | 0

Answered
search for link to download imfindcircle function !!
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...

8 years ago | 0

Answered
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...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 0

Answered
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 ...

8 years ago | 2

Load more