
Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion 
 LinkBack  Thread Tools  Display Modes 
July 25th, 2017, 02:39 AM  #1 
Newbie Joined: Jul 2017 From: Turkey Posts: 2 Thanks: 0  Equation creation for a set of requirements
It's been a while since I've done math so my apologies if this is too much of a simple question. I am need to create an equation which outputs a desired value depending on input. Requirements are: Suppose that 90>x>0, For x<40, f(x) = 0, For 40<x<90, 0<f(x)<500. I believe graph would look like: I need to implement said equation in a C function. How do I approach this? 
July 25th, 2017, 04:45 AM  #2 
Global Moderator Joined: Dec 2006 Posts: 19,865 Thanks: 1833 
Doesn't C have a conditional operator for this kind of thing?

July 25th, 2017, 05:49 AM  #3 
Newbie Joined: Jul 2017 From: Turkey Posts: 2 Thanks: 0 
It does indeed. What do I do about the exponential part? I could do x^2 but I would prefer increase to be more subtle.


Tags 
creation, equation, requirements, set 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
finding a function based on some requirements.  vlekje5  PreCalculus  2  March 30th, 2017 06:19 AM 
Requirements and Organization of Mathematics At Different Colleges  EvanJ  Academic Guidance  0  July 5th, 2015 07:06 PM 
Game Theory Requirements  ServerBTest002  Economics  1  October 6th, 2011 02:54 PM 
Questions about Galois requirements  fiw  Abstract Algebra  8  February 6th, 2011 04:05 PM 