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

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

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

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

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

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

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

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

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

3 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)} );

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

3 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])

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

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

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

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

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

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

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

3 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))])

3 years ago | 1

| accepted

Answered
Identify coordinates of nodes in a matrix above/below the coordinates of a plane
Yes, dot(normal,point)>0 %above the plane (the direction the normal is pointing) dot(normal,point)<0 %below the plane

3 years ago | 0

| accepted

Answered
how to calculate scalar with matrix
Don't see any reason why you'd have to reinvent eigendecomposition: lambda=eig([-30,-20; -20 -40])

3 years ago | 0

Submitted


Object-oriented tools to fit/plot conics and quadrics
A tool set for fitting and/or plotting various conics and quadric surfaces, e.g., ellipses, cylinders, spheres, planes, cones, a...

3 years ago | 2305 downloads |

5.0 / 5
Thumbnail

Answered
vectorization of a for loop with an if else statement and running over 4 indices
Here's a vectorized solution. Note that the only reason the permute() operation (which is expensive) is needed is because your c...

3 years ago | 0

| accepted

Answered
Color quadrant of ellipse
Using this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-to-fit-plot-conics-an...

3 years ago | 0

Answered
Jumps in roots finding solutions
I think you'll see continuity if you sort the roots.

3 years ago | 0

| accepted

Answered
Speed performance between class, struct and local variable
Well Case 1 and Case 3 have more indexing operations, so it makes sense that that overhead should dominate assuming the + and .*...

3 years ago | 0

| accepted

Answered
What formula for r-squared does fitlm use in the weighted linear regression case?
It is as described here, https://www.mathworks.com/help/stats/coefficient-of-determination-r-squared.html

3 years ago | 0

Answered
How can I find the radius of this object, preferably at multiple x,y points for a consistent output?
You can use circularFit() from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-t...

3 years ago | 1

| accepted

Answered
Follow up to Previous Question
Just call the function, and omit a semicolon to see what its output is. However, your functions will not give nontrivial results...

3 years ago | 0

| accepted

Load more