Answered
Calling functions that have a variable name
Just generate handles to all the functions. Then they can be used freely to make function calls, e.g., F=cellfun(@str2func, co...

2 years ago | 1

| accepted

Answered
How to represent gray scale images as affine subspaces?
Well, in general, we can write the estimation of A,b as the norm minimization problem, If X can be fit in RAM, you could just...

2 years ago | 0

Answered
Fit ellipsoid to (x,y,z) data
I'm finding that a decent fitting strategy is to first fit with a Gaussian, but then use the parameters of the Gaussian to const...

2 years ago | 1

| accepted

Answered
Fit ellipsoid to (x,y,z) data
Using quadricFit from, https://uk.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-for-fitting-conics-and-q...

2 years ago | 2

Answered
How to plot the best fitted ellipse or circle?
The code below uses ellipsoidalFit() from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-...

2 years ago | 1

| accepted

Answered
Efficiently calculating the pixels crossed by a ray bundle
I have tried to go from square pixels to circles, I'm assuming the circles are inscribed inside the square pixels? If so, I wou...

2 years ago | 0

Answered
Troubleshooting Title and Axis Label Placement in Log-Log Plot with Dual Axes in MATLAB Live Script
I've marked lines I've added changed below in comments: h = figure(); param = [0.3287,3.5103,1 0.3287,4.5491,2 ...

2 years ago | 0

| accepted

Answered
Remapping problem in order to calculate the estimate of new frame
Check wither map_x or map_y (or both) are outside the boundaries of img_n.

2 years ago | 0

Answered
Minimize multivariable function with multivariable nonlinear constraints in MATLAB
The problem is unbounded. Consider x=[ 14, pi/2, x3,0,0,x6]. Then the problem reduces to the linear program, ...

2 years ago | 0

Answered
How to represent gray scale images as affine subspaces?
One way, I suppose would be to train an affine neural network with the Deep Learning Toolbox, e.g., layers=[imageinputLayer(120...

2 years ago | 0

Answered
Show matrix is not invertible.
syms a b c d e f g h A = [a 0 0 b 0; 0 c 0 0 d; 0 0 e f 0; 0 0 0 0 g; 0 h 0 0 0]; det(A)

2 years ago | 0

Answered
How do I isolate a specific part of an image for quantitative analysis via segmentation
You could have a look at the Image Segmenter App https://www.mathworks.com/help/images/ref/imagesegmenter-app.html

2 years ago | 0

Answered
To mirror (i.e, to copy) the upper matrix to the lower half in matrices arranged in 3D
M_3D=randi(100, 4,4,3); %fake input N=size(M_3D,1); mask=triu(ones(N)); mask(1:N+1:end)=nan; M_3D=M_3D.*mask; M_3D=M...

2 years ago | 1

| accepted

Answered
Combine multiple objects to create Super Sampled representation
Here's an algebraic solution in which we model the blobs as circularly symmetric with a radial profile parametrized by cubic spl...

2 years ago | 0

| accepted

Answered
3d Plotting a decagonal pyramid
sidelength=10; height=8; %User inputs V=nsidedpoly(10,'Side',sidelength).Vertices; V(end+1,3)=-height; trisurf( dela...

2 years ago | 0

| accepted

Answered
How to compute the Volume of a 3D-model
Try lowering the alpha radius and see if it improves the result.

2 years ago | 0

Answered
A and I are n*n matrix. I want to know the code to calculate the photo`s matrix
A=ones(2); n=length(A); N=5; Ac=cell(1,N); Ac{1}=eye(n); for i=2:N Ac{i}=A*Ac{i-1}; end Ac{N+1}=zeros(n)...

2 years ago | 1

| accepted

Answered
Plot function of two variables in 2D space
V = @(x1,x2) x1.^3 + x2.^2; fcontour(V,[0,1])

2 years ago | 0

Answered
How Do I Create a Mean Filtered Image using For Loops?
grayImg=reshape(1:49,7,7) [m,n]=size(grayImg); dm=repmat(3,1,ceil(m/3)); dm(end)=dm(end)-(sum(dm)-m); dn=repmat(3,1,ceil(...

2 years ago | 0

Answered
Solving systems of equations graphically and finding where they cross.
x_intersect=fzero(@(x) 2*x-3*sin(x)+5 ,[-20,+20])

2 years ago | 0

| accepted

Answered
Goodness of fit parameters seem to be incorrect in Curve Fitter App with Exponential 2 term
RSquared is showing as 1, although my hand calculation suggests 0.99993 Not mine. See below. If I had to guess, you copied the ...

2 years ago | 1

| accepted

Answered
Use of fmincon with nonlcon inside a parfor loop
Move the steps inside the loop to its own function doOptimization(). You can nest functions there, as in in the example below. ...

2 years ago | 0

| accepted

Answered
Trying to find chekerboard points, not returning any points with detectCheckerboardPoints
You can download pgonCorners, https://www.mathworks.com/matlabcentral/fileexchange/74181-find-vertices-in-image-of-convex-polyg...

2 years ago | 0

| accepted

Answered
Given vector with N entries, generate all combinations with K entries such that K > N, vector entries can repeat
Starting with R2023a, syms a b k=4; v=repmat( {[a,b]},1,k); result=table2array(combinations(v{:}))

2 years ago | 0

Answered
Given vector with N entries, generate all combinations with K entries such that K > N, vector entries can repeat
syms a b k=4; [C{k:-1:1}]=ndgrid([a,b]); result=reshape(cat(k+1,C{:}) ,[],k)

2 years ago | 1

| accepted

Answered
fmincon: optimize till nonlinear condition is false
Adjusting the constraints shall not be the solution for this. Instead of a hard constraint, you could add a penalty term to you...

2 years ago | 0

Answered
fmincon: optimize till nonlinear condition is false
yes but I maybe could define a maximum stepsize which might be smaller than this intervall so the optimizer cannot accidentally ...

2 years ago | 0

Answered
access time of data in cell array vs matrix
Because extracting from cell arrays involves no new memory allocation. And because N_img=1000 is still very small.

2 years ago | 1

Answered
Poor results for neural-network based image segmentation
Maybe increase the fitting capacity of the network. Add another encoder/decoder layer and/or increase the filter size?

2 years ago | 0

Answered
Poor results for neural-network based image segmentation
I can't manually chop off the appendages via image erosion bwlalphashape from this FEX download, https://www.mathworks.com/mat...

2 years ago | 0

| accepted

Load more