Answered
Return all values of a struct parameter within a cell array.
tmp=[myCell{:}]; tmp=[tmp.Pose]; tmp=[tmp.Position]; X=[tmp.X];

6 years ago | 1

Answered
Removing values from surf?
load(websave('data.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/508797/data.mat')) Z(Z==0)=nan; ax...

6 years ago | 0

| accepted

Answered
How to find the indices within a matrix where its elements are identical along the third dimension
idx = all( M==M(:,:,1) , 3);

6 years ago | 1

| accepted

Answered
Using parfor with a 3d array
A variable in a parfor loop must belong to one of 5 categories. I cannot tell from your simplified example which category a is s...

6 years ago | 1

Answered
how to generate bounding box coordinates from centroid location
The centroid alone does not carry enough information to determine the bounding box, but you can instead do polyin=[235.79808044...

6 years ago | 0

Answered
I want to create a plot using X Y coordinates
x=rand(10,1); y=rand(10,1); n=numel(x); plot( graph(1:n,1:n),'LineStyle','none','Marker','d','XData',x,'YData',y);

6 years ago | 0

Answered
I am given set of five linear inequalities how to plot the graph showing the common area
There is also this File Exchange submission, https://www.mathworks.com/matlabcentral/fileexchange/9261-plot-2d-3d-region It do...

6 years ago | 0

Answered
I am given set of five linear inequalities how to plot the graph showing the common area
You can use lcon2vert, https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimensional-polyhedra-in-terms-of-v...

6 years ago | 0

| accepted

Answered
solving non linear equation using fsolve
You are not passing theta_n and other parameters to root2d(). One fix is to make root2d a Nested Function. Also, you must choose...

6 years ago | 1

| accepted

Answered
retain minimum values and set the rest to zero
x=x(:).'; %ensure row vector idx=diff([inf,x],2)>0; x(~idx)=0;

6 years ago | 0

| accepted

Answered
Optimization Problem with Error using optim.problemdef.OptimizationProblem/solve
Since your problem only has two unknowns, you can do a surface plot of the objective to find a decent initial guess.

6 years ago | 0

| accepted

Answered
Logical indexing of nonscalar structures
No, it is not possible.

6 years ago | 1

Answered
Rotating a 3D CT Reconstruction Cube About an Axis
Everything I've looked up (imrotate, rotate, making rotation transformation matrices, etc.) and tried hasn't worked for various ...

6 years ago | 0

Answered
optimization of multivariable function with nonlinear constraints
Because the objective function is a positive-sloped line in alpha for all x1,x2 combinations, the minimizing alpha is simply the...

6 years ago | 0

| accepted

Answered
How to clean a Set of points based on the nearby points
I think you should probably go back to the original image. Once you have a binarization BW of the original image, you can get th...

6 years ago | 0

Answered
How can I get the derivative of a complex function including reshape, max operation?
Another way to see the calculation is that if [F,i]=max(E) then, assuming we are at a point of differentiability, F is given ...

6 years ago | 1

Answered
how to add an equation to constrain the parameters in a custom distribution fit using mle.
I would just solve with fmincon(), which lets you specify linear equality constraints directly. If you really need the confidenc...

6 years ago | 0

Answered
Array indices must be positive integers or logical values
for i = 1:100 for k = 1:100 Theta=theta(1,k); con(2,k) = Theta*X2(i); f...

6 years ago | 0

Answered
How can I get the derivative of a complex function including reshape, max operation?
The Jacobian of B(x) is J1=kron(speye(b),A); The Jacobian of D(B) is, J2=kron(ones(1,b),speye(c)); J2(logical(J2))=C; The m...

6 years ago | 1

| accepted

Answered
Incremental median across pages of a 3D array
One solution would be to decimate and concatenate the pages, as below. If I choose a modest stride, it becomes possible to store...

6 years ago | 0

Answered
How to construct a loop that changes matrix dimensions?
For example, I={2,4,6}; J={3,5,7}; Matrices=cell(3,3); for m=1:numel(I) for n=1:numel(J) Matrices{...

6 years ago | 0

Answered
How to make matrix which stores coordinates of intersection. (data array and defined curve)
x=linspace(0,8*pi,1000); %example x,y data y=exp(-0.1*x).*sin(x)+3; xc=x(diff(sign(y-mean(y)))~=0); %crossings plot(x,y,x...

6 years ago | 0

Answered
How to isolate part of 3D image?
See regionprops3, https://www.mathworks.com/help/images/ref/regionprops3.html

6 years ago | 0

| accepted

Answered
I want set a threshold minimum of matrix
C=max(A*B,1)

6 years ago | 0

Answered
Finding mean of row and column in a 3D matrix
a = mean( X(15:25,5:15,:), [1,2])

6 years ago | 0

| accepted

Question


Incremental median across pages of a 3D array
I am trying to compute the inter-page median, B=median(A,3) of a 3D array A except that A is too large to be held in memory i...

6 years ago | 2 answers | 0

2

answers

Answered
Undefined operator '<=' for input arguments of type 'struct'.
It would appear that b= get(handles.TableFitur); has set b to a structure variable, whereas you expected it to be a scalar nu...

6 years ago | 0

| accepted

Answered
Remove successive rows from a table where a specific column value is duplicated
idx = diff([inf;findgroups(A.site)])~=0; A = A(idx,:)

6 years ago | 1

| accepted

Answered
Separating Matrix Rows into two different vectors
A=[1 3 5;1 5 6;3 9 10;3 5 6;1 4 5;3 5 6; 9 6 7; 1 5 8; 3 6 0]; groups=splitapply( @(X) {X} , A , findgroups(A(:,1)) ); [a...

6 years ago | 0

| accepted

Answered
Finding longest subvector of equal elements in 5000000 length int-vector.
data=[1,1,1,2,2,3,3,4,4]; sequenceLengths = diff( find( diff([inf,data,inf]) ) ) ; result = histcounts(sequenceLengths, 1:...

6 years ago | 0

| accepted

Load more