답변 있음
how concatenate arraycell in this strange way
c = {1 4}; d = {3 6}; num2cell( [cell2mat([c;d]')],2)'

2년 초과 전 | 0

| 수락됨

답변 있음
Is there a good way here to allow users to both retain access control for properties and overload indexing methods?
then the access property of that member becomes invalid at that point Nope, not true. Even if you don't define a subsref method...

2년 초과 전 | 0

| 수락됨

답변 있음
Register the point cloud data sets
Have you looked at this, https://www.mathworks.com/help/vision/ug/3-d-point-cloud-registration-and-stitching.html#StitchPointCl...

2년 초과 전 | 0

| 수락됨

답변 있음
Sum up meshgrids with different sizes and positions that overlap each other
Rather than using handle graphics to do this, it sounds like it would be better to use imrotate to make the various rotations of...

2년 초과 전 | 0

답변 있음
Max Pooling Layer Tuning
Your input image's spatial dimensions are 6x1. This is not compatible with a 2x2 maxpooling filter. Did you mean to have 2x1 poo...

2년 초과 전 | 1

| 수락됨

질문


Import desktop layouts into a newer release of Matlab
I have created and saved two personalized layouts for my Matlab Desktop, Now, ho...

2년 초과 전 | 답변 수: 1 | 0

1

답변

답변 있음
How do I validate an input method input by a object property?
classdef myclass properties(Access=public) Filenames cell {mustBeA(Filenames,"cell")} = {['Testrun_xxxx']} ...

2년 초과 전 | 1

| 수락됨

답변 있음
Why doesn't parfeval(@splitapply) improve splitapply's performance?
It probably means that Matlab's internal parallellization already does what parfeval does.

2년 초과 전 | 0

| 수락됨

답변 있음
extremely inefficient piece of code ... bug?
Well, I think the bottom line is just that the JIT does not have any optimization for indexing expressions like idx(idx<=0). Tha...

2년 초과 전 | 0

| 수락됨

답변 있음
How to create an indexable array of fid
fids are just numbers. You can allocate any double array to hold them.

2년 초과 전 | 0

답변 있음
Why is sum considerably slower that adding each individual element together, when using large loops?
Yes, unfortunately, vector indexing is quite an expensive operation. If idx is constant, as in your example, than you should do ...

2년 초과 전 | 1

| 수락됨

질문


Why is it necessary/useful to have a HandleCompatible attribute?
Setting HandleCompatible=true in a value class doesn't seem to change its behavior in any way, other than to allow it to "mate" ...

2년 초과 전 | 답변 수: 2 | 1

2

답변

답변 있음
When I use fmincon, the optimised result does not satisfy my non liner constraints
Since it is a 2D problem, it practically begs you to pre-sweep for a good initial guess: fun = @(x)4*x(1)+x(2); lb = [0.01,0...

2년 초과 전 | 0

질문


More multiplication operations require less time
I would expect the execution times for the 3 operations below to get longer and longer. Where have I misled myself? Is it an iss...

2년 초과 전 | 답변 수: 1 | 0

1

답변

답변 있음
How can I disable fminsearch function to print a warning message?
fminsearch(___, optimset('Display','off'))

2년 초과 전 | 1

| 수락됨

답변 있음
Reshaping with Different Sizes
There is no requirement that an index array be the same size as the array being indexed. Example: values=[20,30,40] values(o...

2년 초과 전 | 1

| 수락됨

답변 있음
Optimizing the coefficients of basis functions to fit a curve
You don't need any special curve fitting tool. Due to the linearity of the model, the coefficients can be found using mldivide, ...

2년 초과 전 | 2

| 수락됨

질문


CPU-gpuArray transfer speeds on modern GPUs
For a long time, the conventional wisdom has been that, when computing on the GPU, one should try to minimize CPU-GPU transfers,...

2년 초과 전 | 답변 수: 0 | 2

0

답변

답변 있음
Filling some of the 2d matrix arrays with having vector's indexes
Using accumarray, probably. However, you haven't described what values A(I,J) are supposed to be filled with and the role of my_...

2년 초과 전 | 0

답변 있음
Interpolate data between two specified contours
We don't know in what form your input data exists. Most of the contour plotting functions allow you to specify the isocontour le...

2년 초과 전 | 0

답변 있음
Why does my subtraction yield different results?
isequal(eps(x),eps(x_test))=1 does not establish that x=x_test. You misunderstand what eps() does. eps(1) eps(1.1) isequal(...

2년 초과 전 | 1

| 수락됨

답변 있음
How can I combine two double arrays into one but in different rows and columns within Matrix
A = [0;0;0;1;1;1;2;2;2]; B = [5,6,7,8;1,2,3,4;0,1,2,3]; b=B(:,2:end)'; C=[A(:),b(:)]

2년 초과 전 | 0

| 수락됨

답변 있음
What exactly are Handle Compatible Classes? Are they a combination of handle and non-handle classes?
I found that the objects defined by A do not belong to any class! Why is this happening? The syntax of of isa() is, isa(object...

2년 초과 전 | 1

| 수락됨

답변 있음
NONLCON must be a function using lsqnonlin
No, you have set the nonlcon argument to Cexp which is a numeric vector. You should review the documentation for the correct ord...

2년 초과 전 | 0

| 수락됨

답변 있음
Counting zeros which are lying between nonzero elements by considering consecutive zeros as a single element in a matrix
A=[1 0 1 1 1 0 0 1;0 1 0 1 1 0 1 0;0 0 1 0 0 0 0 0;1 0 1 1 0 0 1 1] d=diff(A,1,2); result= max(0, min( sum(d==-1,2) - ~A(:,...

2년 초과 전 | 0

답변 있음
Is there a way to have C1 continuous curve fit?
You could use this spline fitting tool: https://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-modeling ...

2년 초과 전 | 1

답변 있음
What functions need GPU support
Sparse array indexing would be one example, e.g >> A=gpuArray.speye(5) A = (1,1) 1 (2,2) 1 (3,3)...

2년 초과 전 | 0

답변 있음
How can I have similar left side starting point for multiple plots on tiledlayout?
You can use xlim to set where you want each plot to begin.

2년 초과 전 | 0

답변 있음
inline function returning multiple output variables
A wrapper is needed. tdata = table(["US";"US";"US";"UK";"UK";"TW";"TW";"TW";"TW"], [1;1;5;1.20000000000000;3;4;5;1;2],'Variable...

2년 초과 전 | 0

| 수락됨

답변 있음
How does imwarp interpolate data when using displacement fields?
No, in terms of what I would expect at least, a simple left shift is giving me the right thing (see below). I = imread('camera...

2년 초과 전 | 0

더 보기