Answered
How to get around sparse row deletion for least squares calculation
No, probably not. You might try pagemldivide instead, thereby avoiding sparse matrices altogether.

3 years ago | 1

Answered
Referencing an object property within the set method for a different property
This may seem cumbersome to you, but the robust way to deal with this is to make any property that can trigger an event Dependen...

3 years ago | 0

| accepted

Answered
How to fill zeros and NaNs with the average of the previous nonzero consecutive values
Using this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetition...

3 years ago | 1

| accepted

Answered
How to only keep the legends I want
Go into the Parent/Child properties of the locus you want removed from the legend and set HandleVisibility to 'off'. ...

4 years ago | 0

| accepted

Answered
Dividing image in two equal horizontal parts
Left=Image(:,1:round(end/2)); Right=Image(:,round(end/2)+1:end);

4 years ago | 0

Answered
How about matlab size function ?
You have not overloaded the size method appropriately for the case where nargout=1: a = testSizeFunction; siz=size(a) Try t...

4 years ago | 0

| accepted

Answered
optimization: have function return NaN but not at initial point
Setting the objective to NaN should not be seen as a substitute for constraints. If there is a region where your objective funct...

4 years ago | 0

| accepted

Answered
Implementation of an overlap constraint in linear programming problem
Instead of a distance matrix, the columns of A should be a TxN matrix where T is some number of discrete time points over which ...

4 years ago | 1

| accepted

Answered
Concatenating cells according an external vector
A = [7;3;4;13;20;3;1]; B = [11;11;11;15;15;24;24]; E=splitapply(@(x) {x}, A, findgroups(B)); E{:}

4 years ago | 1

| accepted

Answered
Referencing an object property within the set method for a different property
You can create a processNotification() method and do all the necessary property referencing there instead: function pro...

4 years ago | 0

Answered
Find circle in image
How about this (requires this Download), load BWImage BW0=BW; se=strel('disk',5); BW=imclose( bwareaopen(BW,3), se ); BW=...

4 years ago | 0

Answered
How do I use the Levenberg-Marquardt algorithm for lsqcurvefit?
Here's a silly solution to the problem. The fit will be meaningless, however. opts = optimset('Display', 'off'); params0 = [0...

4 years ago | 0

Answered
How do I use the Levenberg-Marquardt algorithm for lsqcurvefit?
If the signal is supposed to be smooth, it would make sense to add some sort of roughness penalty term to the reisduals, e.g., ...

4 years ago | 0

Answered
How to plot curve y=a*x with changing parameter a?
You can create an app that does so, similar to this example: https://www.mathworks.com/help/matlab/creating_guis/create-a-simpl...

4 years ago | 0

| accepted

Answered
How do I fix this error?
Shouldn't your input layer be, sequenceInputLayer(inputSize,'Name', 'input','MinLength', time_points)

4 years ago | 0

| accepted

Answered
Cut region of interest images from 3D stack with known indices and without for loop
I doubt anything will be faster than a loop, but you can try this: array = [1,2,3;4,5,6;7,8,9]; array(:,:,2) = [1,2,3;4,5,6;7,...

4 years ago | 0

| accepted

Answered
How to interpolate between a series of datapoints using a nested for loop?
Another loop-free solution: pts=4; x=[1,2,5]; s=numel(x); x_new=interp1(x, linspace(1,s, (s-1)*pts+1) )

4 years ago | 1

Answered
How to interpolate between a series of datapoints using a nested for loop?
If pts is a power of 2, there is a simpler (and loop-free) method using interp2, pts=4; x=[1,2,5]; x_new=interp2([x;x]...

4 years ago | 0

Answered
How to interpolate between a series of datapoints using a nested for loop?
pts=20; x = [48.105633802816904, 49.725352112676056, 52.47887323943662, 56.04225352112676, 57.82394366197183, 60.091549295774...

4 years ago | 1

| accepted

Answered
I am having issues while using fmincon to solve optimization problem
cEq = [s(end)-d; v(end)-v_f; a(end)-a_f];

4 years ago | 0

| accepted

Answered
Image undistortion with fixed camera position and single calibration image
You could also browse the File Exchange for submissions that do single image calibration. Here is one example, though I have not...

4 years ago | 0

Answered
Image undistortion with fixed camera position and single calibration image
My recommendation is that you first calibrate your camera for intrinsic and lens distortion parameters. These parameters do not ...

4 years ago | 0

| accepted

Answered
alternatives to gradient-based optimization algorithms like lsqnonlin that handle at least O(10) parameters?
The parameters that I am optimizing (the function values) have to represent a convex function in 1d. Another strategy that I wo...

4 years ago | 0

Answered
Planes and vectors in 3d
Clearly they all cut the plane since their z-components are all greater than 1. More generally, if P is a point, plug t*P into ...

4 years ago | 0

Answered
Fixing fzero in standard normal distribution
Note that your problem has a closed-form solution, i.e. fzero is not necessary: X = 440; Z = -2.33; syms n; assume(X-500*n<=...

4 years ago | 1

Answered
alternatives to gradient-based optimization algorithms like lsqnonlin that handle at least O(10) parameters?
it seems that this class of optimization algorithms can handle a small number of parameters (10,...,20) well, but are not approp...

4 years ago | 1

| accepted

Answered
How to calculate the point belonging to a line from an exterior point and a distance between the exterior point and the desired point
There are two such points: Xa= 141.056072111132; Ya= 2.466917308864894e+03; Xb= 137.926340439225; Yb= 2470.81925749382; ...

4 years ago | 0

Answered
Optimize Center of Circle given noisy data points on arbitrary Plane?
Go to the examples tab of this FEX submission https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-...

4 years ago | 0

Answered
How to combine desired cropped image to another image?
You can adjust the AlphaData property of the image to make certain regions of the mask image transparent.

4 years ago | 0

Answered
splitapply with multiple output variables
quantGroups = findgroups([locAwayFromMean{:,12}]); % grouping info as vector X=cell2mat(locAwayFromMean(:,11)); I=1:numel(...

4 years ago | 0

| accepted

Load more