# All Sums (Scripts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

See full specifications

## All Sums (Scripts) Publisher's description

### Distribution of unique sums among all combinations of vectors.

Distribution of unique sums among all combinations of vectors.
ALLSUMS Distribution of unique sums among all combinations of vectors.

[S,C]=ALLSUMS(IN) depending on input IN, will do one of two different procedures for calculating all unique combinations of sums.

The output vectors, S and C, are respectively the list of unique sums, and the count distribution for those sums among all combinations.

SINGLE INPUT:

[S,C]=ALLSUMS(VEC) for a single input vector of length N, returns the distribution of unique sums among the (2^N)-1 combinations of non-empty subsets of elements within VEC.

EXAMPLE:
Number of ways to have a total of 250 using only the odd numbers from 1 to 100.
[S,C]=allsums(1:2:100);
num=C(S==250)

MULTIPLE INPUTS:

[S,C]=ALLSUMS(VEC,K) with vector VEC of length N, assumes theequivalent scenario of rolling a N-sided die, with values VEC, K times and returns the distributions of unique sums among all N^K combinations of values.

[S,C]=ALLSUMS(VEC1,K1,VEC2,K2,...) with vectors of length N1, N2, ... assumes the equivalent scenario of rolling a N1-sided die, with values VEC1, K1 times; then rolling a N2-sided dice, with values VEC2, K2 times; etc. and returns the distribution of unique sums among all (N1^K1)*(N2^K2)*... combinations of values

SINGLE VECTOR, REPEATED
Probability distribution of rolling a regular 6-sided die 100 times
[S,C]=allsums(1:6,100);
plot(S,C./sum(C)), grid on

MULTIPLE VECTORS, REPEATED
Probability of the total yielding exactly zero when rolling a
A) six-sided die with values [-5:0] ten times, and then a
B) ten-sided die with values [-4:5] twenty times.
[S,C]=allsums([-5:0],10,[-4:5],20);
prob=C(S==0)/sum(C)

#### System Requirements:

No special requirements.
Program Release Status: New Release
Program Install Support: Install and Uninstall

#### All Sums (Scripts) Tags:

Click on a tag to find related softwares

## Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.