Too few arguments to function 'Summation'
<p>I'm  mechanical engineer and very begginer for C language</p>

<p>Want to use the function Summation for sum the all of the components in 1x14 matrix Cx1 Cy1 Cz1</p>

<p>also I want to do calculation of (Cx1 * transpose(Ma))/sum(Ma) (to get centroid)</p>

<p>anyone can help me?. I'm only used to matlab so its so confused for me to use the function or pointer 
( im using wiringPi since i have to run it using Raspberry pi...)</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;wiringPi.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;errno.h&gt;
#include &lt;wiringSerial.h&gt;
#include &lt;math.h&gt;


void MatrixMultiply(int m, int p, int n, float A[m][p], float B[p][n], float C[p][n])   
{

int i, j, k;
for (i=0;i&lt;m;i++)
   for(j=0;j&lt;n;j++)
      {
      C[i][j]=0;
      for (k=0;k&lt;p;k++)
         C[i][j]= C[i][j]+A[i][k]*B[k][j];
      }
}


void Summation(int m,int n, double Cx[n], double Cy[n], double  Cz[n], double M[n])
{
int i;

double sum_x =0;
double sum_y =0;
double sum_z =0;
double CG_x1 = 0;
double CG_y1 = 0;
double CG_z1 = 0;
double Mass = 0;



double Cx1[14] = {-0.00037435797,0,0,0.00118574942,3.07214914879,0,-3.53615559888,3.53615559888,-3.49598511933,-0.58036525258,-2.58027392955,0,3.53315689833,-0.00339553944};
double Cy1[14] = {-0.00091507094,0,0,0.00067588546,1.79688158586,0.37033689898,4.68812966408,-4.68812966408,1.38566975835,-3.72451299038,-1.48972184781,0,1.67480858582,-0.00196041565};
double Cz1[14] = {0.39494859708,-0.1525,5.91074892102,2.82120389989,4.13903790555 ,2.00112984375,4.79000000005 ,4.79000000005,3.20714937209,3.22445881918 ,1.38480905325,0.85250000000,11.28209081559,9.29000000000};
double Ma[14] =  {0.55884245503, 0.60366974489, 3.95197090345, 20.82750506085, 2.46150714667, 0.31070393824, 0.64982394170, 0.64982394170, 2.53800582113,2.53800582113, 2.50769704699, 0.86840073405, 0.17496883559, 0.56740282314, 0.6989733086 };


for(i = 0;i&lt;m;i++)
{
sum_x += Cx1[i];
sum_y += Cy1[i];
sum_z += Cz1[i];
Mass += M[i];
}


}




double main(void)
{
double sum_x =0;
double sum_y =0;
double sum_z =0;
double CG_x1 = 0;
double CG_y1 = 0;
double CG_z1 = 0;
double Mass = 0;




Summation(15,14,double Cx1,double Cy1,double Cz1,double Ma);
MatrixMUltiply(?) 
printf("x = %15.15f\n, y = %15.15f\n, z = %15.15f\n Mass = %15.15f\n",sum_x,sum_y,sum_z};

}
</code></pre>