Answered
Piecewise 3D plotting
Perhaps this is what you meant: syms Z(x,y) y1 = -0.00278018473212*x.^3 + 0.0764514697018*x.^2 + -0.481036946424*x + 4.3788560...

3 years ago | 0

Answered
Function Argument Validation: Comparing property size to a variable
No, you can't do that, because the object has to be able to instantiate properties before the constructor is called.Therefore, p...

3 years ago | 0

| accepted

Answered
Why doesn't parfeval(@splitapply) improve splitapply's performance?
If you're going to be using PCT functions anyway, I wonder if a parfor loop might do better than splitapply. I.e., instead of, ...

3 years ago | 0

Answered
Levenberg Marquardt algortihm as custom training function using dlupdate
Levenberg-Marquardt would only be practical for very small networks and training data sizes. That is the case in the code you've...

3 years ago | 0

Answered
Getting error in PARFOR in MATLAB
It looks like you are trying to read a file (with load()) while it's being written to. Perhaps you mean to do the reading first?...

3 years ago | 0

Answered
How do you write a function that adds all odd numbers between 2 even numbers?
As a hint, it is very easy to create a vector of consecutive odd numbers, e.g., x=(5:2:11)

3 years ago | 0

Answered
Calculation of a sum with variable values from textbox prompt
Then make a prompt with an input for each resistor value It shouldn't require multiple prompts, ...

3 years ago | 0

| accepted

Answered
How best and most efficient way to build this matrix
[C,R]=deal(zeros(1,10)); C(1:4)=[-4 6 -4 1]; R(1:2)=[-4,1]; A=toeplitz(C,R); A(1)=-2; A(end,:)=flip(A(1,:))

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

Answered
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...

3 years ago | 1

| accepted

Question


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

3 years ago | 1 answer | 0

1

answer

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

3 years ago | 1

| accepted

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

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

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

3 years ago | 0

Answered
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 ...

3 years ago | 1

| accepted

Question


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" ...

3 years ago | 2 answers | 1

2

answers

Answered
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...

3 years ago | 0

Question


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...

3 years ago | 1 answer | 0

1

answer

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

3 years ago | 1

| accepted

Answered
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...

3 years ago | 1

| accepted

Answered
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, ...

3 years ago | 2

| accepted

Question


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,...

3 years ago | 0 answers | 2

0

answers

Answered
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_...

3 years ago | 0

Answered
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...

3 years ago | 0

Answered
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(...

3 years ago | 1

| accepted

Answered
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(:)]

3 years ago | 0

| accepted

Load more