Answered
ranking the data in matrix and arrange them as per rank.
>> D=[1 2 3; 7 8 9; 4 5 6; 3 0 5]; E=[D sum(D')' ranks(sum(D')')] Unrecognized function or variable 'ranks'. Did you mean:...

5 years ago | 0

| accepted

Answered
How can I generate all possible combinations of a vector containing specific numbers in it?
J=nchoosek(1:8,3); [m,n]=size(J); I=repmat((1:m)',1,n); accumarray([I(:) J(:)],1)

5 years ago | 1

| accepted

Answered
3 equations 3 unknowns complex numbers
A\B

5 years ago | 0

| accepted

Answered
This error was detected while a MEX-file was running.
It simply means the MEX file is buggy.

5 years ago | 0

Answered
Why it is not possible to do array indexing directly after function that returns array?
There might be some syntax confusion that leads TMW not to do that. The issue is that the indexing and function argument both us...

5 years ago | 1

Question


What is the advantage of Help with web connection
It seems MATLAB help switch recently by default on "Web documentation" It kind of anoying where the doc is available locally. W...

5 years ago | 1 answer | 1

1

answer

Answered
Is there a reason why my stl file isn't being read correctly?
You should not use delaunayTriangulation to make connectiviy of the points. It creates a convex hull of all the points. Usualy ...

5 years ago | 0

| accepted

Answered
Partition of a set.
https://www.mathworks.com/matlabcentral/fileexchange/17818-all-permutations-of-integers-with-sum-criteria >> N=5; L=3; >> h=al...

5 years ago | 0

| accepted

Answered
Partition of a set.
https://www.mathworks.com/matlabcentral/fileexchange/24133-set-partition >> N=5; L=3; >> DispPartObj(SetPartition(N,L)) The 2...

5 years ago | 0

Answered
How can I calculate the percentage of clouds within each grid box i.e. 1 degree x 1 degree?
Take a look at function histcount2 and histogram2

5 years ago | 0

Answered
what function can be used like arranging number like that?
[~,B] = sort(A); B(B) = 1:length(B)

5 years ago | 0

| accepted

Answered
Power method to determine largest real eigenvalue does not converge
The png is not correct if A has negative largest eigan (absolute) value Try this A = [1 2 1; 6 -1 0; -1 -2 -1]; [V,D] = eig...

5 years ago | 1

Answered
How to extract a different columns for each row of a matrix without using a loop?
N = size(A,1); C = A((1:N)'+N*(B-1)); Also take a look of function sub2ind().

5 years ago | 0

| accepted

Submitted


Least-square with 2-norm constraint
Minimize |A*x-b|^2 such that |x| = cte

5 years ago | 1 download |

0.0 / 5

Submitted


Multiple eigen-values for 2x2 and 3x3 matrices
Compute in one shot the eigen-values of multiples (3 x 3) matrices using Cardan's formula

5 years ago | 2 downloads |

4.9 / 5

Submitted


MultipleQR
Perform a bunch of QR factorization of same size matrix

5 years ago | 3 downloads |

0.0 / 5

Answered
How to put a spline through points representing a path
Put this next-below to your code waypoints=unique(waypoints,'rows','stable'); % <- this is required because your example as dup...

5 years ago | 1

| accepted

Answered
Extract first and last nonzero elemenents inside subarrays avoiding mat2cell
A = [0 0 1 2 0 5 0 0 6 0 3 0 ; 0 3 0 2 6 0 0 0 0 0 0 0]; b = reshape(A.',6,[]) ~= 0; [m,n] = size(b); [~,istart] = max(b,[]...

5 years ago | 0

| accepted

Answered
how to generate permutations of N numbers in K positions
No loop, no extrenal file needed N=5; K=3; P=nchoosek(1:N,K); P=reshape(P(:,perms(1:K)),[],K) You might further sort the p...

5 years ago | 3

Answered
How to generate this matrix?
>> rho=rand rho = 0.8832 >> N=4 N = 4 >> a=rho.^(0:N-1); >> M=toeplitz(a,a) M = 1.0000 ...

5 years ago | 0

| accepted

Answered
Roots of a sixth order polynomial in symbolic form
"Ok let me elaborate a bit further. I have a system with a sixth order denominator polynomial, like i mentioned in the question....

5 years ago | 0

| accepted

Answered
How to vectorize A\B operation on slices of 3D matrices?
Yes there is new news since I post this MultipleQR fex (MEX required, OpenMP multithreading), for 6 x 6 this is the speed up on ...

5 years ago | 2

Answered
Determine polynomial coefficients so that it's roots lie on the unit circle
For P(z) = a*z^2 + b*z + c; I claim this is these two conditions are equivalent to the fact that P has two roots on unit circ...

5 years ago | 1

Answered
Readability of matlab code
Why not use object oriented programing? Put your external parameters in properties. Put your functions as methods. Implement an...

5 years ago | 0

Answered
Piecewise differentiation, automatic identification of pieces
https://www.mathworks.com/matlabcentral/answers/587987-linear-segmentation-of-noisy-data?s_tid=ta_ans_results

5 years ago | 2

Submitted


Random derangement
Generate sequences of random derangement

5 years ago | 2 downloads |

0.0 / 5

Answered
Why Contour matrix M ( [M,c] = contour(__) ) contains the data points exceeding xmax/ymax?
[M,h]=contourf(f,8) Return contours of 8 levels, not single level of value 8. You might use this function to decode the output...

5 years ago | 0

| accepted

Answered
What frustrates you about MATLAB? #2
Some time data comes as single, but text just rejects it >> x=single(0); >> y=single(0); >> text(x,y,'Why single is not suppo...

5 years ago | 2

Answered
How can I get randperm to return a permutation of a vector that has no entries at their original positions?
Here is an implementation of a non-rejection method and unbiased random derangement: function p = randder(n) % p = randder(n) ...

5 years ago | 2

Load more