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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:34:11+00:00 2026-05-22T12:34:11+00:00

I am looping through a function that looks like this: Y=exp(-0.04*(x-13.25)^(2))*300 Let’s say I

  • 0

I am looping through a function that looks like this:

Y=exp(-0.04*(x-13.25)^(2))*300

Let’s say I want to get Yfor every value of x between 3.3454 and 20.3458 for every 0.1 interval

I would do this:

for (float i=3.3454;i<20.3458;i=+.1)

Is this the correct way to do this?

  • 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-22T12:34:11+00:00Added an answer on May 22, 2026 at 12:34 pm

    Your syntax is slightly off, and some of the math functions you want to use will only work on doubles.

    double y;
    for(double x=3.3454; x<20.3458; x += .1) {
        y = Math.Exp(-0.04D * Math.Pow((x- 13.25D), 2D)) * 300;
        // do something with y
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say you have a string that looks like this: token1 token2 tok3 And
Using javascript I'm looping through my H3 elements like this: $('h3').each(function(){ }); I'm then
I have a multi-dimensional array right now that looks like this: function art_appreciation_feeds() {
I have a large data frame (named z ) that looks like this: RPos
I have a select tag that looks like this: <select name=TZSelector id=TheTZSelector> <option>add another
I have a table that looks like this: <table> <tr> <td class=packing-vol>0.19</td> <td class=qty-cell><input
I was calling getJSON and looping through the results like this and everything was
Possible Duplicate: How does foreach work when looping through function results? If I have
I'm looping through multiple checkboxes with the same class with function each() and inside
Must be a way looping through this code: private void loadSprites() { this.sprites[0] =

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.