Answered
Incompatible sizes of arrays.
but i got error "Arrays have incompatible sizes for this operation." Can someone explain why? It should be obvious from the d...

3 years ago | 0

Answered
Optimization: Capacitated Facility Location Problem
x=optimvar('x',[n,m],'Upper',0); y=optimvar('y',n,'type','integer','Lower',0,'Upper',1); objective=sum(f(:).*y(:))+sum(c(:)....

3 years ago | 2

Answered
How to plot an Ellipse
Using this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-for-fitting-conics-an...

3 years ago | 0

Answered
Computing centroid of a detection box after computing NCC between a template image and another image
Centroid=[xoffSet,yoffSet] + [size(temp,2),size(temp,1)]/2; plot(Centroid(:,1),Centroid(:,2),'ro');

3 years ago | 0

| accepted

Answered
Use array values as assignment indecis
The question has nothing to do really with ismember. It's more about how to turn a list of interval end points into indices. One...

3 years ago | 0

| accepted

Answered
why does my data kick up at the end after doing ifft(X)
why does my data kick up at the end Remember, because of the circulant property of IFFTs, the values near the end of the array ...

3 years ago | 0

Answered
How to reconstruct the images from the blocks of pixel?
imgCell=cell(1,31*45); for i = 1:31*45 imgCell{i} = imread(['C:\Users\Administrator\Desktop\' num2str(i) '.png']); end i...

3 years ago | 2

| accepted

Answered
2x2 Projection matrix of rank 1
a=[1; 2]; n=[3; 4]; x=[5; 6]; r1p(a,n,a) r1p(a,n,n) r1p(a,n,x) function p = r1p(a,n,x) % computes the action of P, the ...

3 years ago | 1

| accepted

Answered
Constrained multiple linear regression with multiple dependent variables
lsqlin is applicable with, N=size(beta,1); C=kron(X.',eye(N)); d=Y(:);

3 years ago | 0

| accepted

Answered
How to get property validation functions to show source file location on error?
It is very difficult to identify where the error occured. Running in debug mode will take you to the point where the error occu...

3 years ago | 1

| accepted

Answered
Compare each row of data with another vector data
tmp=[discretize(A,[B(:,1);inf],'Inc','left'),... discretize(A,[-inf;B(:,2)],'Inc','right')]; out=all(tmp==tmp(:,1),2);

3 years ago | 0

| accepted

Answered
Compare each row of data with another vector data
out=any(A(:,1)>=B(:,1).' & A(:,2)<=B(:,2).',2);

3 years ago | 0

Answered
Interpolating 3D Gridded data at specific cordinates
[Long,Lat,Height] = deal(0:5:360,-90:5:90,0:15:600); %Fake data Temp = rand(73,37,41)*1000; LUT=griddedInte...

3 years ago | 0

| accepted

Answered
Optimize fair teams when team size is can vary.
Instead of using kron to set up your initial matrix idx, use blkdiag: nPlayers=17; minTeams=floor(nPlayers/5); %minimum numb...

3 years ago | 0

| accepted

Answered
can we solve linear matrix inequalities by using only matrix forms?
As Torsten says, A*x>b generally corresponds to not one x, but an entire polyhedral region of them. However, if the region is bo...

3 years ago | 0

Answered
How to extract the input values for an optimized output value in a GA optimizer
You have not shown us the code for the GA app that you are using, but generally speaking, there should be a line in there which ...

3 years ago | 0

Answered
How to rearrange tables
Boxes=tbl.BBOX; Labels=cellfun(@string, tbl.Class,'uni',0); newtbl=table(Boxes,Labels);

3 years ago | 0

| accepted

Answered
Interpolating 3D Gridded Data in Matlab
This might be easier: LUT= griddedInterpolant(Long1,Lat1,Height,Temp1,'linear','linear'); %create interp object newgrid=LUT....

3 years ago | 1

| accepted

Answered
Vector form of for loop?
e=norm(yo-ye).^2/M/N

3 years ago | 0

| accepted

Answered
Interpolation of time series of data at X and Y coordinates
Use scatteredInterpolant or griddedInterpolant depending on whether your (X,Y,t) data is scattered or gridded.

3 years ago | 1

| accepted

Answered
How to find coordinates of intersecting line?
fs= 8192*2; % sampling frequency dt = 1/fs; % sample time ...

3 years ago | 0

| accepted

Answered
I have a new laptop but am having trouble transferring matlab onto it from old dead laptop
Just download it again onto the new laptio from the license center, https://www.mathworks.com/licensecenter/licenses/40773130/5...

3 years ago | 0

Answered
Solver stopped prematurely. fmincon stopped because it exceeded the function evaluation limit,
It's not an error. It's just telling you that it doesn't think it had a chance to run enough iterations. You can use optimoption...

3 years ago | 0

Answered
Not able to get the fit(using lsqcurvefit)
Your unknowns appear to be just linear coefficients of some set of basis functions. You should probably just solve for theta usi...

3 years ago | 0

Answered
how to make rectangle in circle?
[X,Y]=ndgrid(-10:10); r=arrayfun( @(x,y) nsidedpoly(4,'Center',[x,y],'Radius',1/sqrt(2)) , X(:),Y(:)); c=intersect(nsid...

3 years ago | 0

| accepted

Answered
How can I create an instance of a class in a method?
This worked fine for me. >> t=FuncTable(rand(1,5),rand(1,5)) t = FuncTable with properties: X: [0.8712 0.0816 0...

3 years ago | 0

Answered
Can parfor be used if no Parallel Computing Toolbox licenses are available?
You don't ned to check whether the Parallel Computing Toolbox is installed, as long as you don't try to run parfor on multiple w...

3 years ago | 0

Answered
Incorrect output of linear optimization problem
ls=[20000,20000,20000,20000,20000,20000,20000,20000,20000,20000]; CK=[500,600,700,800,900,1000,1100,1200,1300,1400]; TN=10; N...

3 years ago | 0

| accepted

Answered
Extracting groups of vector
You could try running clusterdata on the x-axis coordinates.

3 years ago | 0

Answered
Extract curve/surface from an 2-D area of points not equivalently spaced
I think it would be better to go back to the original image and use edge.

3 years ago | 0

Load more