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 6658819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:57:28+00:00 2026-05-26T01:57:28+00:00

I am computing a Fourier transformation in MATLAB, when computing coefficients C[0] and C[n*f0]

  • 0

I am computing a Fourier transformation in MATLAB, when computing coefficients C[0] and C[n*f0], I got pretty nasty result because MATLAB doesn’t recognize my variable “n” as integer. I currently compute with “n” as a symbolic variable (syms n;). How to change symbolic n to symbolic integer n?

  • 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-05-26T01:57:29+00:00Added an answer on May 26, 2026 at 1:57 am

    Looking at the MATLAB documenation, to add the assumption “n is integer” in R2008b or later, you have to write

    evalin(symengine,'assume(n,Type::Integer)')
    

    This answers your question, however, I’m not really sure it solves your problem.

    When you do a Fourier transform, you are performing a heavy numeric operation on your data, consequently all variables involved in that need to have concrete values. Your n probably should be an integer, but not just by type, it should contain an actual number. If you declare it using syms, it will potentially not contain a number, so you be sure you really need the symbolic toolbox!

    If you do, and n is the result of a calculation that yield one specific integer, you can convert it to normal numerical form using uint32(n) or similar, see the help on conversions, e.g.

    Y = fft(X,uint32(n))
    

    Update: The error message you give in the comment implies that your n is in fact not an integer… I doubt you will be able to use it with fft.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quoting the code for computing the integer absolute value (abs) without branching from http://graphics.stanford.edu/~seander/bithacks.html
I'm doing some large integer computing, and I need to raise a BigInteger to
For my theory of computing languages class, we got a homework assignment to implement
I am computing a similarity matrix based on Euclidean distance in MATLAB. My code
I'm computing data from database (~130 000 000 rows). Because of big amount of
How similar is distributed computing and threading? I've found two papers coming to quite
I keep hearing from associates about grid computing which, from what I can gather,
Is it possible to have all the computing capacity of all the hardware nodes
I have recently been web-researching quantum computing. Will we see these in our lifetimes
I was involved in couple of cloud computing platform recently. First of all please

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.