Answered
Method to generate group division which is unique over multiple levels
It is easy to show that if you have found a five-level solution to your intriguing problem, you can apply any permutation to the...

12 years ago | 1

| accepted

Answered
how to generate a specific group of numbers from nchoosek
If I have interpreted your request correctly, you can do what you ask with two calls on 'nchoosek', one to choose three numbers ...

12 years ago | 1

| accepted

Answered
GCD search for non-integers
I see a way to do your problem provided it is assumed that each number in x must round to a non-zero integer. It would involve ...

12 years ago | 0

Answered
Area inside a closed curve
Sahil, if your surface is determined by some equation f(x,y,z) = 0, and if the boundary curve on this surface is determined by a...

12 years ago | 0

Answered
Small Probabilities appearing less frequent using rand
Your computation is faulty. Where you write Prob2_1 = (sum(nn < Prob_Rv(2)) - Prob1_1)/totNum; Prob3_1 = (sum(nn < ...

12 years ago | 0

Answered
how do i take a 384x32 matrix and make it to a 32x384 matrix?
It all depends on how you want the matrix elements to be rearranged into a 32x384 matrix. If you want each of the 384 rows of 3...

12 years ago | 0

Answered
MATLAB simplify complex expressions
You can try the following. The two identities which you require, nx^2+ny^2+nz^2 = 1 and ax*nx+ay*ny+az*nz = 0 reduce the...

12 years ago | 0

Answered
I find a problem about accumarray(subs,val,[],@(x)sum(diff(x))), maybe a bug
When the 'subs' values are not in what Mathworks considers as "sorted order", the 'accumarray' algorithm calls for some kind of ...

12 years ago | 1

| accepted

Answered
Angle determination between pinned curved line.
If s1 is the derivative of the curve on the left at the middle point and s2 the derivative of the curve on the right side at the...

12 years ago | 0

| accepted

Answered
help me echelon matrix ?
It is in the nature of the reduced row echelon form for your square matrix to be the identity matrix. That is because no matter...

12 years ago | 0

Answered
how to integrate a discrete function ?
To "make this right" you need to decide just what your function is, Jaden. What are its independent and dependent variables? I...

12 years ago | 0

| accepted

Answered
How can I solve the linear system of equations with Matlab?
If your equations are homogeneous as in your example, you need to use matlab's 'null' function. See its documentation at: h...

12 years ago | 0

Answered
How to solve atan2 function Problem?
It looks as though you need the 'unwrap' function: http://www.mathworks.com/help/matlab/ref/unwrap.html It depends on mak...

12 years ago | 2

Answered
sphere made of 2d circles in 3d plot
To use 'surf' do this: r = 1; [theta,phi] = ndgrid(linspace(0,pi),linspace(0,2*pi)); X = r*cos(phi).*sin(theta); Y = r...

12 years ago | 0

Answered
Compute first partial derivatives for a recursive function.
I don't see any particular difficulty here. By taking the derivatives of each f_(i) with respect to a or w you obtain another r...

12 years ago | 0

Answered
How to generate recursive formula with two initial values?
Recursion for a value N which calls on itself twice, once for N-1 and another time for N-2, gives rise to an exponentially incre...

12 years ago | 1

| accepted

Answered
Fetching data to the matrix in a particular sequence
m = 3; p = [ 5, 8,10,11, 6, 7, 9]; seq = [ 3, 4, 2, 6, 5, 1, 7]; N = size(seq,2); n = ceil(N/m); out = reshape...

12 years ago | 0

| accepted

Answered
Create a random matrix?
HM = zeros(a,b); for k = 1:a t = zeros(c,b); t(randperm(b*c,d)) = 1; HM(k,:) = sum(t,1); end Note: Th...

12 years ago | 2

| accepted

Answered
Help me about number in matlab ?
See 'rat' documentation.

12 years ago | 1

| accepted

Answered
How to find degree of polynomial in Matlab?
Suppose you evaluate your polynomial, P(x), at a large number of equally-spaced values of x. Then if diff(P,n) exhibits a non-z...

12 years ago | 0

Answered
insert end at right location
Your phrase "insert end" looks as though you had some action in mind but couldn't think how to say it in English. I will make...

12 years ago | 0

| accepted

Answered
How to find roots of a polynomial with fractional orders?
I don't know how 'solve' does it, but here's how I would proceed. Define the variable t = s^(3/10). Then your equation can be ...

12 years ago | 1

| accepted

Answered
solving maths elliptic equation
In my opinion, where you stated "x^3+ax+b=0" you misled us into thinking you wished to solve that cubic equation, and the "y^2" ...

12 years ago | 0

Answered
Creating a matrix with values that increase cyclically
An alternative to that is: m = 256; n = 670; t = (.5:m^2*n-.5)'/n; M = [floor(t/m),mod(floor(t),m)]+1;

12 years ago | 1

| accepted

Answered
Creating a matrix with values that increase cyclically
M = [reshape(repmat(1:256,670*256,1),[],1),... reshape(repmat(repmat(1:256,670,1),1,256),[],1)];

12 years ago | 1

Answered
solving maths elliptic equation
As John has already pointed out, this is a "cubic" equation in the unknown x, not an "elliptic" equation. As he has also pointe...

12 years ago | 0

Answered
Searching for help on matlab : Warning: Explicit integral could not be found
As it stands, this integral is divergent at its upper limit of integration. It's no wonder the warning was issued. The argumen...

12 years ago | 0

Answered
Simulate outage probability or CDF
One commonly-used method involves matlab's 'rand' function and the inverse of the cdf function. Let p = F(c) be the cumulative ...

12 years ago | 0

| accepted

Answered
cos() between vectors in matrix Optimization
This might be faster. It avoids repetition in computing norms. Dc = S'*S; N = sqrt(diag(Dc)); Dc = Dc./(N*N');

12 years ago | 1

| accepted

Answered
Trying to generate a population of 50 randomly permutated numbers but program doesn't stop running
The method you are attempting to use would randomly select out of all possible permutations, using a rejection method, one of th...

12 years ago | 0

| accepted

Load more