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

3 years ago | 1

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

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

3 years ago | 1

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

3 years ago | 0

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 0

Answered
Any update on lsqcurvefit with gpuArray?
I recently had a conversation with the Mathworks about adding gpuArray support to Optimization Toolbox Solvers. The transcript i...

3 years ago | 0

Answered
Shifting elements and replacing empty places with zeros
The B that you have provided is not what the title of your post describes. I assume you meant the following, A =[3 ,7, 9, 2]; ...

3 years ago | 0

| accepted

Answered
Is it possible to seal a class constructor method
Constructors are always sealed innately. The child class method that you've created with the same name as the parent constructor...

3 years ago | 1

| accepted

Answered
I'm using the online trial version, and I cannot see computer vision tool box; did I miss anything?
The Computer Vision Toolbox is not an app that needs to be run separately within Matlab. Like any toolbox, it provides you with ...

3 years ago | 0

| accepted

Answered
Why result of conv and point wise multiplication has different result?
In one case, you are using conv(___'same'). The 'same' flag will throw away some of the resulting points. In the second case, ...

3 years ago | 0

Answered
fmincon for multiple variables
Y = double( (1-y1)+(1-y3)+(y2) ); But I don't see why you are using vpa and other sym operations. I don't think it really incre...

3 years ago | 1

| accepted

Answered
Cumsum resulting in cumulative error compared to looping
Is this just a result of the loss of precision as the vector index increases? Yes The error will accumulate more with cumsum(),...

3 years ago | 0

| accepted

Answered
Avoiding for loop: Ordering and assigning order of Group data
tdata = table(["US";"US";"US";"UK";"UK";"TW";"TW";"TW";"TW"], [1;1;5;1.20000000000000;3;4;5;1;2],'VariableNames',{'name','Loss'}...

3 years ago | 0

| accepted

Answered
(par)for k=1:N end; select for or parfor loop without code replication
You can avoid replicating the loop code as follows. numWorkers={}; % or whatever if ~parflag numWorkers={0}; end par...

3 years ago | 2

| accepted

Answered
penalty value of matlab ga optimization
It is the solution that ga thinks is the global optimum.

3 years ago | 0

Answered
Interpolation between 3D data sets. Neural Networks or Other Methods?
Some of the routine interpolation functions to consider would be: griddedInterpolant, scatteredInterpolant, interp3, griddata,gr...

3 years ago | 0

Answered
Converting the outpur of a fit (e.g. sfit) into a string format, then pasting the text to a Text Area in app desginer
I don't know how I can convert the output of a fit, which in my case comes as the class "sfit", into a text format that can then...

3 years ago | 0

Answered
How to extract sequences from a table?
Another option, using varfun: load FCTable T=FCTable; T.tradeDate=dateshift(FCTable.tradeDate,'start','day') ; out = var...

3 years ago | 0

Answered
How to extract sequences from a table?
Calling your table T, out = splitapply(@(x){x} , T{:,[1:10,12:end]},findgroups(T.tradeDate))

3 years ago | 1

| accepted

Answered
find element a content in b..
I don't know why you think there should be a 4 in the result. a = [5 20 0 3 5 1 1 10]; b = [3 ...

3 years ago | 0

| accepted

Answered
Speed up gain by GPU parallel processing
The operations that benefit from GPU acceleration are vectorized matrix operations and commands, e.g., https://www.mathworks.co...

3 years ago | 0

Answered
Problem in Deep Learning training process
If I had to guess (I do have to), it is because numClasses=1 and you only have one label, accidentally of course. This response ...

3 years ago | 1

| accepted

Answered
Moving window Autocorrelation. One pass algorithm. Speed and Stability concerns.
y=circshift(x,-window_step); w=normalize(ones(1,window_size),'n',1); Ex=cyconv(x,w); Ey=cyconv(y,w); Exy=cyconv(x.*y,w);...

3 years ago | 0

Answered
Side by side boxplots
https://www.mathworks.com/matlabcentral/fileexchange/46545-alternative-box-plot?s_tid=ta_fx_results

3 years ago | 0

Answered
Create a cylindrical mask in a 3D matrix
Coordinates of the center of the two faces of the cylinder. Call this c1,c2 The radius of the cylinder. Call this r The size o...

3 years ago | 0

Answered
how to curve fit a sine wave to some data
One way, assuming you have the Curve Fitting Toolbox: fobj = fit( time, Channels(:,iChan) ,'sin1')

3 years ago | 1

| accepted

Answered
How to remove inner edge of the target?
load('Edge_logical.mat') imshow( edge(imfill(Edge_S1,'holes')) ,[])

3 years ago | 1

| accepted

Load more