Answered
Scaling the FFT and the IFFT
IMHO, if the input signal is x(t) is real, only about half of X(f) = fft(x)(f) is relevant (index 1:ceil((N+1)/2))) the other ha...

7 years ago | 1

Submitted


Min/Max filter
Multidimensional non-linear min/max filtering

7 years ago | 3 downloads |

4.1 / 5

Answered
Matrix Manipulations - How to achieve these specific forms?
>> A=diag(ones(1,5),0)+diag(ones(1,4),-1) A = 1 0 0 0 0 1 1 0 0 0 0 1...

7 years ago | 1

Answered
List all possible outcomes of 16 matches
dec2bin(0:2^16-1)-'0'

7 years ago | 4

| accepted

Answered
Solve function with equations and inequations
If you fix x_max and replace the last inequality by the equation 100^3 * x_1 + 100^2 * x_2 + 100 * x_3 + x_4 = 3 % (or an...

7 years ago | 0

Answered
create random diagonalisable matrix
*Code for both A and X are integer.* I edit the 1st version of the code (if you happens to see t) essentially a bug correctio...

7 years ago | 2

Answered
Indexing into a structure to retain/remove elements based on a string
retain = strcmpi(X.eye,'LEFT')); % selectedEye is 'LEFT' X.eye = X.eye(retain); % somewhat useless assignment X.timestam...

7 years ago | 0

| accepted

Answered
Question on speed of for loop and repmat/repelem 'vectorization'
Please Try this (I hope there is no mistake): NJ=100; NTW=100; Task=[(1:NJ)',4+randi(5,NJ,1)]; TW=[repelem((1:NJ)'...

7 years ago | 0

Answered
How to fill the remaining "N" number of rows, of an already populated vector, with zeros
% ... Compute GV GV(20000)=0 % if you are sure 20000>length(GV), if not protect with IF

7 years ago | 1

Answered
Switch statement using intervals.
edges=[-Inf 0.002 0.06 2 60 200 Inf]; [~,intnum] = histc(x,edges); switch intnum case 1 % clay processclay(x...

7 years ago | 1

Question


mxMakeArrayComplex() what's for?
Now (since 2018b) that MATLAB introduces complex-interleaved storage, the C-API has two new functions mxMakeArrayComplex(A)...

7 years ago | 1 answer | 0

1

answer

Answered
Is there a function that performs element by element multiplication between two variables and stores in one of the variable by default?
If you download this <https://mathworks.com/matlabcentral/fileexchange/24504-fft-based-convolution FEX> there is _inplaceprod...

7 years ago | 0

Answered
Sparse and binary mask
Instead of matrix(mask) = matrix(mask).*phase(mask) you might work on index idx = find(mask & matrix~=0); while .....

7 years ago | 1

| accepted

Answered
Sparse for element by element operation
A = sprand(1000,1000,0.005); B = rand(1000,1000); tic Af = full(A); AB=Af.*B; toc % Elapsed time is 0.01162...

7 years ago | 0

Answered
Sparse for element by element operation
You might also interested in this <https://mathworks.com/matlabcentral/fileexchange/23488-sparse-sub-access FEX> [i,j]=find...

7 years ago | 0

Answered
could anyone help me to solve the issue in the following code
Using this <https://mathworks.com/matlabcentral/fileexchange/24133-set-partition FEX> to illustrate, but you can similarly remov...

7 years ago | 0

Answered
Minimization problem with constraint
Here is solution R = -Inf x = something between min(ai,bi),max(ai,bi) y = something between min(ai,bi),max(ai,bi) ...

7 years ago | 1

Answered
intersection of two cylinders in 3D space
This <https://mathworks.com/matlabcentral/fileexchange/68796-distance-bewteen-2-cylinders-in-3d FEX> might provide an answer:

7 years ago | 0

Answered
Swapping Blocks in a Matrix
[x(1:2,1:2) x(2:3,4:5)] = deal(x(2:3,4:5),x(1:2,1:2))

7 years ago | 1

Answered
How to create matrix with fixed sum in rows and fixed increment in elements
s = 0.05; n = round(1/s); m = 3; r = nchoosek(1:n+m-1,m-1); z = zeros(size(r,1),1); r = (diff([z, r, n+m+z],1,2...

7 years ago | 2

Answered
A fast way to perform sparse matrix-free product with a vector
Can you give the detail about how you iterate ? There seems no room to improve the basic block mfree_times If you output i...

7 years ago | 0

Answered
Creating adjacency from the matrix containing not sequence number
A=[ 1 2 0 5 0 0; 2 1 0 0 5 6; 5 2 6 0 0 0; 6 1 2 0 0 5; ] u=unique(A(:,1)); [~,J]=ismember(A(:,2:end),u); ...

7 years ago | 1

Answered
How can I improve the speed of the following matrix multiplication?
AC = reshape(reshape(A,size(A,1),1,[]).*reshape(C.',1,size(C,2)[]),[],size(B,1)); for i = 1:n reshape(AC*B,size(A,1),[...

7 years ago | 0

| accepted

Answered
Customize drag and drop of .mat files, similar to openxxx?
This FEX file is what you need https://fr.mathworks.com/matlabcentral/fileexchange/53511-drag-drop-functionality-for-java-gui...

8 years ago | 0

Answered
How to create matrix of all combinations?
c={[1 2 3],[1 2 3 4 5],[10 11 12 13 14 15]} [c{:}]=ndgrid(c{:}); n=length(c); c = reshape(cat(n+1,c{:}),[],n)

8 years ago | 2

Submitted


Voronoi Sphere
Compute voronoi's diagram of points on the 2-sphere

8 years ago | 5 downloads |

5.0 / 5
Thumbnail

Submitted


SplitVec
Partition an input vector into smaller series of subvectors of consecutive elements

8 years ago | 4 downloads |

4.9 / 5

Answered
preallocating a structure with fieldnames in the form of a string from another structure
stemplate=struct('p8',1,'p10',2,'p12',3,'p14',4,'p12i',5) structarg = fieldnames(stemplate)'; structarg(2,:)={[]}; ...

8 years ago | 0

Question


File exchange contribution upgrade
I try to update my contribution on File Exchange, and always end up with rejection: _This website is currently unavailable W...

8 years ago | 0 answers | 0

0

answers

Answered
Vectorize a doble loop for
p = rand(3,4) a = ceil(10*rand(size(p,1),1)) omega = rand(size(p))>0.4 [j,k] = find(omega) p_hat = accumarray(...

8 years ago | 1

Load more