Answered
Implicit function plot of function having discontinuity at origin.
Since you sought the zero contour, your implicit curve is presumably considered to be defined by the equation (1-x)-a*x*y/(x...

13 years ago | 0

Answered
Breaking down a large array
For spacing every third element p = a:3:b; For logarithmic spacing p = round(k*a.^(1:n)); for appropriate a, k, an...

13 years ago | 0

| accepted

Answered
merge two matrices together
If M1 and M2 are your two arrays (of like size), get your desired result in array M3: [m,n] = size(M1); [u,~,p] = unique(M...

13 years ago | 1

| accepted

Answered
nested loop for double summation having interdependent index variables are not generating correct plots
I can't relate your matlab code to the iteration you defined for 'A' and 'e', so I can't help you with debugging. However, her...

13 years ago | 0

Answered
how to find the coordinates of sensor nodes deployed with Gaussian distribution
I assume the variance of the distribution is to be the same in all directions on the plane, namely s^2. There has to be some po...

13 years ago | 0

Answered
changing position of numbers in a vector
This problem is naturally made for Matlab's 'nchoosek' function. This method requires no rejection afterward and will therefore...

13 years ago | 2

Answered
Summation with upper limit itself as a variable
In the expression symsum((L/M)^p/gamma(p+1),p,0,n) for p an integer ranging from 0 to n it is the sum of the first n+1 te...

13 years ago | 0

Answered
About neville's method.
My advice would be to first take an example with, say, just three values of x and of y. Forget about computers for a minute and...

13 years ago | 0

Answered
Creating random points in a circle
Let the circle be of radius R and center at (x0,y0). Let n be the desired number of points within. t = 2*pi*rand(n,1); r ...

13 years ago | 2

| accepted

Answered
Distance Matrix to coordinates in Matlab?
This looks to be an impossible problem. Number the points according to the distance matrix rows or columns they correspond to. ...

13 years ago | 0

Answered
how to calculate modulus in matlab ?
The number you describe is far too large for accurate numerical computation using only 'double' floating points numbers. Howeve...

13 years ago | 0

Answered
Can Someone Help Me WIth My Code?
Those aren't valid equations for the accelerations of your three bodies under mutual gravitational attraction. Acceleration for...

13 years ago | 0

Answered
I keep getting this error and i cannot work out what it means
You used an uppercase 'P' in Plot(Time, Windspeed). Matlab doesn't know what that is.

13 years ago | 1

Answered
how to reduce computation time for this loops?
Here are some comments on your code: 1) As your code stands, the quantity 'L' has no effect whatever on the quantity 'D', so ...

13 years ago | 1

Answered
code for computing area by varying the value of y in matrix?
This general formula in terms of x1, x2, x3, y1, y2, and y3 gives the exact area under your 'polyfit' curve without the trapezoi...

13 years ago | 0

Answered
Solving a cubic equation using MATLAB
It looks as though you are interested in a symbolic rather than numeric solution. If 'solve' doesn't work, you may find the fol...

13 years ago | 0

Answered
How can I create a loop for transpose row vector to column vector
Your words "transpose every line to columns" hint that you wish the rows to remain contiguous within the single column. If so, ...

13 years ago | 2

| accepted

Answered
problem with the code
Apparently there is a triangle with vertices A, B, and C with sides opposite to these vertices of length a, b, and c, resectivel...

13 years ago | 0

Answered
Algorithm for computing divergence of a vector field
Mathworks is unfortunately often reluctant to disclose the details of their algorithms, and I'm afraid this seems to be the case...

13 years ago | 0

Answered
mahalanobis distance for 2 vectors matlab
There appears to be a misconception here. Mahalanobis distance has no meaning between two multiple-element vectors. Ideally ...

13 years ago | 1

| accepted

Answered
Making permutations in a matrix
I can only guess at your meaning here of the word 'permutations'. Based on your other similar request at http://www.mathwor...

13 years ago | 0

| accepted

Answered
How to use the trapezium rule
Pm would be the m-th Legendre Polynomial except that, as you have defined it, it appears to involve the m-th derivative of the n...

13 years ago | 0

Answered
Get rid of nested for loops?
The nested loops are difficult to avoid for this type of procedure. However, there are other aspects of your computation that c...

13 years ago | 1

Answered
how can I create a vector with unknown length?
This article should be of help to you. https://en.wikipedia.org/wiki/Sorting_algorithm I tend to prefer the merge sort al...

13 years ago | 1

Answered
Breaking a number up into its powers of ten
"Breaking a number up into its powers of ten" is precisely what 'dec2base' and 'sprintf' undertake to do, except that the result...

13 years ago | 0

| accepted

Answered
Why is the inverse of a symmetric matrix not symmetric?!
Yes, it's roundoff error. Instead of 'isequal' which demands exact equality, try displaying the difference invC-invC' to see if...

13 years ago | 0

| accepted

Answered
How to solve two non-linear equation having sine terms
It is not hard to express cos(11*A) and cos(13*A) in terms of cos(A). Their expressions will have just six and seven terms, res...

13 years ago | 0

| accepted

Answered
How to solve NaN problem
When you compute TT you are dividing zero by zero at four places where you divide by E(n), hence the NaN. This is because with ...

13 years ago | 0

Answered
Numeric Derivative - problem entering df
Matlab is complaining about the "*" operator just after "sin(x.^2)". It should be ".*". Also you should be using matlab's 'exp...

13 years ago | 0

Answered
Intersection of a surface generated by scattered points and a line
The intersection of a triangle and a line in three dimensional space can be found as follows. Using three cartesian coordinates...

13 years ago | 3

| accepted

Load more