Answered
How to convert gray color image to 3d shape depending on it's pixels colors ...?
Just use surf. You just have a matrix of numbers. Plot it as a surface.

9 years ago | 0

Answered
How to calculate imaginary part of incomplete gamma function in matlab.
I might point out that gammainc is the name of the incomplete gamma function. Not gammanic. Misspelling a function name tends to...

9 years ago | 0

Answered
Problem with minimizing optimization function with multiple variables
Defining this m-file... function b = myfun(v) x = v(1); y = v(2); b = (x^2 + 5.*y^2 + 4.*x.*y -30.*x - 60.*y + 21...

9 years ago | 1

Answered
Run a program to display the least possible integer divisible by 11 and its square root greater than 132?
While Jose is correct, the answer is trivial, even with a loop. What is the requirement? The requirement is that SQRT(x) > ...

9 years ago | 0

| accepted

Answered
Approximating Pi using a series
Ok. So you made an effort. Not terrible, but there are some problems. NEVER use a variable named sum. If you do, then the fu...

9 years ago | 1

Answered
I have a matrix which is 2x1 that contains the roots of a quadratic polynomial. How do I assign a variable to only take the positive root?
Are you ABSOLUTELY certain that both roots are not positive? Are you absolutely certain that the roots are not complex? The p...

9 years ago | 0

Answered
How to generate a Matlab equation of signal using stored data and time samples , logged from simulation
There is not much to say here, which is why you have not gotten an answer yet. It depends on what you know about the curve, and ...

9 years ago | 0

| accepted

Answered
Hi. I have Real X-Axis, Real Y-Axis while combination of real and imaginary numbers on Z-Axis. How can i plot these values in 3D graph? I have used surf and mesh command.
You cannot do so. A complex number is actually TWO numbers. You cannot plot a complex result on ONE axis, thus only the z ...

9 years ago | 0

| accepted

Answered
Sum minimum n matrix elements > certain value
Not all problems have a simple solution. In fact, it is trivial to pose simple looking problems that have such a huge search spa...

9 years ago | 1

Answered
How to solve for the unknown variable of an equation in-code?
Where in your code did you ever define D as a symbolic variable, so that the symbolic toolbox can work with it? syms D I...

9 years ago | 0

Answered
My query is to get roots with positive real part of an equation having variable real coefficients. An example is given below.
Why use roots here? Roots is for purely numerical problems. Worse, roots provides only ONE set of roots. You are looking to find...

9 years ago | 1

| accepted

Answered
Help with regress syntax
By reading the help for regress ... help regress {stuff snipped away} [B,BINT,R,RINT,STATS] = regress(Y,X) return...

9 years ago | 0

| accepted

Answered
Int function gives strange integral
This is a basic problem of symbolic methods. Sometimes they generate a result that while technically correct, it looks strange t...

9 years ago | 0

Answered
How to retain duplicate while using ScatteredInterpolant
1-d is sufficient to explain here. x = [1 2 3 3 4 5]; y = [1 2 3 4 5 6]; There is a replicated x, with two distinct v...

9 years ago | 0

| accepted

Answered
[generate parametric curves]
Um, just about ANYTHING is possible. Well, anything possible is possible. The impossible takes a lot more work though. Does that...

9 years ago | 0

Answered
MATLAB License Issue w/ username
This is not a question for Answers. We are not official MATLAB support here. Contact MathWorks customer support. Click on the "C...

9 years ago | 0

Answered
show files from different folders with different colours
No. It is not possible. (At least at this time) to do that. I'm not sure why you want to do it either, so I don't see any strong...

9 years ago | 0

Answered
What does mean(s(:)) do and the reason for using " : " for mean of a square matrix?
Well, what does mean do, when applied to a matrix? TRY IT!!!!!!!!! You will learn by trying things. magic(3) ans = 8...

9 years ago | 3

| accepted

Answered
how to avoid nan result when calculate sparse matrics division
Sigh. Without seeing your numbers, this is hard to tell. Just telling us the size of the matrix is irrelevant. I will tell yo...

9 years ago | 0

| accepted

Answered
Difference between cumsum and cumtrapz to find area under a curve?
Why should they be the same? They do different things, solving different problems. Is a sum the same thing as an integral? Of c...

9 years ago | 7

Answered
How to optimize filling of sparse matrix:"Sparse indexing expression is likely to be slow"
NEVER populate a sparse matrix one element at a time. That forces MATLAB to stuff new elements in into arbitrary positions, thus...

9 years ago | 0

Answered
Is there any possible way of writing the following two-line code in one single line?
In the case of size, it has a second argument that answers your problem (as asked) directly. However, nothing stops you from ...

9 years ago | 2

Answered
what is wrong with my code ?
Just explaining what KSSV said: r=2*round((R-1)/2)+((-1)^R+1)*r; See that r lies on BOTH sides of the equality here. But...

9 years ago | 0

| accepted

Answered
How to evalutate AREA from connected points?
It is often true that what looks easy to the eye/brain is not so trivial do do by computer. And even if it may be easy, but if n...

9 years ago | 0

Answered
Why running same code on the same image gives different result every time?
Whenever this happens, it means that some piece of the algorithm involved probably required starting values, usually for a searc...

9 years ago | 1

Answered
Fast Fourier Transform of Spectral Data
Yes, but your data is not really a Gaussian. It looks vaguely like one. But it is not symmetric. It does not go into the tails. ...

9 years ago | 0

| accepted

Answered
Definition of Integral Square Error via matlab (ISE)
Many points to make here. First, DON'T use error as a variable name. In general, it is never a good idea to use variable names t...

9 years ago | 2

| accepted

Answered
what the fault in my code
Hint: Don't stuff your results into vectors that are defined to be uint8. The test is simple. class(Pmlx) class(Pmly)...

9 years ago | 1

| accepted

Answered
multiply random elements of matrix
Assuming that A contains only integers, you can use the brute force approach as Jan suggested. Or you can determine if any of th...

9 years ago | 1

Load more