Answered
How to convolve a 3D matrix along one of its dimension?
If you have the Image Processing Toolbox, you can use imgaussfilt3, output = imgaussfilt3(Array,[.1,.1,sigma]);

4 years ago | 0

Answered
How to convolve a 3D matrix along one of its dimension?
You can use ffts kernel=reshape(gaussianProfile,1,1,[]); N=size(Array,3)+size(kernel,3)-1; F=@(z)fft(z,N,3); invF=@(z)if...

4 years ago | 0

Answered
How to convolve a 3D matrix along one of its dimension?
If your Gaussian kernels is 1x1xN, you can just use convn as usual kernel=reshape(gaussianProfile,1,1,[]); output=convn(Arra...

4 years ago | 0

| accepted

Answered
median filter on a region of interest
Apparently there's a way to interface with Python's median filter, which can ignore NaNs. https://www.mathworks.com/matlabcentr...

4 years ago | 0

Answered
Homography Matrix
Ue fitgeotrans(). tform = fitgeotrans(movingPoints,fixedPoints,'projective')

4 years ago | 0

Answered
How to log data without growing struct array?
I don't see any reason why your method wouldn't work, but I like this better: firstMessageFlag = true; emptyStruct = structfun...

4 years ago | 0

| accepted

Answered
How do we fill this kind of gap with Matlab (without changing the size of the object)?
We don't know thickness of the Image A veins in pixels (it's always good to attach your example images as .mat files), but whate...

4 years ago | 0

| accepted

Answered
How do I fit a sine curve with the least square fit?
I recommend downloading fminspleas, https://www.mathworks.com/matlabcentral/fileexchange/10093-fminspleas funlist={@(b2,xdata...

4 years ago | 0

Answered
Describe non-convex region with linear inequality constraints
You cannot. A system of linear (in)equalities always corresponds to a convex region. However, you can use inpolygon() to test wh...

4 years ago | 0

Answered
Intersection point between two lines (boundary points given) after extrapolating ?
You might think this avoids slope and intercept, but it doesn't. p1=[100;107.5;1]; p2=[100;17.5;1]; p3=[12.5;110;1]; p4=[1...

4 years ago | 0

Answered
How I can implement a non-overlap optimization constraint
If V1 (4x2) and V2(4x2) are the vertices of the two rectangles, then you could introduce additional unknowns a,b,c with the cons...

4 years ago | 0

Answered
Set same elements in a matrix to zero
Without the Image Processing Toolbox, A = [0 0 0 0 1 1 0 0 0 2 2 2 0 0 0 5 5 5 5 5; 0 0 0 1 1 0 0 0 0 0 2 2 0 0 0 5 0 5...

4 years ago | 0

| accepted

Answered
VertCat unique rows of multiple tables.
Why not as follows? tAll = unique( [t1 ; t2] )

4 years ago | 0

Answered
save file with loop index in matlab
i=1:10; x=randn(size(i)); save yourFile x i

4 years ago | 0

Answered
Set same elements in a matrix to zero
Something like this, perhaps? A = [0 0 0 0 1 1 0 0 0 2 2 2 0 0 0 5 5 5 5 5; 0 0 0 1 1 0 0 0 0 0 2 2 0 0 0 5 0 5 0 5; ...

4 years ago | 1

Answered
can I equation of a curve from an image?
This assumes your Image is already cast to type logical. The slope and intercept are for the center-line in matrix (row,column) ...

4 years ago | 0

Answered
Non-linear optimization with fmincon converged to infeasible point
The syntax for solve() that you are using does not exist, according to the documentation. To run a multistart, you must use the ...

4 years ago | 0

Answered
Obtaining close results with and without using MultiStart and GlobalSearch for fitting data to a non-linear model
I am wondering does this mean that for my function the local and global minima are the same? It might, but there's never any gu...

4 years ago | 1

Answered
Splitting Cells Within A Cell Array
player=cellfun(@(c) c{1},C,'uni',0); stats=cellfun(@(c) c{2},C,'uni',0); T=table(string(player(:)),stats(:),'Var','Player','...

4 years ago | 0

Answered
How to average every row of several columns in a matrix?
mean (A(:,2:3),2)

4 years ago | 0

| accepted

Answered
solve numerically a system of nonlinear equations
F2=@(z) z+2*log10(0.0001886+0.000003513*z); [z,Fsol]=fzero(F2,1) x2=1./z.^2 x1=sqrt(67.7/(9.0214+x2*71.185)) % -x1 is al...

4 years ago | 0

| accepted

Answered
Help Vectorizing For-Loop with Complex Statements
Eliminating one of the loops should help. cmap=reshape(colormap_used_in_image',1,3,[]); for c = 1:imageSize % for each row i...

4 years ago | 0

| accepted

Answered
Find intersections of curves
syms bL ab=8.0901*10^(-5); f12=ab*sinh(bL); f22=sin(2*(ab)*bL); bLmax=fzero(matlabFunction(f12-f22) ,2 ); rts=[-bLmax,...

4 years ago | 0

| accepted

Answered
How to place a common colorbar for tiledlayout plots?
tiledlayout(2,2) nexttile; nexttile; nexttile; nexttile cb = colorbar; cb.Layout.Tile = 'east';

4 years ago | 0

| accepted

Answered
Rotate an Ellipsoid towards a point
Very simple with this FEX package, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-for-fitting...

4 years ago | 0

Answered
After receiving outputs (not associated to a variable) from a set of loops, how do I then allocate them to a variable?
You have not attached your input data, so you've made it hard for us to study the way your current code performs. However, I'm g...

4 years ago | 0

| accepted

Answered
Writing class in matlab with structures and not allowing user to modify them.
You can define a set.property method like in the following. This will be inherited by any subclasses. classdef myclass ...

4 years ago | 0

| accepted

Answered
Datastore with overlapping read function
For example, the first value the datastore will return is a 100x200 array, which corresponds to rows 1:101 in the spreadsheet. T...

4 years ago | 0

Answered
How to have an empty space in a vector for operations
I would like to have a vector with an blank space, not a NaN, simply a blank space. There is no such thing as a "blank space" ...

4 years ago | 0

| accepted

Answered
Best fitting curve for variable data
Using fminspleas from the File Exchange https://www.mathworks.com/matlabcentral/fileexchange/10093-fminspleas % data x = [1...

4 years ago | 1

| accepted

Load more