[WCS EU] Season 1 Finals -…
[SPL] Round 5 Week 3 Revie…
[GSTL] Week 10 - Prime Tim…
[WCS KR] Innovation vs. Sy…
[WCS AM] Ro16 Group D Prev…
TL Site Changes
[WCS EU] Grubby, MMA, Ret …
Pizza: All Tiers Reached
Vici and RisingStars Advan…
Up&Down groups for 2013 WC…
HerO, Revival Interviews -…
[SPL] Round 5 Week 4 Start…
Get 50% off Papa John's pi…
TL Advertising Features
US Politics Megathread
McDonald's 'supporting' …
Fountain Pens
Ice Fingers while gaming
UK Soldier beheaded in L…
TL Site Changes
Presenting Store 2.0
The Automated Ban List
Seoul LoL allstars Meetup …
BarCraft #8 in Tokyo Japan!!
The Stephano fanclub
The Liquid`TLO Fanclub
[Stream] Future
stream of Flixse
Getting a new Mouse! Any R…
Building a midrange gaming…
Simple Questions Simple An…
What mouse/pad does your f…
Any fix for Twitch tv lag?
Back to SC2!
Kaelaris Casting and Vid…
Painting of the Queen Of…
A rank of foreign countr…
Tasteosis to cast World …
Designated Balance Discu…
[WCS EU] Finals Day 1 Prem…
Revive Your Energy Starlea…
[GSTL] NSH vs MVP 2013 S1
FREE 64 Player Knockout: S…
ESET UK HOTS Showdown - Sj…
The HotS Protoss Help Me T…
[G] Going CC-first Bio in …
The HotS Zerg Help Me Thread
[D] MVPs build order vs TL…
[G] TheCore - Advanced Key…
[A] Starbow
Map Analyser Tool
Work In Progress Melee Maps
[M] (4) Artika World
OneGoal: A better SC2 [Pro…
General Discussion
TL's Item Trading Thread.
All Pick - Wong Hock Chuan
Dota 2 QQ thread
Beyond the Summit and TL…
Invites and Qualifiers f…
[G-1] LAN Finals
Merita $250+ Australian Do…
Starladder Season 6
Liquid Pasture Community L…
[The International] Easter…
Simple Questions, Simple A…
Question: Luna Item Build
[G]uide to Lifestealer
Newly ported Hero discussi…
[G] In-Game Dota Guide for…
[Update] itemBay SSL Gra…
TeamLiquid Legacy Starle…
Terror[fou] stream on tw…
[D] New BW Server
My Review of the Starcra…
DES Sonic Interview 5/18…
[GC S3] Gambit's Cup Semif…
Gambit's Cup Season 3 Roun…
D Ranks Teamleague Season 4
C Ranks Teamleague Season 1
Gem League II
Simple Questions, Simple A…
Increasing APM/EAPM
Practice Partner Thread
Challenger map on Starcraf…
World of Tanks
2012 - 2013 Football Thr…
Warcraft 2 Festival IV r…
RollPlay -- D&D Campaign…
TL MMA Pick'em Pool 2013
[T] Bastard "Mini" Mafia!
Bastard "Mini" Mafia Vote …
[M][N] Les Mafia
Running Thread
General nutrition recommen…
The Injuries Thread
Leta - Movie
Michael - skyline
Anytime - Beast
By.Hero - Shuttle
Anytime - Pusan
Customize Sidebar...

Website Feedback

Closed Threads


IRC Web Chat

TeamSpeak 3 (73 users)


Active: 10109 users

How to evaluate a piecewise function with Excel?

Forum Index > General Forum
 
 Betalump   United States. May 06 2011 20:25. Posts 109
Profile Blog # 
I fully understand that Excel is not the best program to do this type of work. However it is the medium I have available and I would like to use Excel so that I can tie it into a bunch of work that I've already done with it.

The goal is to get Excel to successfully plot a curve of a piecewise function that looks something like this.

If X=0 y=240
If X=1-2 y=240+45(X-0)
If X=3-10 y=240+90+39(X-2)
If X=11-14 y=240+90+232+24(X-10)
If X=15-18 y=240+90+232+96+12(X-14)
etc etc

Then I need to be able to integrate piecewise or be able to get it to calculate the total area under the curve up until any value of X.

If possible, I would like to be able to substitute a different series of equations and different limits of X for each equation to quickly generate a different curve.

Thanks!
Last edit: 2011-05-06 20:26:54
Old Post

 
 Caller   Poland. May 06 2011 20:32. Posts 7267
Profile Blog # 
if there's no pattern in your x's you're going to have to manually input it in brah
Watch me fail at Paradox: http://www.teamliquid.net/forum/viewmessage.php?topic_id=397564
Old Post

 
 Aim Here   Scotland. May 06 2011 20:41. Posts 651
Profile Blog # 
This is more of a blog, but anyways, there's two ways to get a cell with the values of your function.

If your function is easy, use nested IFs, as in a formula with
=IF(x=<1,240,IF(x<2,240+45*(x),IF ... )))

Or you could put the bounding values of the piecewise chunks of X in as a column in a table and the Y formulae in the second column, and use vlookup to look them up.

Once you can put the values in a cell, then you can knock up a table with a list of X values, and the formulae values, and then turn it into a graph.

If you need more clarification, you can PM me.
Last edit: 2011-05-06 20:42:14
 
Old Post

  Starfox   Austria. May 06 2011 21:17. Posts 699Profile # 

On May 06 2011 20:25 Betalump wrote:
I fully understand that Excel is not the best program to do this type of work. However it is the medium I have available and I would like to use Excel so that I can tie it into a bunch of work that I've already done with it.

The goal is to get Excel to successfully plot a curve of a piecewise function that looks something like this.

If X=0 y=240
If X=1-2 y=240+45(X-0)
If X=3-10 y=240+90+39(X-2)
If X=11-14 y=240+90+232+24(X-10)
If X=15-18 y=240+90+232+96+12(X-14)
etc etc

Then I need to be able to integrate piecewise or be able to get it to calculate the total area under the curve up until any value of X.

If possible, I would like to be able to substitute a different series of equations and different limits of X for each equation to quickly generate a different curve.

Thanks!

Do something like
https://spreadsheets.google.com/ccc?key=0AsHwOnuKF-uIdHJqd1RGOHB6LWlFZXYzc2c2UXJJVmc&hl=en&authkey=CL6hiJgI
Then you would go about and do a SCATTER plot across the X and Y cells, there should be an option to connect the dots of the scatter plot. You can then change the X values and the how it increases at each part.
Greek Mythology 2.0: Imagine Sisyphos as a man who wants to watch all videos on youtube... and Tityos as one who HAS to watch all of them.
Old Post

 
 Glacierz   United States. May 07 2011 00:59. Posts 467
Profile Blog # 

On May 06 2011 20:41 Aim Here wrote:
This is more of a blog, but anyways, there's two ways to get a cell with the values of your function.

If your function is easy, use nested IFs, as in a formula with
=IF(x=<1,240,IF(x<2,240+45*(x),IF ... )))

Or you could put the bounding values of the piecewise chunks of X in as a column in a table and the Y formulae in the second column, and use vlookup to look them up.

Once you can put the values in a cell, then you can knock up a table with a list of X values, and the formulae values, and then turn it into a graph.

If you need more clarification, you can PM me.


Are you proficient in VBA? If so try to use the switch function on x, otherwise use the above post's nested IF statements.
Old Post

Please log in or register to reply.
 
Refresh
StarCraft: Brood War
StarCraft 2
Dota 2
Other Notable Streams
[ Show 56 non-featured ]

» Recent SC2 Results
» Premier SC2 Tournaments

The Little App Factory