A little math problem

I have built a slider that for arguments sake is 100px long
and outputs a number from 0 to 100 depending on where you drag the
handle to. If you imagine a graph plotting the output against the
position of the slider handle it would be a straight line going
steadily upwards on a diagonal.
My question is this:
Can I set it up so that the graph would go up very slowly
until near the end and then suddenly rise sharply (I'm sure there
is a mathematical term for this type of curve)?
In other words if you dragged the handle from the 0 end over
the first 50px (50% of the total) the output would only go from say
0 to 10 then in the next 25px it would rise from 10 to 50 then in
the last 25px from 50 to 100.
I have played around with hard coding values and using
weighted arrays but this seems very untidy. I have also dabbled
with Math.log(), Math.exp() etc but my maths is pretty shoddy (as
you may have gathered from my rambling explanation of the issue :)
If anyone can shed any light on the issue it would be greatly
appreciated. I am fascinated by maths and its relation to patterns
and lines but it is all a bit above my head (at the moment)
Cheers all

y = (x^a)/(b^a)*b is the same as y = (x^a)/(b^[a-1]) , for
one thing. Not a biggie, but it might simplify things some
internally.
You might also try using what's called a piecewise function,
which is defined as different equations, depending on its input.
So, in your example, you'd want to define it as, say, x/10 for x
between 0 and 50; (x-10)/0.8 +10 for the second part, and
(x-50)*2+50 for the third part. It's not really elegant, but it's
pretty intuitive, which is important for learning new ideas.
If precise accuracy's not important and you just want to get
a curve going, an Excel spreadsheet is a quick and dirty way to get
an equation. Type in your known x coordinates in one column, and
the associated y coordinates in another column. Graph them, with
the XY (Scatter) type. Then, right-click on a data point, and click
Add Trendline. Play around with that, and be sure to select 'show
equation' and 'show R-squared value' under options. The closer
r-squared is to 1.0, the more perfect a match the displayed
equation will be.
Finally, I've found sosmath.com to be a good introductory
resource, and
http://mathforum.org/library/
looks fairly promising, as well.
Sorry if that's a bit of a brain dump, but I hope it helps
-Bob

