Answered

Theory of Bicubic interpolation

It has been answered here https://www.mathworks.com/matlabcentral/answers/78116-algorithm-of-bicubic-interpolation In 2D you d...

Theory of Bicubic interpolation

It has been answered here https://www.mathworks.com/matlabcentral/answers/78116-algorithm-of-bicubic-interpolation In 2D you d...

environ 11 heures ago | 0

Submitted

Free-knot spline approximation

Least squares approximation of 1D data using free-knots spline

environ 20 heures ago | 20 downloads |

Answered

Finding LAT LONG inside a circle of a given LAT LONG .

% Random data lonA=rand*360; latA=rand*180-90; n = 10000; lonP=rand(1,n)*360; latP=rand(1,n)*180-90; earthradius = 6357;...

Finding LAT LONG inside a circle of a given LAT LONG .

% Random data lonA=rand*360; latA=rand*180-90; n = 10000; lonP=rand(1,n)*360; latP=rand(1,n)*180-90; earthradius = 6357;...

4 jours ago | 0

| accepted

Answered

HELP. Need to understand MATH behind scatteredInterpolant or Interp2 function

"Based on the equation that I had in that screen shot would you assume that the other model is using a simplified linear interpo...

HELP. Need to understand MATH behind scatteredInterpolant or Interp2 function

"Based on the equation that I had in that screen shot would you assume that the other model is using a simplified linear interpo...

7 jours ago | 0

| accepted

Answered

How to generate a nearly symmetric matrix?

Just generate first a symettric matrix then perturb a "the overwhelming minority" of elements. Whatever that definnition means....

How to generate a nearly symmetric matrix?

Just generate first a symettric matrix then perturb a "the overwhelming minority" of elements. Whatever that definnition means....

7 jours ago | 1

| accepted

Answered

HELP. Need to understand MATH behind scatteredInterpolant or Interp2 function

Run this, that show the "formula" and how to get zq = -38.5561 zq_check = -38.5561 Code to check 'linear' met...

HELP. Need to understand MATH behind scatteredInterpolant or Interp2 function

Run this, that show the "formula" and how to get zq = -38.5561 zq_check = -38.5561 Code to check 'linear' met...

7 jours ago | 0

Answered

In a vector, how to remove neighbours too close from one another

Using stock function >> uniquetol([1 6 12 17 23 25 34],10,'DataScale',1) ans = 1 12 23 34 Jan's various ...

In a vector, how to remove neighbours too close from one another

Using stock function >> uniquetol([1 6 12 17 23 25 34],10,'DataScale',1) ans = 1 12 23 34 Jan's various ...

12 jours ago | 2

Answered

Generate random integers that sums to a specific number within a specific range

Unfortunately the uniform distribution with bounds for integer is much more challenging. One way is to approximate by rounding t...

Generate random integers that sums to a specific number within a specific range

Unfortunately the uniform distribution with bounds for integer is much more challenging. One way is to approximate by rounding t...

14 jours ago | 0

Answered

How to calculate the pairwise distince between two dataset without any loop

If you have latest MATLAB release (for pagemtimes) and download this Multiple same size solver FEX X = [1 2 1;3 4 2;5 6 3] Y =...

How to calculate the pairwise distince between two dataset without any loop

If you have latest MATLAB release (for pagemtimes) and download this Multiple same size solver FEX X = [1 2 1;3 4 2;5 6 3] Y =...

17 jours ago | 0

| accepted

Answered

How could I separate the geometry data from single stl file contains multiple objects by stlread?

You can use conncomp of the triangulation graph data=stlread('research_stl_read.stl'); s=data.ConnectivityList(:,[1 2]); t=...

How could I separate the geometry data from single stl file contains multiple objects by stlread?

You can use conncomp of the triangulation graph data=stlread('research_stl_read.stl'); s=data.ConnectivityList(:,[1 2]); t=...

20 jours ago | 1

| accepted

Answered

Why the abbrevation of "Left side of equation" is "lhs"

left hand side

Why the abbrevation of "Left side of equation" is "lhs"

left hand side

22 jours ago | 2

| accepted

Answered

How to Find the Rotation Matrix?

