Risposto
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:...

oltre 5 anni fa | 0

| accettato

Risposto
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)

oltre 5 anni fa | 1

| accettato

Risposto
3 equations 3 unknowns complex numbers
A\B

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 1

Domanda


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

oltre 5 anni fa | 1 risposta | 1

1

risposta

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

Risposto
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

oltre 5 anni fa | 0

Risposto
Help me find the index value for first minimum value in a matrix.
[~,idx] = min(A)

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 1

Risposto
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().

oltre 5 anni fa | 0

| accettato

Inviato


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

oltre 5 anni fa | 1106 download |

0.0 / 5

Inviato


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

oltre 5 anni fa | 1866 download |

4.9 / 5

Inviato


MultipleQR
Perform a bunch of QR factorization of same size matrix

oltre 5 anni fa | 158 download |

0.0 / 5

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

oltre 5 anni fa | 1

| accettato

Risposto
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,[]...

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 3

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 2

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

oltre 5 anni fa | 1

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 2

Inviato


Random derangement
Generate sequences of random derangement

oltre 5 anni fa | 44 download |

0.0 / 5

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 2

Risposto
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) ...

oltre 5 anni fa | 2

Carica altro