Question

Trying to understand behavior of holes in alphaShapes.

I have created the attached alphaShape object, which contains a hole. load alph_shape; shp plot(shp) I am trying to unders...

9 dagen ago | 2 answers | 0

Answered

Accuracy of polygon approximation

Perhaps the Dice Coefficient would be an appropriate metric. This would be a very easy calculation if the shapes are stored as p...

Accuracy of polygon approximation

Perhaps the Dice Coefficient would be an appropriate metric. This would be a very easy calculation if the shapes are stored as p...

10 dagen ago | 0

Answered

Replace loop to create a matrix

This might be a more efficient way to build arg, but I suspect that your bottleneck will be in blkdiag(). function f = denomina...

Replace loop to create a matrix

This might be a more efficient way to build arg, but I suspect that your bottleneck will be in blkdiag(). function f = denomina...

10 dagen ago | 1

| accepted

Answered

how to find the average of a table 366-by-6

Perhaps as follows, mean(varfun(@mean,x,'InputVariables',@isnumeric,'OutputFormat','uniform'))

how to find the average of a table 366-by-6

Perhaps as follows, mean(varfun(@mean,x,'InputVariables',@isnumeric,'OutputFormat','uniform'))

10 dagen ago | 0

| accepted

Answered

How to draw mean value as shown in picture

Perhaps movmean() or, https://www.mathworks.com/help/curvefit/smoothing-data.html

How to draw mean value as shown in picture

Perhaps movmean() or, https://www.mathworks.com/help/curvefit/smoothing-data.html

10 dagen ago | 1

Answered

Using 'if' to conduct specific matrix cell operations

P2=ones(size(P)); subset=(P<1); P2(subset)=1-Pfailgrid(subset);

Using 'if' to conduct specific matrix cell operations

P2=ones(size(P)); subset=(P<1); P2(subset)=1-Pfailgrid(subset);

10 dagen ago | 0

| accepted

Answered

Index table with cell array

Yes, you can use ismember(...,'rows') to find the indices of the rows.

Index table with cell array

Yes, you can use ismember(...,'rows') to find the indices of the rows.

10 dagen ago | 0

Answered

Updating values in a matrix when corresponding variable values are updated

You can do it with some object-oriented programming trickery, but in the long run, I don't think it's going to be what you want....

Updating values in a matrix when corresponding variable values are updated

You can do it with some object-oriented programming trickery, but in the long run, I don't think it's going to be what you want....

10 dagen ago | 0

Answered

How to get rid of certain xticklabels?

h1 = plot(log2(numberOfCPUCores), speedup_1by1, '-ob'); set(h1, 'MarkerFaceColor', get(h1,'Color')); hold on; ...

How to get rid of certain xticklabels?

h1 = plot(log2(numberOfCPUCores), speedup_1by1, '-ob'); set(h1, 'MarkerFaceColor', get(h1,'Color')); hold on; ...

10 dagen ago | 0

Answered

Solving a QP by minimizing multiple multidimensional vectors

If you have multiple unknown vectors x1, x2, x3,... then you also have a single unknown vector X=[x1;x2;x3;...]. So, just use qu...

Solving a QP by minimizing multiple multidimensional vectors

If you have multiple unknown vectors x1, x2, x3,... then you also have a single unknown vector X=[x1;x2;x3;...]. So, just use qu...

10 dagen ago | 0

| accepted

Answered

How to set a target in the Optimisation Toolbox?

Lets say I want the Area to be not maximum but lets say 23. (or any number between 0 and max value) It sounds like you are sayi...

How to set a target in the Optimisation Toolbox?

Lets say I want the Area to be not maximum but lets say 23. (or any number between 0 and max value) It sounds like you are sayi...

10 dagen ago | 0

| accepted

Answered

Remove decreasing data in matrix

rawdata = [1 2 2 2 3 2 4 2 5 2 4 2 3 2 2 2 1 2 2 2 3 2 4 2 5 2]; ...

Remove decreasing data in matrix

rawdata = [1 2 2 2 3 2 4 2 5 2 4 2 3 2 2 2 1 2 2 2 3 2 4 2 5 2]; ...

10 dagen ago | 0

| accepted

Answered

How to set a target in the Optimisation Toolbox?

See, https://www.mathworks.com/matlabcentral/answers/1590009-how-can-i-use-the-optimization-toolbox-to-optimize-an-objective-fu...

How to set a target in the Optimisation Toolbox?

See, https://www.mathworks.com/matlabcentral/answers/1590009-how-can-i-use-the-optimization-toolbox-to-optimize-an-objective-fu...

10 dagen ago | 0

Answered

how to do element wise multiplication of 2 columns in array?

For example, A=randi(10,5,2) A(:,1).*A(:,2)

how to do element wise multiplication of 2 columns in array?

For example, A=randi(10,5,2) A(:,1).*A(:,2)

11 dagen ago | 0

| accepted

Answered

Transformation onto a fixed reference image

Yes, use the OutputView option like in htis example, https://www.mathworks.com/help/images/ref/imwarp.html#mw_28861ab4-e9d2-4b5...

Transformation onto a fixed reference image

Yes, use the OutputView option like in htis example, https://www.mathworks.com/help/images/ref/imwarp.html#mw_28861ab4-e9d2-4b5...

11 dagen ago | 0

Answered

If else condition for each iteration in "FSOLVE"

That would create discontinuity in the function. fsolve is designed to solve problems with smooth, differentiable equation funct...

If else condition for each iteration in "FSOLVE"

That would create discontinuity in the function. fsolve is designed to solve problems with smooth, differentiable equation funct...

11 dagen ago | 0

Answered

Error running optimization. Out of memory. The likely cause is an infinite recursion within the program.

