回答済み
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 ...

約7年 前 | 0

| 採用済み

回答済み
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...

約7年 前 | 0

| 採用済み

回答済み
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 ...

約7年 前 | 3

回答済み
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}...

約7年 前 | 0

回答済み
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 ...

約7年 前 | 0

| 採用済み

回答済み
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=...

約7年 前 | 1

| 採用済み

回答済み
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...

約7年 前 | 0

| 採用済み

回答済み
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...

約7年 前 | 1

回答済み
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 ...

約7年 前 | 1

回答済み
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. ...

約7年 前 | 0

| 採用済み

回答済み
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

約7年 前 | 1

| 採用済み

回答済み
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.

約7年 前 | 0

回答済み
mcr2018a version 32
TMW stops 32-bit MATLAB since R2016a

約7年 前 | 0

| 採用済み

回答済み
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...

約7年 前 | 0

回答済み
Find the intersection of two surfaces.
The mesh intersection is reduced to basic triangle-triangle intersection. There are few good pointers here: https://stackoverfl...

約7年 前 | 1

回答済み
Binary matrix in Matlab
If you have communications toolbox, create galois field array (with m=1) then apply inv.

約7年 前 | 0

| 採用済み

回答済み
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(...

約7年 前 | 1

| 採用済み

回答済み
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 ...

約7年 前 | 0

回答済み
sum of multiplication for a vector and matrix
b*sum(A,2) Less operations than the first solution.

約7年 前 | 1

回答済み
How to accelerate multiple Backslash Operations?
You might try this FEX

約7年 前 | 0

回答済み
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)])...

約7年 前 | 0

回答済み
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)...

約7年 前 | 2

回答済み
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 ...

約7年 前 | 0

回答済み
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.

7年以上 前 | 0

回答済み
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

7年以上 前 | 0

質問


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

7年以上 前 | 1 件の回答 | 4

1

回答

回答済み
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

7年以上 前 | 1

回答済み
Replace elements of matrix
F = matrix .* ~ismember(matrix,vector)

7年以上 前 | 1

回答済み
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...

7年以上 前 | 1

| 採用済み

質問


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

7年以上 前 | 1 件の回答 | 1

1

回答

さらに読み込む