You equation is NOT enough to determine the third column, you forget about the orthogonal conditions and that det(R)=1 (rotation...

How to Find the Rotation Matrix?

You equation is NOT enough to determine the third column, you forget about the orthogonal conditions and that det(R)=1 (rotation...

23 jours ago | 3

Answered

Shortest path in a 2d matrix

%W=[ 1 2 3; % 4 5 6; % 7 8 9 ] W = randi(9,5,5) % Build the 4-connected graph [m, n] = size(W); [i, j] = ndgrid(1:m,1:n)...

Shortest path in a 2d matrix

%W=[ 1 2 3; % 4 5 6; % 7 8 9 ] W = randi(9,5,5) % Build the 4-connected graph [m, n] = size(W); [i, j] = ndgrid(1:m,1:n)...

28 jours ago | 2

| accepted

Answered

Selecting a "random" element from an array with each element having it's own weighting

A=[1,2,3,4]; p=[10 20 30 40]; c=cumsum(p); [~,r]=histc(rand(1,1e6),[0 c/c(end)]); % generate 1e6 numbers r=A(r); % Chec...

Selecting a "random" element from an array with each element having it's own weighting

A=[1,2,3,4]; p=[10 20 30 40]; c=cumsum(p); [~,r]=histc(rand(1,1e6),[0 c/c(end)]); % generate 1e6 numbers r=A(r); % Chec...

29 jours ago | 1

| accepted

Answered

A QR complexity question

The O(n^3) is number of flops, which is not proportional to tic/toc. You time also RANDN Calling QR has overhead that is signi...

A QR complexity question

The O(n^3) is number of flops, which is not proportional to tic/toc. You time also RANDN Calling QR has overhead that is signi...

29 jours ago | 2

| accepted

Answered

How to Solve this Big System of Equations

Possible causes: your matrix is wrongly constructed you forget to include proper boundary conditions you forget to add condit...

How to Solve this Big System of Equations

Possible causes: your matrix is wrongly constructed you forget to include proper boundary conditions you forget to add condit...

29 jours ago | 1

| accepted

Answered

fill matrix with all options of successive, increasing numbers 1-5

p = 5; n = 12; j = nchoosek(2:n,p-1); m = size(j,1); % == nchoosek(n-1,p-1) == 330 and not 96 i = repmat((1:m)',1,p-1); A...

fill matrix with all options of successive, increasing numbers 1-5

p = 5; n = 12; j = nchoosek(2:n,p-1); m = size(j,1); % == nchoosek(n-1,p-1) == 330 and not 96 i = repmat((1:m)',1,p-1); A...

30 jours ago | 1

| accepted

Answered

How do I find a D matrix that satisfies [K]*inv(M)*[D]==[D]*inv(M)*[K] ?

You have homogeneous linear equation, the entire null space of operator (D considered as input) K*inv(M)*D-D*inv(M)*K (dimensi...

How do I find a D matrix that satisfies [K]*inv(M)*[D]==[D]*inv(M)*[K] ?

You have homogeneous linear equation, the entire null space of operator (D considered as input) K*inv(M)*D-D*inv(M)*K (dimensi...

30 jours ago | 2

Answered

Remove overlapping intervals from two array intervals without using a loop

You might interest to use my interval-merging FEX

Remove overlapping intervals from two array intervals without using a loop

You might interest to use my interval-merging FEX

environ un mois ago | 0

Answered

Plotting a smooth curve from points

Direct analytic method using piecewise cublic polynomial. The curve is first-order differentiable, but not second order differen...

Plotting a smooth curve from points

Direct analytic method using piecewise cublic polynomial. The curve is first-order differentiable, but not second order differen...

environ un mois ago | 1

| accepted

Answered

Plotting a smooth curve from points

No extra points needed (but you might add to twist the shape of the curve in the first and last interval), Spline order >= 8th ...

Plotting a smooth curve from points

No extra points needed (but you might add to twist the shape of the curve in the first and last interval), Spline order >= 8th ...

environ un mois ago | 1

Answered

How to calculate the volume enclosed by a set of XYZ points in 3D?

V is the volume between the plane x-y (z==0) and the surface z(x,y) from your data. If you want the volume of the data after su...

How to calculate the volume enclosed by a set of XYZ points in 3D?

V is the volume between the plane x-y (z==0) and the surface z(x,y) from your data. If you want the volume of the data after su...

environ un mois ago | 1

| accepted

Answered

How to triangulate a non-convex ordered set of points?

I recommednd this Mesh2D FEX

How to triangulate a non-convex ordered set of points?

I recommednd this Mesh2D FEX

environ un mois ago | 0

Answered

Vectorizing issue in MATLAB

It is in general not possible to vectorize sequential calculation like yours.

Vectorizing issue in MATLAB

It is in general not possible to vectorize sequential calculation like yours.

environ un mois ago | 0

| accepted

Answered

How to find out a smallest sub-matrix B from a sparse matrix A which has the equal rank and # of non-zero columns?

Done, B=A (so all rows of A) meets your requirement >> A = [ 1 -1 0 0 0 0 0 0 0 1 ...

How to find out a smallest sub-matrix B from a sparse matrix A which has the equal rank and # of non-zero columns?

Done, B=A (so all rows of A) meets your requirement >> A = [ 1 -1 0 0 0 0 0 0 0 1 ...

environ un mois ago | 0

| accepted

Answered

Converting a 3D Matrix to multiple 2D matrices

Assuming A is array 1000 x 1000 x 40 C = num2cell(A,[1 2]);

Converting a 3D Matrix to multiple 2D matrices

Assuming A is array 1000 x 1000 x 40 C = num2cell(A,[1 2]);

environ un mois ago | 1

| accepted

Answered

Multiply all pages of a matrix

AFAIK there is no alternative way in general; unless your matrices has special property that can use some simplification.

Multiply all pages of a matrix

AFAIK there is no alternative way in general; unless your matrices has special property that can use some simplification.

environ un mois ago | 0

| accepted

Answered

Using addpath on Compiled Code

I can't see addpath in your snip of code. When you compile the app, all the source mfiles used by you app MUST be found by depe...

Using addpath on Compiled Code

I can't see addpath in your snip of code. When you compile the app, all the source mfiles used by you app MUST be found by depe...

environ un mois ago | 0

Answered

Matlab interpolation between two surfaces

Assuming your two original surfaces are z1 and z2, juts pick w scalar in (0,1) interval, zinterp = (1-w)*z1 + w*z2; If w == 0 ...

Matlab interpolation between two surfaces

Assuming your two original surfaces are z1 and z2, juts pick w scalar in (0,1) interval, zinterp = (1-w)*z1 + w*z2; If w == 0 ...

environ un mois ago | 0

Answered

Matlab executable not running on remote access files

"I would like to change the directories for reading and writing theses files." IIRC the cd command is non effective in deployed...

Matlab executable not running on remote access files

"I would like to change the directories for reading and writing theses files." IIRC the cd command is non effective in deployed...

environ un mois ago | 0