Answered
parametrization of an ellipse
syms x y real ellipse=(x^2)/16+(y^2)/25==1; a=abs(solve([ellipse,y==0]).x(1)) b=abs(solve([ellipse,x==0]).y(1))

4 years ago | 0

| accepted

Answered
How do you find radius from input circle?
syms x y real syms r real positive c=2*(x-3)^2 + 2*(y+7)^2 == 8; c0=str2sym(extractBefore(char(c),'==')); sol0=solve...

4 years ago | 0

| accepted

Answered
So i want to curve fit special function ?
Just do an analytical fit, RSSI = [ -42.11, -46.395833333333336, -48.40816326530612, -53.91836734693877, -60.52542372881356, -5...

4 years ago | 1

| accepted

Answered
I have differnt coodinate after use fmincon
x0=[0 0]; lb=[-1 -1]; ub =-lb; fmincon(@distance,x0,[1,1],2,[],[],lb,ub) function f = distance(x) A=x(1); C=x(2); f= (...

4 years ago | 0

| accepted

Question


Is there a function to find the paired factors of an integer?
Is there a function in Matlab to find the pairs of factors that multiply together to give a specified integer, e.g, F=somefunc(...

4 years ago | 1 answer | 0

1

answer

Answered
Covert vector into an image using matlab?
n is not a perfect square, so sqrt(n) will not give you valid integer dimensions for your image. Choose different dimensions.

4 years ago | 0

Answered
how to check if inputs for my function are strings or vectors
function [output] = function(varargin) varargin(4:end)=[]; valid=all( cellfun(@(z)isstring(z) | isvector(z),varargin) );...

4 years ago | 0

Answered
Using optimization algorithms to find minimum path with obstacles
You could represent the forbidden area by a polyshape object, pgon, then form a nonlinear constraint function compatible with fm...

4 years ago | 0

| accepted

Answered
Using optimization algorithms to find minimum path with obstacles
It's doubtful you can do it with fmincon, but you might be able to do it by creating a graph object to model steps between allow...

4 years ago | 0

Answered
Align and stitch non-overlapping images
As seen from here, the blocks of 32 measurements can be slightly shifted vertically by few(1-4) pixels, So, wiuth 4 blocks and ...

4 years ago | 1

Answered
3D cylinder code debugging
Much of your code seems to be an unnecessary reinvention of the cylinder() command. nCS = 2; %number of cross section of cylind...

4 years ago | 1

| accepted

Answered
Resampling matrices in a loop using interp2
It is wasteful here to use meshgrid. Also, you should hoist C and R out of the the loop since they don't change with i: %re...

4 years ago | 1

Answered
Different output for find(X) and find(X<5)
Because the argument you've passed to find() is (X>0) which is a logical array. Therefore, the values returned are taken from th...

4 years ago | 1

Answered
Error 'lscurvefit' (Function value and YDATA sizes are not equal)
Since you have no bounds on K, you should probably just solve for K analytically, rather than iteratively with lsqcurvefit: K=(...

4 years ago | 0

Answered
Error 'lscurvefit' (Function value and YDATA sizes are not equal)
f = @(K, x) K(1) + K(2)./ x + K(3)./ x.^2;

4 years ago | 1

| accepted

Answered
Rounding a decimal down
x=0.147; floor(x*100)/100

4 years ago | 2

| accepted

Answered
How to store the results of a loop in matlab.
[B,C,m,k,c]= deal(cell(1,20)); A=nan(1,20); for t = 1:20 z=t-1; m{t}= [1.0, 0.89*sin(0.17*z); 0, 1...

4 years ago | 0

Answered
How to assign point name to points in an array and then plot them ?
names={'Jack','Fred','Emily','Carol','Donald'}; A = [0,1.5+1.5i,4.5i,-6.75+6.75i,-20.25]; n=numel(A); H=plot(graph(speye(n)...

4 years ago | 0

Answered
How to assign point name to points in an array and then plot them ?
Hi all, I would like to name my points that are inside a matrix. You could convert the matrix to a table with row names that yo...

4 years ago | 1

Answered
Can a function known whether/which specific output is ignored (tilde operator)?
You can do it with this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/121487-outputnames but there are so...

4 years ago | 1

Answered
Equivalent of inputname() for output variables
I've implemented Jan's idea in this FEX submission, https://www.mathworks.com/matlabcentral/fileexchange/121487-outputnames b...

4 years ago | 0

Submitted


outputnames
Get a list of the output argument names of the currently executing function.

4 years ago | 26 downloads |

0.0 / 5

Question


Why doesn't evalin('caller','nargout') work?
Why doesn't the mynargout() function correctly return n=3? How can one programmatically evaluate nargout in the calling functio...

4 years ago | 1 answer | 0

1

answer

Answered
Numerical calculation of Hessian for a very complex problem
but this neighboorhood might be super small region about x0 and I do know how small it is. I assume you meant to say you don't ...

4 years ago | 0

Answered
making a connectivity array for an ellipse based of rectangles and traingles
Using spatialgraph2D from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/73630-spatialgraph2d load x...

4 years ago | 0

| accepted

Answered
How to remove NaN from matrix / remove the dark blue pixels in the ocean
You can't remove the NaNs and keep the original rectangular shape of the matrix without replacing the NaNs with another value, e...

4 years ago | 0

| accepted

Answered
Efficient way of Vectorization
Unfortunately, this is a situation where the for loop is the fastest option. This is because vectorized solution does much more ...

4 years ago | 1

| accepted

Answered
how extract two arrays in matlab of unequal length
Yes interp1 to sample the curves at corresponding points. Then you can subtract them freely.

4 years ago | 0

| accepted

Answered
initial point is a local minimum. Optimization completed because the size of the gradient at the initial point is less than the default value of the function tolerance.
I suspect your FiniteDifferenceStepSize is too small. Be mindful of the guidelines for Optimizing Differential Equations.

4 years ago | 0

Answered
Parameters seem to not be optimizing in fmincon
If the exitflag says a minimum was found then there is probably nothing suspect about the solution or the way it was reached. Th...

4 years ago | 0

Load more