Réponse apportée
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.

presque 3 ans il y a | 1

Réponse apportée
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?

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to avoid recursion in property set functions
The recursion can be avoided if all of the code leading up to the property assignment, along with the property assignment are al...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
4D integral using integral and integral3
f = @(a, b, c, d) a+b+c+d; I = @(a, b, c) integral(@(d) f(a, b, c, d), 0, 1,'ArrayValued',1); f2=@(a, b, c) I(a,b,c)+1; I2=in...

presque 3 ans il y a | 0

| A accepté

Discussion


Implicit expansion for CAT()
Would it be a good thing to have implicit expansion enabled for cat(), horzcat(), vertcat()? There are often situations where I ...

presque 3 ans il y a | 2

Réponse apportée
3D hexagonal mesh grid
V=nsidedpoly(6).Vertices; [X,Z]=ndgrid(V(:,1),0:3); [Y,~]=ndgrid(V(:,2),0:3); scatter3(X(:),Y(:),Z(:)); view(-60,70) xla...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
A compact way to replace zeros with Inf in a matrix
Allso just for fun. A = [0 3 2 5 6; 1 1 4 3 2; 9 0 8 1 1; 5 9 8 2 0; 3 1 7 6 9]; A=A+1./(A~=0)-1

presque 3 ans il y a | 3

Réponse apportée
How can I populate the rows of a difference matrix without using a for loop?
X=X(:); Y=Y(:); x=reshape(x,1,1,[]); y=reshape(y,1,1,[]); d=hypot( X - x , Y - y ); Diff=@(U,u) ((U(1)-u)./d(1,1,:)) ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Converting 3D matrix to 2D matrix image
See rgb2gray or im2gray.

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Can you help me design a Cylindrical Conical Helix
u=linspace(0,1,30); v=linspace(0,2*pi,30); [u,v]=meshgrid(u,v); x=(1-u).*(2.5+cos(v)).*cos(4.*pi.*u); y=(1-u).*(2.5+cos(v))....

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I adjust the space between each subplot for a 5*3 subplots setup?
n=4; %1x4 figure; t=tiledlayout(1,n,'TileSpacing','tight'); for i=1:prod(t.GridSize) nexttile imagesc(phantom(12...

presque 3 ans il y a | 0

Discussion


Do Reinvent the Wheel
Are there Matlab features which intend to satisfy your needs but fail in certain critical areas, forcing you to abandon them com...

presque 3 ans il y a | 3

Réponse apportée
Can you help me design a Cylindrical Conical Helix
For example, t=linspace(0,20*pi,6000); R=exp(-0.1*t); x=R.*cos(t); y=R.*sin(t); z=R.*cotd(30); plot3(x,y,z)

presque 3 ans il y a | 0

Réponse apportée
I cant find MLP-Mixer in MATLAB.
Maybe you can import it into Matlab from this pyTorch repository, https://github.com/lavish619/MLP-Mixer-PyTorch

presque 3 ans il y a | 1

Réponse apportée
MATLAB refuses to display blue in converted JPEG image: is showing singular blue pixels
Make sure that you, (1) Use the same caxis in both image displays, (2) Convert to double first, then divide by 255. Not the...

presque 3 ans il y a | 0

Réponse apportée
How can I adjust the space between each subplot for a 5*3 subplots setup?
The subaxis function in this FEX download https://www.mathworks.com/matlabcentral/fileexchange/3696-subaxis-subplot?s_tid=srcht...

presque 3 ans il y a | 0

Réponse apportée
Creating a Grid for cooridnates
and I also do pick up a few spurious spots that are'nt part of the grid If outliers are present, I would use the approach belo...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I unflatten a dimension in a neural network?
Are you using importNetworkFromPyTorch ? I feel like it should take care of all of that.

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Reshaping 4d array into 2d matrix with a specific pattern
reshape( permute(tempC,[2,1,4,3]) ,[N*J, I*K] );

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Wrong output graph when using ifft on rectangular pulse?
h = fftshift(ifft(ifftshift(H))); % Calculate the time axis based on the new value of S t = ((0:S-1)-ceil((S-1)/2))/S/(f(2...

presque 3 ans il y a | 1

Réponse apportée
Offsetting Data Though Curve Fitting
If the stress-strain data is all linear elastic (or if you can extract a portion that is), then you could use polyfit: p=polyfi...

presque 3 ans il y a | 0

Réponse apportée
Creating a Grid for cooridnates
Use histcounts2. x =[3.9988 5.4914 7.3364 130.3843 132.5535 134.5383 257.6364 259.6390 261.5130 ...

presque 3 ans il y a | 1

Réponse apportée
Adjoint / inverse nufft
If your t,f sampling is going to be reused, it may be gainful to use an algebraic inversion with the help of this FEX download, ...

presque 3 ans il y a | 0

Réponse apportée
Adjoint / inverse nufft
If these are your actual data sizes, an optimization approach seems to work not too badly: t = [0:300 500.5:700.5]; S = 2*sin(...

presque 3 ans il y a | 0

Réponse apportée
Trapezoidal Rule of Convolution with Non-Uniform Intervals
It is not clear from your post which two functions you are convolving, so I will assume here that it is the same as your other r...

presque 3 ans il y a | 0

Réponse apportée
Using Values from Tabulated Data
t = [1 2.5 3.6 4]; A = [78 80 85 96]; Afun=@(tq)interp1(t,A,tq); Afun(1) Afun(2) Afun(2.5)

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Find all intercepts for all parameter values
As an example, y=linspace(-1,1,1000); V=sin(pi*y-0.4); %fake input data loc=diff(sign(V)) & abs(y(1:end-1))<0.5; yinterc...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to graph a convolution with same time length as inputs
Convolution doesn't make sense if your time points are not equi-spaced. You should interpolate everything so that they are: t=[...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
calculating the provide integral
A common approach is to discretize the integral and instead compute sum of squared differences (SSD), e.g., SSD=norm( interp1(x...

presque 3 ans il y a | 0

Charger plus