Answered
How to merge cell
{cell2mat(v)}

4 years ago | 0

| accepted

Answered
How to extract matrix elements?
You can access them by indexing: syms x M=[x 2*x 3*x; 4*x 5*x 6*x; 7*x 8*x 9*x]; M(2,3) However, you should be mindful t...

4 years ago | 1

| accepted

Answered
Small squares that appear when detecting objects with blobanalysis and foregroun detector. Does anyone know of a way to prevent this?
If I have to make a generalization, it occurs on asphalt and empty places in the videos in the highway environment. If so, then...

4 years ago | 0

Answered
Finding closest circle to a general circle
Here's another possible method using pdist2. Assume we have Nx3 matrices XYZ1, XYZ2 whose rows are the points (x,y,z) on orbit ...

4 years ago | 0

| accepted

Answered
Sort Cell Array after accumarray function
row_f=[0;0;0;1;2;3;4;0]; row_s=({'a';'a';'b';'b';'c';'c';'a';'b'}); t={'12/09/2022 04:28:01 PM';'12/09/2022 04:28:02 PM';'12/0...

4 years ago | 0

| accepted

Answered
How to solve 'n' number system of equations
It appears to me that the equation can be re-arranged quite easily into a set of linear equations in P, or which is ...

4 years ago | 0

| accepted

Answered
Help to convert C++ to Matlab
function main % Specific heat capacity of liquid water: Cp = 4.18 J/g/°C Cp = 4.18; % Mass of water in grams ...

4 years ago | 0

Answered
How to fit a normal distribution curve to a bar graph?
One way, load diftn x=(1:numel(diftn))'; fobj=fit(x,diftn,'gauss1'); plot(fobj,x,diftn)

4 years ago | 0

| accepted

Answered
Acces double inside cell array
for i=1:size(Results,1) Measurements(i).Det.J=J{i}; end

4 years ago | 0

| accepted

Answered
Finding closest circle to a general circle
You can use this FEX download to fit an ellipse or circle to the points, https://www.mathworks.com/matlabcentral/fileexchange/8...

4 years ago | 0

Answered
Pass a symbolic function as input to a function without passing its inputs
You seem to have answered your own question... function [g,d]=Test(f,par) g=gradient(f,par); args=argnames...

4 years ago | 0

Answered
Matching points between two point sets.
You would probably have to use ransac.

4 years ago | 0

Answered
How can I create a for loop when the range is changing
Crescendo = [0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0]'; Descrescendo = [1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 0 0]'; Staccato = ...

4 years ago | 0

Answered
How to optimise a big loop with polyshape, intersection and area?
The implementation below works by iterating over 25x25 sub-blocks of the lon/lat data. On my computer, each block takes about 2....

4 years ago | 0

| accepted

Question


Why does blockproc return empty?
The blockproc documentation says that the block function can return a vector. Mine does so and prodcues non-empty output, as dem...

4 years ago | 1 answer | 0

1

answer

Answered
How to optimise a big loop with polyshape, intersection and area?
Here's a more vectorized version. I could not test it, of course, since input data was not provided to us. [m,n]=size(lat); ...

4 years ago | 0

Answered
register axis to point cloud
Here is an optimization implemented with fmincon. It achieved a lower registration error dist2Lines than my other answer, though...

4 years ago | 0

| accepted

Answered
Fast matrix product where one matrix is sparse [Ed. and diagonal] and the other is a Kronecker product
This alternative seems to give substantial speed-up (at least 100x): n = 1e4; r = 4; B = rand(n, r); a = zeros(1, n^2); a(r...

4 years ago | 1

| accepted

Question


Cloning a view of the slice planes (as seen in the Volume Viewer App) to a different volume
As shown below, the volume viewer app has an Export menu option, allowing one to export camera settings and thereby reproduce th...

4 years ago | 1 answer | 1

1

answer

Answered
Fastest selection of a coordinate in 3d array that fulfills a condition?
Why not as follows? I don't know if it's as fast as you were hoping, but it definitely doesn't take seconds per iteration. T=ra...

4 years ago | 1

Answered
Quickly extract the diagonal blocks of matrix product
X=rand(10,4); %hypothetical input blockLengths=[4,2,3,1]; [n,r]=size(X); Xcell=cellfun(@sparse,mat2cell(X,blockLengths,...

4 years ago | 0

| accepted

Answered
Bending point of a curve
The pgonCorners function from this FEX download https://www.mathworks.com/matlabcentral/fileexchange/74181-find-vertices-in-im...

4 years ago | 0

Answered
Collapsing a structure by combining field names
[A,B,C]=ndgrid("Forceplate"+(1:4),... ["Force","Moment","COP"], ... ["X","Y","Z"]); clear new...

4 years ago | 0

| accepted

Answered
Bending point of a curve
BW=load('Image').BW; [Y,X]=find(BW); [~,is]=sortrows([X,Y],2); X=X(is); Y=Y(is); m=bend(X,Y); m=bend(X(1:m), Y(1:m));...

4 years ago | 0

Answered
register axis to point cloud
This paper does something quite similar. https://www.researchgate.net/publication/224380689_Compensating_for_head_motion_in_slo...

4 years ago | 1

Answered
Determine the inner volume of a cylinder-like body
If you import the STL as an alphaShape, you can use the volume() command to get its volume. You can then use convhulln() to get ...

4 years ago | 0

| accepted

Answered
How can I sort columns of a matrix based on the order of where the minimums occurs?
Assuming A is your matrix, [~,imin]=min(A,[],1); [~,is]=sort(imin); A=A(:,is);

4 years ago | 0

| accepted

Answered
Rotate 3-D Point Cloud Using Rigid Transformation
Using AxelRot from this File Exchange download, https://www.mathworks.com/matlabcentral/fileexchange/30864-3d-rotation-about-sh...

4 years ago | 0

| accepted

Load more