Answered
Efficient method to find all intersections of triangulation edges?
The closed form parametric solution for the intersection of two edges is easily derived using the Symbolic Toolbox: syms xa xb ...

6 years ago | 0

| accepted

Answered
Compute approximative common eigenvectors basis between two matrices as a function of tolerance
rather building an approximative common eigenvectors basis X between 2 matrices A and B such as : A X_i = a_i X_i and B X_i = b...

6 years ago | 0

Answered
interpolate 3D plane
https://www.mathworks.com/matlabcentral/answers/723053-solve-plane-equation-with-3-points-and-additional-condition#answer_603073...

6 years ago | 1

Answered
search smaller string array to bigger string array
selected={'a', 'gg' 'c'}; Alllist={'a', 'b' ,'d' 'ee' ,'ff' 'gg'}; mask = ~ismember(selected,Alllist) or mask = ~contains(...

6 years ago | 0

| accepted

Answered
Solve plane equation with 3 points and additional condition
You can use my planefit() utility [abc,d]=planefit([p1;p2;p3].'); d=-d; function varargout=planefit(xyz) %Fit 3D plane to ...

6 years ago | 2

Answered
Sort a n array for maximum number of recurring values and storing the indexes corresponding to erased components
a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9]; s=diff([inf,a])~=0; ...

6 years ago | 0

| accepted

Answered
how I can draw the graph for system of equation when x and y variables are coming inside the coefficients matrix.
A system of 2 equations in 2 unknowns generally has a finite number of solutions. It therefore does not define y as a function o...

6 years ago | 1

Answered
How to plot this implicit function?
It doesn't appear to be a very interesting function. fun=@(Delta,f) (9*(Delta/10)^(1/2))/125 + (pi - atan((18*f*pi*(Delta/10)^(...

6 years ago | 0

| accepted

Answered
Summing up rows of a cell containing 3D matrices
C=reshape( cat(2,Cell{:}) ,[30,30,5,5,30]); Final=reshape( sum(C,3) , 30,150,30);

6 years ago | 1

| accepted

Answered
How to find the first zero element in any column of a m by n matrix
I don't understand what your posted code is trying to accomplish, but you can find the first zero in each row without looping as...

6 years ago | 0

| accepted

Answered
Generating mathematical equation from known discrete values of frequency, amplitude and phase
No, there is no reason why a closed form equation would exist for any arbitrary signal. However, you can interpolate the discret...

6 years ago | 0

Answered
How can I create a 22x22 Matrix from 231 values of the triangular matrix?
load(websave('Tri.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/493054/Tri.mat')); N=roots([1,1,-2*num...

6 years ago | 1

| accepted

Answered
How do I create a matrix based on another matrix?
NumElem=4; N=[1 0 1 0; 3 0 1 1]; E=zeros(NumElem,3); E(N(:,1),:)=N(:,2:end)

6 years ago | 0

| accepted

Answered
Error in fsolve (line 219) fuser = feval(funfcn{3},x,varargin{:}); Caused by: Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.
This usually means that you didn't test your objective function to verify that it works before giving it to fsolve.

6 years ago | 0

Answered
How can I use fmincon into the SPMD when the parameters of objective function differs from on workers to another?
You can use spmd to create the u data on the workers, but then use a parfor loop to do the optimizations. spmd u=labindex; %c...

6 years ago | 0

Answered
Linear Interpolation code ...
p=interp1(x,y, ceil(x(1)):floor(x(end)) );

6 years ago | 1

| accepted

Answered
Multiple Parameters in fmincon
I'm not sure why you are using fmincon for something that has a simple, non-iterative solution: C=[cov1(:).^0,cov1(:),cov2(:)];...

6 years ago | 2

Answered
How to find a value X of given Y close to 0, where the value X comes at the first place
damp_ratio=[ -100.00 -100.00 -100.00 -100.00 -100.00 -100.00 -100.00 100.00 100.00 100.00 100.00 ...

6 years ago | 0

| accepted

Answered
Replace diagonals in a matrix
For example, A=rand(10), mask=tril( triu( true(size(A)), -2 ), +2); B=A.*mask

6 years ago | 0

| accepted

Answered
ROI of a ring area?
For example, [x,y]=deal(1:1000); dsq=(x-400).^2 + (y(:)-300).^2; ROI = (50^2<=dsq & dsq<=100^2 ); imshow(ROI)

6 years ago | 0

Answered
indexing a set in an array
[k,l]=deal(1:1000); SET=(k.'-k0).^2+(l-lo).^2 < R^2;

6 years ago | 0

| accepted

Answered
HOW TO SHIFT COLUMN AND ROW MATRIX
x=repmat([1 2 3 4],4,1); x(6,6)=0 perm=[1,2,5,6,3,4]; x(perm,perm),

6 years ago | 1

| accepted

Answered
Calculation of Rotation in 3D space
You can use absor() https://www.mathworks.com/matlabcentral/fileexchange/26186-absolute-orientation-horn-s-method to register ...

6 years ago | 1

Answered
how to change values within an array to NaN
zn = F(xn,yn); bad = (1280 <= xn & xn<=1950) & (3025 <= yn & yn <= 4000) ; zn(bad)=nan;

6 years ago | 0

| accepted

Answered
Failure in initial objective function evaluation in FMINCON function
This loop does not make sense, because in the workspace of Cost(), the variable U only has 1 column. for i=1:Np x(: ...

6 years ago | 0

Answered
Finding domain and range with polyfit/polyval
In theory, you would do, [c1,c2]=deal(coef); c2(end)=c2(end)-15; r1=roots(c1); r2=roots(c2); time=r2(r2>43 & r2<45) - r...

6 years ago | 1

Answered
Define a collection of variables
Since you already have the data in table form, you can just do things like, mdl=fitlm(T(:,["Albania","Afghanistan","sales"]))

6 years ago | 0

| accepted

Answered
Getting the "Error running optimization. Too many output arguments." when running fmincon with gradient option in derivatives.
Any idea on where the issue may be? It sounds like you have set SpecifyObjectiveGradient=true. However, it does not appear from...

6 years ago | 0

| accepted

Answered
Passing options from subclass constructor to superclass?
Can't you just convert the options structure back to a cell array of name value pairs and use that to call the super class cons...

6 years ago | 0

| accepted

Answered
How can I recognize a mesh of points on the same plane?
In this example there are 11 frames, which are 2D structures made up of points located on the same plane and that said plane is ...

6 years ago | 0

Load more