View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Minkowski Sum

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

3.0 | 2 ratings Rate this file 7 Downloads (last 30 days) File Size: 1.65 KB File ID: #34125 Version: 1.1
image thumbnail

Minkowski Sum


Mike Sheppard (view profile)


08 Dec 2011 (Updated )

Minkowski sum of two arrays

| Watch this File

File Information

S=MINKSUM(A,B) produces the Minkowski sum of two sets A and B in Euclidean space, the result being the addition of every element of A to every element of B.
[S,D]=MINKSUM(A,B) returns the Minkowski sum S, and also the multiplicity of each element in S.
The number of columns represent the dimensionality. An array of M points in N-D space is an MxN array. A vector of 1D values is a column vector.
If the sizes of A and B are MAxN and MBxN respectively, then the size of S will be at most (MA*MB)xN
      A=[1 1; 2 1; 2 2; 1 2]; B=[3 3; 4 3; 4 4; 3 4];
      axis([0 7 0 7])

MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
24 Jun 2016 Alessio Maffei  
11 May 2016 Mehdi Nazarbeigi

I follow the instruction exactly but I received an error which states that the minksum function is undefined, whats the problem?

Comment only
04 Sep 2013 Samuel Cole

Columns add dimensions, rows add cardinality. You want:


ans =


15 May 2013 Alex Dytso

Alex Dytso (view profile)

I don't think that your code works.
Try this:

X2=[1 2]
X2 = 1 2
>> X1=[ 6 7]
X1 = 6 7
>> minksum(X1,X2)
ans =7 9

the answer should be 7 8 9

Comment only
04 Apr 2012 1.1

Updated help section

Contact us