Answered
how to plot multiple graphs with same x-axis and y-axis?
Using subaxis(), downloaded from here, https://www.mathworks.com/matlabcentral/fileexchange/3696-subaxis-subplot?s_tid=srchtitl...

3 years ago | 0

Answered
Fast way of computing all possible products of n matrices
Here's an alternative method that eliminates redundant computation, like you were hoping, using recursion. However, it doesn't s...

3 years ago | 1

Answered
How to count pixels/measure area in binary image?
Let's consider 3 regions B (the background, which you have as a binary image), C (the circles), and D (the connective arms betwe...

3 years ago | 1

Answered
how to avoid for loop to increase speed
And instead of the mean, I am interested in the mode. This method should offer speed-up for a generic function, provided that ...

3 years ago | 0

Answered
How to find the angle of object by using other function instead of using minFeretProperties because it is not supported for code generation.
Here is possibly another way to compute the MinFeretAngle, based on radon. According to the documentation, the Coder does suppor...

3 years ago | 0

Answered
How split an image into four parts?
Using mat2tiles from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-...

3 years ago | 1

Answered
Intersecting a point cloud and grids
It's a straightforward application of histcounts2.

3 years ago | 0

Answered
I am having an array with positive integers, and i want to know all the possibility that the sum of elements of the array is close to or equal to a number say (N))
N=40; A = [1 7 13 20 38 39 40]; A=unique(A); n=find(cumsum(A)<=N,1,'last'); result=cell(n,1); for i=1:n tmp=su...

3 years ago | 0

| accepted

Answered
Fast way of computing all possible products of n matrices
This solution (note the attachments) does it in about 1 sec for a 20x20x10 set of single float matrices. matrices=rand(20,20,10...

3 years ago | 3

| accepted

Answered
Losing resolution after transformation using imwarp
load cameraParams im0=imread('b8-12212022142637-2006.Bmp'); [im_a, newOrigin] = undistortImage(im0, cameraParams); imagePoi...

3 years ago | 0

| accepted

Answered
axes object properties for 3D volumes?
I recommend this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/22940-vol3d-v2?s_tid=ta_fx_results

3 years ago | 0

| accepted

Answered
Optimization stopped because the objective function cannot be decreased in the current search direction.
I found a few options 'DiffMaxChange' 'DiffMinChange' and 'FiniteDifferenceStepSize' potentially related, but not quite clear ho...

3 years ago | 1

Answered
Formulating Matrix in Linear Programing (Optimization problem)
You haven't explained which variables are your unknowns, and which are problem constants. Regardless, you do not have to build m...

3 years ago | 0

Answered
I got negative Lagrange Multipliers in linprog
I've changed my answer. I can't be completely sure, but it appears that your constraints have numerically unstable properties, t...

3 years ago | 0

| accepted

Answered
how to avoid for loop to increase speed
A=rand(91,1); % vector with 91 random samples B=[9,10,10,8,11,10,10,9,10,6]; % vector with the number of samples G=repelem...

3 years ago | 0

| accepted

Answered
parfor unable to classify, why?
I suspect it is because mycell is intended to be a sliced variable, but the code violates the fixed indexing rule, Fixed Index ...

3 years ago | 1

| accepted

Answered
eig() gives eigenvalues in the "wrong" order
eigenshuffle from this FEX post might be applicable, https://www.mathworks.com/matlabcentral/fileexchange/22885-eigenshuffle

3 years ago | 2

| accepted

Answered
How to caluclate centroid of a voronoi cell of a voronoi diagram.
The voronoi cells are always convex, so assuming it is bounded, you can just take the mean of all the vertices of each cell. X...

3 years ago | 1

| accepted

Answered
Unable to classify variable in body of parfor loop (cannot figure out how to resolve indexing)
See the rules for Sliced Variables. M=size(strategies,1); Species1by2 = zeros(M,M*12); parfor species1 = 1:length(strateg...

3 years ago | 0

| accepted

Answered
Expectation of inverse of complex Gaussian variables
So there must be some error that I couldn't find out and misunderstanding. The misunderstanding is that the expectation is infi...

3 years ago | 2

| accepted

Answered
Add value at new position automatically to matrix
A = [1 2 3;4 5 6]; C=[A, zeros(2,1); zeros(1,3) , 1 ] or C=blkdiag(A,1)

3 years ago | 1

| accepted

Answered
Rigidly translating and mirroring 2D coordinates
curve1 = importdata("curve1.txt"); curve1(:,3)=[]; curve2 = importdata("curve2.txt"); [ocurve1,ocurve2]=deal(curve1,curve2)...

3 years ago | 0

| accepted

Answered
Saving a resized image while keeping the resized values
Because with saveas, you are saving a screenshot of the figure window, not an image composed from the pixel values of resize_im...

3 years ago | 1

| accepted

Answered
Why I cannot get negative answer ?
x=0; y=2; if (x>=5) & (y>2) f=x^2-y; elseif (x<5) | (y>0 & y<=2) f = x-y^2; else (x<0 & x>0) & (y<0) f= x^...

3 years ago | 0

| accepted

Answered
How to remove edges around blank circle from a mask?
Using bwlalphaclose from this FEX download https://www.mathworks.com/matlabcentral/fileexchange/90762-further-tools-for-analyzi...

3 years ago | 1

Answered
Interp2 Function error using meshgrids
The problematic line is, rmax=1; This means that X,Y will mostly be located well outside the R,Z grid where they cannot be int...

3 years ago | 0

Answered
MATLAB crashes after loading 4000x4000x4000 matrix
Is the array sparse? If so, you might consider re-expressing it as a sparse data type using this FEX download: https://www.math...

3 years ago | 0

Answered
Why am I receiving this error?
Try deleting line 9 and retyping it.

3 years ago | 0

Answered
How to find the nearest gaussian of a function ?
Use fit(x,y,'gauss1') if you have the Curve Fitting Toolbox or this FEX download if you have the Optimization Toolbox, https:/...

3 years ago | 1

Load more