This might be what you want. f0 = [-0.583676968,0.577226284,-0.010286038,0.0062175,-0.523705244,0.087625796]; unknowns=fmi...

Error running optimization. Out of memory. The likely cause is an infinite recursion within the program.

This might be what you want. f0 = [-0.583676968,0.577226284,-0.010286038,0.0062175,-0.523705244,0.087625796]; unknowns=fmi...

11 dagen ago | 0

| accepted

Answered

How can I use a logical array to remove and replace values in a corresponding data array?

Perhaps as follows, A(TF)=nan; A=fillmissing(A,'linear');

How can I use a logical array to remove and replace values in a corresponding data array?

Perhaps as follows, A(TF)=nan; A=fillmissing(A,'linear');

12 dagen ago | 0

Answered

How to get multiple bounding boxes

If that happens, it is likely that the background black pixels are not really zero. You could use imbinarize() to get a purely b...

How to get multiple bounding boxes

If that happens, it is likely that the background black pixels are not really zero. You could use imbinarize() to get a purely b...

12 dagen ago | 1

| accepted

Answered

why can we not modify inherited properties

Well, I'm not a Mathworks developer, but here are my thoughts: Regarding default values, I believe they must be non-overridabl...

why can we not modify inherited properties

Well, I'm not a Mathworks developer, but here are my thoughts: Regarding default values, I believe they must be non-overridabl...

12 dagen ago | 0

| accepted

Answered

How to make Triangle to Triangle Intersection Algorithm ??

But I want Intersection in 3D space Can U one more help for me?? You can use intersectionHull() in this File Exchange submissi...

How to make Triangle to Triangle Intersection Algorithm ??

But I want Intersection in 3D space Can U one more help for me?? You can use intersectionHull() in this File Exchange submissi...

12 dagen ago | 0

Answered

Matrix Subtraction by taking mean of same matrix

It would be faster to use sepblockfun from the File Exchange, https://www.mathworks.com/matlabcentral/fileexchange/48089-separa...

Matrix Subtraction by taking mean of same matrix

It would be faster to use sepblockfun from the File Exchange, https://www.mathworks.com/matlabcentral/fileexchange/48089-separa...

12 dagen ago | 0

| accepted

Answered

Solving large system of linear equations

n=32; c(1,1)=5; c(n,1)=10; %Example data T=toeplitz([-1,zeros(1,n-3)], [-1,1,-1, zeros(1,n-3)]); A=T; A(:,[1,n])=[]; b=...

Solving large system of linear equations

n=32; c(1,1)=5; c(n,1)=10; %Example data T=toeplitz([-1,zeros(1,n-3)], [-1,1,-1, zeros(1,n-3)]); A=T; A(:,[1,n])=[]; b=...

12 dagen ago | 0

| accepted

Answered

Error in calculate mean and standar deviation

Why not just data=readtable('E:\Sentinel-Cryosat\sentinel\full_Data_Sentinel_c2p0006.txt','HeaderLines',0);

Error in calculate mean and standar deviation

Why not just data=readtable('E:\Sentinel-Cryosat\sentinel\full_Data_Sentinel_c2p0006.txt','HeaderLines',0);

13 dagen ago | 0

Answered

How to select rows that precede and follow a specific row with a certain value?

c=data(:,13); preError=data( c(1:end-1)==1 & c(2:end)==0 ,:); postError=data( c(1:end-1)==0 & c(2:end)==1 ,:);

How to select rows that precede and follow a specific row with a certain value?

c=data(:,13); preError=data( c(1:end-1)==1 & c(2:end)==0 ,:); postError=data( c(1:end-1)==0 & c(2:end)==1 ,:);

13 dagen ago | 0

| accepted

Answered

Find a plane that is tangent to a part of the 3D model

Obtain all the mesh vertices from your stl file in V. Then, compute the facet areas and normals of the convex hull with, k=conv...

Find a plane that is tangent to a part of the 3D model

Obtain all the mesh vertices from your stl file in V. Then, compute the facet areas and normals of the convex hull with, k=conv...

13 dagen ago | 1

| accepted

Answered

How to make Triangle to Triangle Intersection Algorithm ??

triangle1=polyshape([0 0 ; 1 0; 0 1]); triangle2=polyshape([0 0 ; 1 0; 1 1]); p=intersect([triangle1,triangle2]); tiledla...

How to make Triangle to Triangle Intersection Algorithm ??

triangle1=polyshape([0 0 ; 1 0; 0 1]); triangle2=polyshape([0 0 ; 1 0; 1 1]); p=intersect([triangle1,triangle2]); tiledla...

13 dagen ago | 0

Answered

How to find the maximum deviation between x-values, given one y-value on a plot.

Perhaps as follows, F1=griddedInterpolant(OutputVoltage1, Temperature); F2=griddedInterpolant(OutputVoltage2, Temperature); ...

How to find the maximum deviation between x-values, given one y-value on a plot.

Perhaps as follows, F1=griddedInterpolant(OutputVoltage1, Temperature); F2=griddedInterpolant(OutputVoltage2, Temperature); ...

13 dagen ago | 1

Answered

Multi dimensional vector operation

L_squared=([hx(:),hy(:),hz(:)]\[rx(:),ry(:),rz(:)]).';

Multi dimensional vector operation

L_squared=([hx(:),hy(:),hz(:)]\[rx(:),ry(:),rz(:)]).';

14 dagen ago | 1

| accepted

Answered

How to compute interior eigenvectors that exclude certain eigenvalues?

I was basically wondering if there was an eigenvalue algorithm where I could just specify as inputs (a, b) to compute all eigen ...

How to compute interior eigenvectors that exclude certain eigenvalues?

I was basically wondering if there was an eigenvalue algorithm where I could just specify as inputs (a, b) to compute all eigen ...

15 dagen ago | 1

| accepted