急求!!编译阶段出现下面错误expression must have(pointer-to-)funct

2019-08-05 15:51发布

RT,代码及错误如下,实在是找不出是什么错误,请各位大神帮忙看看,先谢谢大家了!
代码中蓝 {MOD}字体对应的分别是line26,line27,line28和line29
"mfcc.c", line 26: error: expression must have (pointer-to-) function type
"mfcc.c", line 26: error: expression must have (pointer-to-) function type
"mfcc.c", line 27: error: expression must have (pointer-to-) function type
"mfcc.c", line 27: error: expression must have (pointer-to-) function type
"mfcc.c", line 27: error: expression must have (pointer-to-) function type
"mfcc.c", line 28: error: expression must have (pointer-to-) function type
"mfcc.c", line 28: error: expression must have (pointer-to-) function type
"mfcc.c", line 29: error: expression must have (pointer-to-) function type
"mfcc.c", line 29: error: expression must have (pointer-to-) function type
"mfcc.c", line 29: error: expression must have (pointer-to-) function type

#include"math.h"
#include"constants.h"
void mfcc(double mfcc[][N],double S[][N],int frmN)          //S is the enframed matrix  (frmlen*frmN)
{
  int i,j,k;
  double f[M+2];
  double W[frmlen][M];
  double temp[N][frmlen];
  double cof[N][M];
  double sum=0;
  double melf,x1;

  melf=2595*log10(1+fs/700);

  for(i=0;i<M+2;i++)
  {
    f=700*pow(10,(melf*i/(2595*(M+1))-1));
  }
  for(i=0;i<M;i++)
  {
    for(j=0;j<frmlen;j++)
        {
          x1=j*fs/frmlen;
          if((x1 >= f(i)) && (x1 <= f(i+1)))
            W[j]=(x1-f(i))/(f(i+1)-f(i));
          else if((x1 >= f(i+1)) && (x1 <= f(i+2)))
            W[j]=(f(i+2)-x1)/(f(i+2)-f(i+1));
          else
            W[j]=0;
        }
  }                       //W is a frmlen*M matrix


  for(i=0;i<frmlen;i++)
  {
    for(j=0;j<N;j++)
        {
          temp[j]=pow(S[j],2);  
    }
  }


  for(i=0;i<N;i++)
  {
    for(k=0;k<M;k++)
        {
          sum=0;
          for(j=0;j<frmlen;j++)
      {
            sum=sum+temp[j]*W[j][k];
      }
          cof[k]=sum;
        }
  }

  for(i=0;i<frmN;i++)
  {
    for(j=0;j<M;j++)
        {
          sum=0;
          for(k=0;k<M;k++)
          {
            sum=sum+log10(cof[k])*cos((k-0.5)*j*PI/M);
          }
          mfcc[j]=sum;
        }
   }
  for(i=0;i<M;i++)
  {
    for(j=0;j<N;j++)
   {
      if(j<(frmN-1))
     {
        if(i<(M-1))
          mfcc[j]=mfcc[j+1];
            else
              mfcc[j]=0;
     }
     else
        {
          mfcc[j]=0;        /*effective mfcc is (M-1)*frmN *;from frmN+1 column to N column is 0 */
        }
  }
}
}




友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。