Réponse apportée
Replace elements of a matrix by a smaller matrix which contains circular shaped values margins
C = A; sB = size(B); idx = {1+(1:sB(1)),1+(1:sB(2))}; % adjust offset 1 and 1 if B to be moved at other place C(idx{:}) = B ...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to compute a Hankel matrix for N-dimension ?
Not sure what is the Hankel in 4-D but by extension in 2D it should be something like this w=5; x=4; y=3; z=2; b = rand(1,w...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to fit ellipse equation through segment of ellipse?
Warning: you won't ever get reilable ellipse with such as small portion of data. I'll still provide you a code (Optimization ...

environ 7 ans il y a | 3

Réponse apportée
How to gracefully truncate a matrix of unknown dimensions?
Input = rand(3,4,5) Dimension = 2; a=2; b=4; commaidx = cell(size(size(Input))); commaidx(:) = {':'}; commaidx{Dimension}...

environ 7 ans il y a | 0

Réponse apportée
Find constraints on polynomial coefficients optimization
Why can't you implement ts := max(min(-a2/(2*a1),T),0); Then add the 6 constraints into your minimization pb: two non-linear ...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Vector decomposition with Matlab
b= [2; 1; 2; 1; 0; 1; 2; 1; 2] b1=min(b,1); b1([find(b==2,1,'first'),find(b==2,1,'last')])=2; b2=b-b1; n=length(b); tail=...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
For a multidimensional array is it possible to return all other array dimensions for a single index of one dimension without having to use the colon for indexing?
Mdls = struct(); % Initialise Mdls as struct Mdls = repmat(Mdls,[2,4,6,8,6,4,2]); % Arbitrarily size the struct dim = 3; % dim...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to find the nearest positive definite matix
First step of preparation is to "symmetrize" the matrix A = 0.5*(A + A') Why? Because MATLAB engine selects the algorithm depe...

environ 7 ans il y a | 1

Réponse apportée
What is the best way to generate samples from a multivariate complex normal distribution with an arbitrary covariance matrix?
% Generate test complex covariance matrix R sdp (m x m) m = 3; A = randn(m)+1i*randn(m); R = A'*A % Generate x, n-samples ...

environ 7 ans il y a | 1

Réponse apportée
Should I set my bounds in the main function call or in the constraints function in global optimization?
In the lb, ub if you can. Then in linear constraints. then in non-linear constraints. Don't do in the main function. ...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
how can i separate a matrix into a multiplication of two matrices One of Real Values and the Other for Integer values.
Of course. Test matrix X = rand(5) n = length(X) then Z = ceil(1000*rand(n,n)) Y = X/Z Y*Z

environ 7 ans il y a | 1

| A accepté

Réponse apportée
How to apply function eig to an array of matrices?
If your matrices is 2x2 or 3x3 you can use this FEX for eigen values, then this one for engen vectors.

environ 7 ans il y a | 0

Réponse apportée
mcr2018a version 32
TMW stops 32-bit MATLAB since R2016a

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Compare values of a matrix
It seems like you you want to cluster indexes according to correlation. In this case why not threshold you matrix, that gives so...

environ 7 ans il y a | 0

Réponse apportée
Find the intersection of two surfaces.
The mesh intersection is reduced to basic triangle-triangle intersection. There are few good pointers here: https://stackoverfl...

environ 7 ans il y a | 1

Réponse apportée
Binary matrix in Matlab
If you have communications toolbox, create galois field array (with m=1) then apply inv.

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to solve a special linear equation Ax=b? A is a row vector.
If you have optimization toolbox A=[0.1+0.2i 0.2+0.3i 0.4+0.5i 0.6+7i 0.8+0.9i] b = 0.5+0.7i; nz = 2; AA = [real(A); imag(...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
Formulating maximization problem subject to null-space constraint
FMINCON (or any optimizer) cannot solve this kind of problem, your asmmissible space is not close set, since the constraint can ...

environ 7 ans il y a | 0

Réponse apportée
sum of multiplication for a vector and matrix
b*sum(A,2) Less operations than the first solution.

environ 7 ans il y a | 1

Réponse apportée
How to accelerate multiple Backslash Operations?
You might try this FEX

environ 7 ans il y a | 0

Réponse apportée
counting the number of times a number appears next to the same one in a row?
>> A=[1 1 1 2 3 4 4 2] A = 1 1 1 2 3 4 4 2 >> sum(diff(A)==0 & diff([NaN, A(1:end-1)])...

environ 7 ans il y a | 0

Réponse apportée
Quadprog 'interior-point-convex' failure
You can shift the input variable, it seems to work [y,fval,exitflag,output,lambda] = quadprog(H,f,A,b-A*x0,[],[],[],[],[],opts)...

environ 7 ans il y a | 2

Réponse apportée
Unexpected speed decrease of 2D Fourier Transform on GPU when iFFTed
If you want a fast FFT, make your data length power of 2, or product of small integers. 166 is bad since the prime factor is 2 ...

environ 7 ans il y a | 0

Réponse apportée
mex file only found when in working directory, but not when in search path
If the MEX file is compiled with MSVS you might need to install the appropriate Redistributable on the target PC.

plus de 7 ans il y a | 0

Réponse apportée
How can I generate a set containing all possible combinations?
A = nchoosek(1:8,4); A = num2cell(reshape(A',2,2,[]),[1 2]); A = A(:); % display A{:} Produces 70 2x2 matrices

plus de 7 ans il y a | 0

Question


New feature Mex Out-of-Process
In the R2019a, there is a new feature that I think it's useful for people like me(us) that uses heavily MEX in the projects. ht...

plus de 7 ans il y a | 1 réponse | 4

1

réponse

Réponse apportée
Create an accurate boundary around 2D point cloud horizontal plane
You might take a look at traveling saleman problem, there are several efficient implementation in File Exchange

plus de 7 ans il y a | 1

Réponse apportée
Replace elements of matrix
F = matrix .* ~ismember(matrix,vector)

plus de 7 ans il y a | 1

Réponse apportée
How to mask a circle in perspective projection?
@Maayan please make an effort to give feedback to various answer/questions addressed to you. Just update the persective code in...

plus de 7 ans il y a | 1

| A accepté

Question


Update and Matlab Compenent Runtime
Does anyone know if the MCR installer (for compiled version of a code) gets an update whenever the regular MATLAB get an update ...

plus de 7 ans il y a | 1 réponse | 1

1

réponse

Charger plus