답변 있음
Conversion from an old to a new version of a class with different property names
One way is with a Dependent property. This makes it so you can reference the same property using tc.shortname. classdef testCla...

5개월 전 | 2

| 수락됨

답변 있음
making a custom way to train CNNs, and I am noticing that avgpool is SIGNIFICANTLY faster than maxpool in forward and backwards passes…
I think the pooling operations are simply not optimized for the specific situation when the pooling is tiled (i.e., poolsize=str...

6개월 전 | 1

| 수락됨

답변 있음
Trimesh plots diferently using trimesh(TO) vs trimesh(T,x,y,z)
You haven't attached your .mat file so we can't try to reproduce it. I would guess that the problem is that you've transposed th...

6개월 전 | 0

답변 있음
Gradients not recorded for a dlnetwork VAE
As the error message says, the call to dlgradient must occur within the function (in this case computeTotalLoss) called by dlfev...

6개월 전 | 0

답변 있음
Match cell array names with table names
You shouldn't have 20 tables. You should have 20 struct fields, Tables.W1=... %a table Tables.S1=... %another table and s...

6개월 전 | 0

답변 있음
Creating a string for loop.
Instead of separate variables, they should be struct fields, in.mp=[1,2,3]; in.bof=[11,12,13], and so forth. Then you can pro...

6개월 전 | 0

답변 있음
How to implement a Transformer with separate encoder and decoder inputs and cross-attention in MATLAB?
trainNetwork does not seem to support multiple inputs. trainNetwork is deprecated. You should be using trainnet, which supports...

6개월 전 | 0

답변 있음
low weighted cross entropy values
There are a few possible reasons for the discrepancy that I can think of, (1) Your norm_weights do not add up to 1 (2) You hav...

6개월 전 | 0

| 수락됨

답변 있음
How to avoid trimming of string cells got by readtable method?
filename='tst.xlsx'; opts = spreadsheetImportOptions(DataRange='A1'); opts=setvaropts(opts,WhiteSpaceRule='preserve'); my...

6개월 전 | 0

답변 있음
Special case of function not found even when in current directory or on path
It's because the file is preparsed to see if matlabbugfun1 is being used as a variable name or as a function name. You can avoid...

6개월 전 | 0

| 수락됨

답변 있음
How can I perform partial trace for a pure state with four subsystems?
Does this do what you want? % reshape |psi> into tensor (s1,s2,s3,s4) psi_tensor = reshape(psi,[2,2,N,N]); % reorder to gro...

6개월 전 | 0

답변 있음
MATLAB graph/cyclebasis: How can I extract labeling-independent “minimal loop units”?
This might help: https://www.mathworks.com/matlabcentral/fileexchange/73630-spatialgraph2d node = [ 2 7 2 3 3 4 4 5 5 6 ...

6개월 전 | 1

답변 있음
Access class methods in one line only when you use brackets after class name.
The phenomenon you are seeing goes beyond just classes. Data is the name of a function (the class constructor). As explained her...

6개월 전 | 0

| 수락됨

답변 있음
How to use Markov Chain Monte Carlo for data fitting
I assume your Python user friend was talking about PyDREAM, https://pydream.readthedocs.io/en/latest/installation.html and th...

6개월 전 | 0

답변 있음
Get mean of a matrix which has NaN in it
grades = [2,4,6; 5, NaN, 1; 7, 2,NaN] mean(grades,'omitnan')

6개월 전 | 0

| 수락됨

답변 있음
Making random to work like randi
idx = floor( (N_clusters-1)*rand(N_clusters,1) )+1

6개월 전 | 1

답변 있음
Help with Plotting the Envelope of a Scatter Plot in MATLAB
load xy x=x(:); y=y(:); [G,yg]=findgroups(y); xmin=splitapply(@min,x,G); xmax=splitapply(@max,x,G); [yg,is]=sort(yg...

6개월 전 | 0

| 수락됨

답변 있음
How we can calculculate the MTF from PSF?
MTF=abs(fft2(PSF)); MTF=fftshift(MTF/MTF(1));

6개월 전 | 0

답변 있음
How can i classify shapes on this image as square, rectangle and circle?
See here, https://www.mathworks.com/matlabcentral/answers/116793-how-to-classify-shapes-of-this-image-as-square-rectangle-trian...

6개월 전 | 0

답변 있음
How to classify shapes of this image as square, rectangle, triangle and circle?
Fit a polyshape to each of the objects by downloading bwlpolyshape() https://www.mathworks.com/matlabcentral/fileexchange/18142...

6개월 전 | 0

답변 있음
Combining one matrix into another that are of different sizes
n = 36; V = kron( eye(2) , [ 0 1 0; -1 0 0; 0 0 1]) ; V(end,n)=0; K=numel(1:3:32); Tx=cell(1,1,K); Tx{1}=V; for k = 2:...

6개월 전 | 1

답변 있음
Problem with mesh grid and intersection of two surfaces
Perhaps as follows: tol = 1e-8; pas = 0.001; [N11, N31] = meshgrid(0:pas:0.01); N11=N11(:); N31=N31(:); %% Polynôme 1 A...

6개월 전 | 0

답변 있음
Switching values around in a matrix
A = [2 5; 9 7; 10 2; 3 2; 1 9]; B([1:2:10,2:2:10],1)=A(:)

6개월 전 | 0

| 수락됨

답변 있음
problem using trisurf in a gui
The "hold on" command doesn't prevent it from starting afresh every time. Use, hold(ax2,'on')

6개월 전 | 0

| 수락됨

답변 있음
can i change how load function operates?
You cannot, unfortunately.

6개월 전 | 0

답변 있음
Focus doesn't switch from editor to command window when runnning m file R2025A
Use inputdlg instead.

6개월 전 | 0

답변 있음
Running into problems using the latex interpreter in strings
There are two issues, mainly. (1) You should set the Interpreter first (before the String), to avoid the warnings (2) Because ...

6개월 전 | 0

| 수락됨

답변 있음
Undock the variables window
Yes, you can undock the Variables Editor, and pretty much everything else.

6개월 전 | 0

답변 있음
Some enumeration members are unrecognized
I'm not encountering any problems in 2024b. Perhaps you forget that you implemented a disp method, which displays those members ...

7개월 전 | 0

| 수락됨

답변 있음
How to avoid redefining optimoptions in Simulink for real-time nonlinear optimization with fmincon (SQP)?
You can use global variables (but with care). function y = fcn(u) global lb ub options y = fminbnd(@(x) f1(x,u),lb,ub,...

7개월 전 | 0

더 보기