Similar Messages

  • Looking for an Alarm Clock app where you do math problems to turn it off

    Someone told me of an application for the iPhone that is an alarm clock in which you can use a mode that, when the alarm sounds, you need to solve a math problem or other visual test in order to cease the alarm. That way the user is more awake by the time the alarm is stopped. Sounds annoying, yes, but would be just what I need.
    Anyone know which alarm app this is? Or if it even exists?

    There's another app that got a lot of press recently called *Proactive Sleep*.
    It works similarly to the math app mentioned above but you do a 30 second visual game when you wake up. It also records your score as well as your sleep patterns and can give you recommendations and other feedback to improve your sleeping habits.

  • Little "big" problem with Reports 9i...

    Hi to all.
    I've a little "big" problem when i launching reports on the web. The reports services it's under SUN Solaris 5.9 and de 9iAS 9.0.2. Well when i launch the report the reports server give me this error: "REP-108: File '/tmp/pfj66590734.gif' not found.".
    The report have a chart, and the chart it's the problem, if i delete the graph(chart) the report run fine. In the Reports Server file config in the tmpDir, have specified this directory but, not find the gif.
    Can be a problem of the chart with the reports engine?
    I don't know.
    Anybody have which that's the problem.
    Thanx in advance. Oscar.

    I was facing the same problem when running a report with embedded chart graphics, and every time we tried running it we got an error message like the one below, where the gif file name changed every time:
    REP-108: File 'd:\ora9ias\reports\temp\pfj30143486.gif' not found
    Our solution was:
    After a lot of research and troubleshooting we found out that if we compiled the report in a different machine (the developers') and deployed to the server it worked fine, the problem was the settings (registry and path variables) in the machine that was compiling the report (Our software release machines). I can't say exactly what were the settings changes right now, but try under someone else's machine, its the configuration of reports builder.
    Hope this helps.

  • Getting the top left corner of a grid cell (math problem)

    I'm making a map editor for a tile based game. The editor makes a grid:
    private function drawGrid():void {
                var grid:Sprite = new Sprite();
                var tileSize:uint= 50;
                for(var i:int=0;i<row;i++)
                    grid.graphics.lineStyle(1,0x000000,0.3);
                    grid.graphics.moveTo(0, i*tileSize);
                    grid.graphics.lineTo(700, i*tileSize);
                for(var j:int=0;j<column;j++)
                    grid.graphics.lineStyle(1,0x000000,0.3);
                    grid.graphics.moveTo(j*tileSize, 0);
                    grid.graphics.lineTo(j*tileSize, 400);
                stage.addChild(grid);
    And when the user clicks anywhere in the screen a movieclip is added to stage. The movieclip (exported for actionscript as Tile) should be placed in the top left corner of the grid cell.
    private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
                var tile:Tile = new Tile();
                tile.gotoAndStop(frame);
                tile.x = PROBLEM HERE
                tile.y = PROBLEM HERE
                stage.addChild(tile);
    How can I do that? I came up with an idea but it didn't work because I have a math problem.  Let's pretend that the user mouse is at position mouseX = 456:
    I could remove the hundreds and use the quotient 56 and check if it is above 50. If it is above 50 I would place it at x = 500 if not I would place it at x = 450. How can I remove the hundreds? Do you have a better idea?
    Message was edited by: wilsonsilva7 because unconsciously I pressed ctrl+s (to save) and the message was posted

    Thanks. I asked a friend and he told me about the %but I still had a problem. Your expression solved my problem
            private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
                var tile:Tile = new Tile();
                tile.gotoAndStop(frame);
                tile.x = Math.floor(mouseX / tileSize) * tileSize;
                tile.y = Math.floor(mouseY / tileSize) * tileSize;
                stage.addChild(tile);
    That way every tile is centered every 50 pixels

  • Strange math-problem with LabVIEW 7.1

    Hello!
    I am using LabVIEW 7.1 and I came to this strange math-problem. Could it be that it is a problem of LabVIEW 7.1?
    Ok try this with LabVIEW 7.1:
    open a new VI
    place a subtract-VI (pallet numerical) on the block diagram and try to subtract 0.2 from 1.6
    place a less-VI (pallet compare) on the block diagram and wire a numerical constant 1.4 to input x
    wire the result of the subtraction to input y of the comparison
    place an LED to the output of the comparison
    and start this.
    What does it say?
    The LED should turn on and this means here that 1.4 would be less than 1.4 .
    But I would have expected that 1.4 is not less than 1.4 .
    This works also if you add or subtract upto 0.2 to/from the values 1.4 and 1.6 (or equivalent with 0.2) .
    If you change the inputs of the comparison then the result is as expected and 1.4 is reported not to be less than 1.4 .
    If you compare two constants with the same value 1.4 you will not get the same strange result.
    Does anybody have an explanation for this?
    Espelkamper

    Hello,
    For floating point math: Rounding to multiples of 0.1 is problematic as
    those numbers are infinite fractions in base2 representation...
    So maybe you should change your numbers to integers using fixed point math. If all your input values are in the range of 1.4 to 1.8 you can multiply by 10000 and round to next integer. Then do your comparison on that integer (there's also an 'InRange' function in the comparison palette).
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I have a little bit problem with verify my apple ID, I don't get any message for verification aplle ID from Apple. Why? Anyone can help me

    Dear all,
    I have a little bit problem with verify my apple ID, I don't get any message for verification aplle ID from Apple. Why? Anyone can help me

    Hi Tep Virak,
    Thanks for visiting Apple Support Communities.
    You may want to log into your Apple ID first to double-check that it's the right email address and re-send the verification email using these steps:
    Sign in to My Apple ID to manage your account information.
    Click Resend under Primary Email Address.
    From:
    Apple ID: Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/he68
    All the best,
    Jeremy

  • Maths Problem in Action Script 2.0

    Hi surfers,
    We have a problem in Action Script 2.0 to solve the maths equation given below:
    write a code in Action Script 2.0 to solve these two equation.
    Aim: To know the value of "a" in both different equations.
    1. 2a + 5 = 3a + 1
    2. 4a + 3 = 11
    Thanks in Advance.
    Pls give me ASAP, i'm struggle here.

    Hello, you are at the wrong forum. for AS 2.o questions, hop on there: http://forums.adobe.com/community/flash/flash_actionscript
    BTY, people answer when they can, not when you want...

  • Logic for this math problem

    Before I get stinker replies for cross posting , let me tell that , i have been recommended to post this in this forum.
    My problem is such:
    I need to find a logic to implement the following :
    In the floating point number , say , 1.0.. the Integral part will remain constant(1) but the decimal part has to get incremented by 1
    1.1 +0.1
    1.2+0.1
    1.3+0.1
    1.4+0.1
    1.5 +0.1
    1.6+0.1
    1.7+0.1
    1.8+0.1
    1.9+0.1
    1.10+0.1
    1.2... But what I need here is 1.11 ,1.12
    I need my programming logic to detect there needs to be a change in the increment value from 0.1 to 0.01 when I reach 1.1
    and from 0.01 to 0.001 when i reach 1.111..so on,
    please suggest..

    you can't do it with a double,
    since double d = 1.10d; will be treated as 1.1d
    what you can do is treat the double as a String
    public void test(){
    String s1 = "1.9";
    String s2 = "1.10";
    String s3 = "1";
    String s4 = "1.1";
    System.out.println(increment(s1));
    System.out.println(increment(s2));
    System.out.println(increment(s3));
    System.out.println(increment(s4));
    public String increment(String d){
    int pos = d.indexOf(".");
    if (pos != -1){
    if (d.charAt(d.length()-1) == 0)
    return d.substring(0, d.length()-2) +
    ength()-2) + "1";
    String temp = d.substring(pos+1);
    int num = Integer.parseInt(temp);
    num++;
    return d.substring(0, pos+1) + num;
    else
    return d + ".1";
    }gives
    1.10
    1.11
    1.1
    1.2
    I leave it to you to understand the logic...it's to
    get you started..it does not check for all conditions
    of the inputI think it is a Math with algorithm problem. Your solution is good, but you are using String functions so much. There is other solution, handling with numbers only.

  • Can anyone help me with a little display problem in IE7 please?....

    I have just uploaded a new site which has been created using Dreamweaver CS4 for Windows.  There is no problem viewing the site in IE 8, or in Firefox.
    The site is basically a gallery of images.  For some of the main images I've used little magnifying glass 'plus' symbols, which are simply linked rollover png images that take you to a larger version of the image.  In IE7 (and I presume in older versions too) these little symbols aren't displaying in the correct position on each of these pages, they've jumped and are incorrectly displaying over the top, left corner of the main image.
    Here's the link:
    www.sjcillustration.com
    Firstly, why is this happening in IE7 and yet all's fine in IE8 or in Firefox, and secondly, can anyone tell me how to fix it please?
    (I was going to attach the corresponding CSS file but don't see an attach file button.......)
    Cheers!

    Hi Cristian, thanks for responding so speedily!
    On the homepage, click on the 'diagrammatic' thumbnail for example, then click on the 'volcano' thumbnail, when the volcano page appears, you should see the little magnifying glass plus rollover image under the main image to the right.   As I said, on these specific pages, in IE 7 the symbol jumps to the top left of the main image.
    For your info, I have seen this problem on my older XP pc, which runs IE 7.  All is fine on my newer Vista pc, which is using IE8 & Firefox.
    Maj

  • How can I use superscript in math problems presented on Firefox

    Working in KahnAcademy.org, there are math videos to explain an issue and then trial problems to test learning. In the Pre-Algebra section there are some videos regarding logarithms, To write a logarithm one needs to write a number with its exponent. A 2 for squared, 3 for cubed etc. To write the exponent it should be in superscript.
    I need to be able to write the exponent wherever I write something when within Firefox.

    Sorry, Firefox for Android is not yet compatible with Adobe Flash Player. We've started work to add Flash support, and you can follow our progress on this page: https://wiki.mozilla.org/Fennec/Features/Plugins

  • Math Problem

    I need some help! I admit, I'm not a java guru...far from it, just a college student with a book that doesn't have many examples for what I'm looking for. Any help will be greatly appreciated!!!
    My problem: My java program is to find a root using the Newton-Rapson method. The input is a function, i.e. f(x) = x^2 + x + 2. The program is to prompt the user for the beginning numbers, i.e. 225 and -43, and then find the answer to the nearest hundredth.
    I can do this on paper - no problem, my problem is I don't know enough about Java to program it to do the math.
    Unfortunately, if there are any predefined classes or methods that will do this problem for me, I'm NOT allowed to use them. Every step has to be hard coded. :(
    I'm not sure how to get Java to recognize the + sign or
    the ^ sign or any other non-numeric signs. I know there is something called substring, but I can't seem to find examples where it uses an integer. All the examples I have found are chars (like reading the string "hello"). Not helpful when you are trying to mix integers with symbols.
    Any help offered would be greatly appreciated, and I'm sure would in-turn help me the the bisection algorithm and all the future algorithm's I have to put into a program.
    Thanks for your time.

    [mode=Pedantic] Its Newton-Raphson [mode]
    Anyway use this as a starting point, its from a guy by the name of Neil Broadbent (see: http://www.neiljohan.com/java/ for lots of java samples)
    This will calculate the square root of a number using Newton-Raphson factoring, you can use this as a starting point.
    //Program to calculate the square root of a number using the Newton-Raphson.
    //It stops when the difference between consecutive approximations is less than 0.00005
    //by Neil Broadbent
    import java.io.IOException;
    import NeilClass.*;
    public class NewtonRaphsonClass
         private static boolean debugging = true;
         /** @param tFactorial the value from which to find the square root
          *  precondition tFactorial>0
          *  @return x1 so that x1>0 */
        public static double iSquareRoot (double tFactorial) throws IOException
                double x1=0;
                double x0=tFactorial/2;
                double a=tFactorial;
                boolean finished=false;
         /* check pre-condition */
         if (debugging && (tFactorial<=0)){
              System.out.println("Pre-condition violoated");
              finished=true;
                while (finished==false)
                    x1=(x0+(a/x0))/2;
                    if (x1>x0){
                        if ((x1-x0)<0.00005){
                            finished=true;
                    else if (x0>x1){
                        if ((x0-x1)<0.00005){
                            finished=true;
                    x0=x1;
              /* check post-condition */
              if (debugging && (x1<=0)){
                   System.out.println("Post-condition violoated");
                return x1;
    }

  • Little WiFi problem/projecy

    Hi,
    I've got a little problem. I have to install a small network in my basement, but my cable modem is on the 2nd floor and i can't move nothing.
    On the 2nd floor, i have a WiFi router connected to the modem.
    Now i want to connect another WiFi router (maybe configured as a AP) to the WiFi router on the 2nd floor.
    Diagram :
    (modem) --cable-- (WiFi router 1) << wireless >> (WiFi Router 2) --cable-- (PC)
    Is this possible ?
    I have a DLink DIR-655 and Linksys WRT54GX2.

    No.  You must connect the two routers via an ethernet cable to do what you want.  However, 3rd party firmware can connect them wirelessly, but I don't not know if D-Link can do this.  Check for DD-WRT firmware to handle both routers.

  • Creating a form with a field that contains a simple math problem.

    I am creating a form in Acrobat 9 Standard that contains a field that requires a simple math function (divide).
    if (QuantityRow1 > 0)
    ExtensionRow1 / QuantityRow1
    Take the value input in ExtensionRow1 and divide it by the value in QuantityRow1. I have included an IF statement to prevent an error that occur if QuantityRow1 were equal to zero.
    After inputting the data into the two fields I tab past the field where I expect to see my result and the field remains blank. I don't receive any error messages.
    Any ideas? Thanks - jb

    This is a duplicate of your question on Acrobatusers.com (
    http://answers.acrobatusers.com/Need-simple-math-operation-function-Acrobat-9-Standard-cre ating-form-q142800.aspx
    Did the information provided there not help you with your problem?
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • HP phoenix 1183 little boot problem

    Hi,
    I bought an hp phoenix 1183 a few months ago. Now i am experiencing a strange problem for  3-4 days now. When I open my computer, it boots up fast in like 10-15 sec because of the SSD and  just after entering the home screen, it freezes for 2-3 min and then it runs like a charm like nothing happenned. It close fast like it was new i just have this little problem when it starts it freeze at the home screen for a few minutes and then works fine. I analyzed my system with antivirus, i got nothing. I installed intel SSD toolbox, my health is 100%, SMART and everything is ok. I never did an update of any driver I use the factory drivers and so far until this I never got that problem. Three weeks ago, i upgraded my ram and I checked everything if its compatible and it worked like a charm, it's same speed 1333mhz ddr3 240 pin Kingston, I checked on the internet to see if it works with this model and I checked the supported RAM on the motherboard before upgrading. I am pretty sure that it is not because of the RAM because it works fine and windows recognize it and everything, and in plus, this problem happened to me a few times before I upgraded my ram (I thought back then that it was only a windows bug).  I am also pretty sure that the ram is not deffective because it never failed and I got no hardware errors. So what is it?
    Thanks you for your answers
    Vlad

    Hello alexjedicool.  I understand you're having some issues with your computer hanging.  Also, I like your name!
    A good first step will be to run a diagnostic on the RAM just in case.  You'll want to create some bootable media to run the MemTest application.
    Also, I'd like you to run a check on your computer's system files.  Try the following.
    Click Start, type "cmd," and press Enter.
    Type the "sfc /scannow" command and press Enter.
    Allow the process to complete.
    Post the results.
    Also, what is your computer's product number?  This document can show you where it is located.
    Have a wonderful day!
    Please click the white star under my name to give me Kudos as a way to say "Thanks!"
    Click the "Accept as Solution" button if I resolve your issue.

  • Little Snitch Problems / Trail software Problems

    Hello all, I'm not sure if this is the right place to post this question but it's the best I could find.
    I recently downloaded two trial softwares. Little Snitch, and AstoundStereo, both from the Apple site. I decided against using both of them and deleted them before the trail ran out. Problem is, I'm still receiving annoying alerts from both programs, even though no trace of them (that I can see) remains on my computer.
    Little Snitch will pop up and tell me my 3 hour trial has expired (it expired a few weeks ago) and AstoundStereo is still counting down the days left in its trial, despite both these applications being uninstalled.
    Anybody know how I can fix this problem?
    Any help greatly appreciated thank you

    Hi
    AstoundStereo - per the developer, run the uninstall program located in the AstoundStereo Expander folder, which is within the Applications folder. If you deleted that folder, download another copy of the software and open the installer. Either you'll be able to uninstall it from there, or you'll need to install the app. again so you can uninstall it.
    Little Snitch - uninstall directions here.

Maybe you are looking for

  • How to hide folder in PCD  with respect to other user

    Hi,      I want to hide some folder in PCD,suppose any other user enter into portal,he is not able to view the particular folder with out my permission.     for eg."X" user hide one folder means,"Y" user not possible to view the hided folder.      ca

  • IMac g5 iSight 24" boots for 2 seconds then restarts over and over

    Hello, I have only recently switched from pc to mac and now have the wonderful surprise of my iMac not working... The whole story of what happened is this: I was sitting on it one night and noticed it was making clicking noises (sounded like it was t

  • Problem at startup with all CS3 products

    hello it's a couple of day that i'm not able to open any program of CS3.. I work on a MacBook (black version) with Tiger 10.4.11 Is someone having the same problem? I think that maybe this can have something to do with the OSX update I installed on S

  • Creation of Line Item for TDS

    Hi I am facing an issue while posting the vendor invoice. When posting the vendor invoice, system is automatically creating a debit entry to TDS account for Ecess, whereas the other Line items for TDS are created correctly. We have maintained the pos

  • How do I delete a profile that I don't want any more?

    I have multiple profiles on my macbook pro. How do I delete a profile that I don't want any more?