Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8961873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:59:35+00:00 2026-06-15T15:59:35+00:00

Possible Duplicate: C programming division I am trying to convert values into the Mel

  • 0

Possible Duplicate:
C programming division

I am trying to convert values into the Mel Filter but, every time I output the result, it is always “0” even though it is a double. Should it be a float? Here is an article on the equation: http://en.wikipedia.org/wiki/Mel_scale

Here is the functions:

double MFCC::mel_filter(int val)
{
     double tmp;
     tmp = 2595 * log10(1 + val / 700);
     cout << tmp << endl;
     return tmp;
    }

    vector<double> MFCC::mel_frame(int size)
    {
    vector<double> mel_Frame;
    for(int i=1; (i < size); i++)
    {
          this->mel_filter(i);
    }

    return mel_Frame;
    }

In main, I will pass values such as.. (1, 2, 3, 4, 5, 6, 7 ……)

And if “1” was entered then the equation would be:

m = 2595 * log10(1 + 1 / 700) = 1.6

Any help or suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:59:36+00:00Added an answer on June 15, 2026 at 3:59 pm

    Your problem is at

    log10(1 + val / 700)
    

    That’s using an integer division instead of a real division. Try with

    log10(1 + val / 700.0)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: C programming division in the following code example the result should yield
Possible Duplicate: C programming division I'm trying to calculate the period of accelerometer updates
Possible Duplicate: Programming java to determine a symmetrical word am new here, but I
Possible Duplicate: Sizeof an array in the C programming language? I'm trying to write
Possible Duplicate: C programming division probably my question is very simple and stupid. I
Possible Duplicate: Socket Programming for Windows C/C++ I am trying to understand what my
Possible Duplicate: undefined reference to pthread_create in linux (c programming) I am trying to
Possible Duplicate: Will the MD5 cryptographic hash function output be same in all programming
Possible Duplicate: Storing file content into an array I'm programming a simple hangman program.
Possible Duplicate: Cross platform programming I've written some code using wxwidgets in c++. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.