Answered
A bug? input: 1/0 output: -Inf
Theorem: 1/0 = Inf if and only if 1/0 is also -Inf. Proof: Assume first that 1/0=Inf and let us deduce the implication that 1/...

2 years ago | 0

Answered
Can figure numbers be re-assigned?
The only reliable way that I have found, one which avoids copyobj and keeps all the figure formatting, is to save all open figur...

2 years ago | 0

Answered
Speeding up this function involving 3D matrix multiplications.
Don't use permute(___,[2,1,3]) to transpose the pages in conjunction with pagemtimes. Use the transposition flags, Z = pagemtim...

2 years ago | 2

| accepted

Answered
lsqcurvefit claiming complex-valued function
Because the log of a negative real number is complex, e.g., log(-2)

2 years ago | 0

Answered
cubic spline interpolation - mixed boundary conditions possible?
This FEX download will let you impose conditions like that, https://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shap...

2 years ago | 0

Answered
How to color Gaussian 3D plot with shiny texture?
[X, Y] = meshgrid(-3:0.1:+3); Z = exp(-X.^2-Y.^2); surf(X,Y,Z,'FaceColor',[0.6 0.1800 0.700],'EdgeColor','none'); light...

2 years ago | 1

| accepted

Answered
Stationary point Code Error. Trying to find stationary points for the equation below. Was having a hard time doing it by hand so tried a code.. getting error for fsolve.
The problem is strictly convex, so obviously the staitonary point is unique and lies at the global minimum. So why not just use ...

2 years ago | 0

Answered
Access to non-public class members
You could move the classdef to an @-folder, either manually or programmatically and either temporarily or permanently. Then, add...

2 years ago | 1

| accepted

Answered
How to rotate image_1 according to image_2?
Use imregister or imregtform with a "rigid" transform type.

2 years ago | 0

Answered
How to adjust printing compatible with tiledlayout and labels?
Enlarge the figure window.

2 years ago | 0

| accepted

Answered
Unable to find explicit solution in Lagrangian optimization
If you make rho explicit, it seems to be able to find solutions. I doubt there would be a closed-form solution for general rho. ...

2 years ago | 1

Answered
Get visible vertices of a 3D mesh.
You could, (1) Use campos to get the position of the camera. (2) Draw rays from the camera center to each of the vertices. (3...

2 years ago | 0

Answered
How do you count the number of holes for an image with a lot of noise?
Using bwalphaclose() from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/90762-further-tools-for-analy...

2 years ago | 1

| accepted

Answered
How to remove exponential answers
x=3.471066e-01; relerrorpercent= 4.807316e-02; fprintf('\n x=%.5f \n',x) fprintf(' relative error = %.5f percent \n',relerr...

2 years ago | 2

| accepted

Answered
out of memory error when write matrix
You could make it sparse, A=sparse(N,N); but be mindfult that if you then want to populate the A(i,j) with non-zero numbers, i...

2 years ago | 0

Answered
Fundamental matrix and epipolar lines from stereo calibration slightly off
The position of the checkerboard isn't supposed to be part of the camera model. It's the relative poses of the two cameras that ...

2 years ago | 0

| accepted

Answered
error Unrecognized function or variable help me please :(!
Perhaps as follows? signalsCell=load('signals').signals; PlotSignal(signalsCell, 3) function PlotSignal(signalsCell, n)...

2 years ago | 0

Answered
Can you update ROIs through interactions on the image after they are first created using dimensions?
The version of your code that uses pause() works fine for me. However, I think it would be more convenient to use wait(). With w...

2 years ago | 0

| accepted

Answered
Is there a way to "vectorize" this segment of code?
I'm going to guess that this is what you are trying to do. permsList=string(randi([0,9], 5,4)) permsNbrs = str2double(permsLis...

2 years ago | 3

Answered
How do I control the output class of combine() with multiple image and trasnformedimage datastores?
imdsTransformed = transform(imds,@(x) {imresize(x,targetSize)} );

2 years ago | 0

| accepted

Answered
can fmincon handle dynamic constraints ?
By "dynamic constraints" it sounds like you mean nonlinear constraints. If so, yes, that is what the nonlcon argument is for, x...

2 years ago | 1

| accepted

Answered
How to fill in a zeroes matrix using data from a separate array.
Sounds like a job for accumarray, e.g, requirements=[1 2; 2 3; 3 4; 4 6; 5 8] matrix = accumarray(requirements,1,[40,40])

2 years ago | 1

| accepted

Answered
Newton Raphson implementation, not converging, maybe error in implementation
A simple transformation of variables z=dd/2/aa makes this problem, and its solution by NR, much easier. In particular, you can t...

2 years ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
Your code assumes that solve() will always return one and only one solution. There is no reason to think that will always be the...

2 years ago | 0

Answered
matrix convertion needs modification
Perhaps this is what you had in mind? x = [9 3.6 9; 11 3.6 9; 9 4.4 9; 11 4.4 9; 9 3.6 11; 11 3.6 11;9 4.4 11; 11 4.4 11]; X...

2 years ago | 0

| accepted

Answered
Vertical subplot dimensions do not match
No, it's not a bug. Graphics commands are not executed synchronously with the rest of Matlab. So, you cannot be sure the ultimat...

2 years ago | 0

| accepted

Question


dlgradient of a subset of variables
I would like to apply dlgradient to a parametrized function, which would allow me in some cases to get the complete gradient of ...

2 years ago | 2 answers | 2

2

answers

Answered
Proper usage of dlgradient
Is my understanding correct or is there a way to find dlgradient with numerical values as input? You haven't made it clear what...

2 years ago | 0

| accepted

Answered
derivative of parametric equations
It is possible with diff() and jacobian() in the Symbolic Math Toolbox, but for the expression you've shown, there is no need. T...

2 years ago | 0

Answered
Image processing for calculating length between two points on an image.
load BW2 [I,J]=find(bwmorph(bwskel(BW2),'endpoints')); [~,k]=mink(J,2); d=norm([ diff(I(k)), diff(J(k))])

2 years ago | 1

| accepted

Load more