My Math Forum  

Go Back   My Math Forum > High School Math Forum > Elementary Math

Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion


Reply
 
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?
OsmanAcar is offline  
 
July 25th, 2017, 04:45 AM   #2
Global Moderator
 
Joined: Dec 2006

Posts: 18,250
Thanks: 1439

Doesn't C have a conditional operator for this kind of thing?
skipjack is offline  
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.
OsmanAcar is offline  
Reply

  My Math Forum > High School Math Forum > Elementary Math

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 Pre-Calculus 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





Copyright © 2017 My Math Forum. All rights reserved.