Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: using units and plotting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80912] Re: [mg80852] using units and plotting
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 5 Sep 2007 02:56:37 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

I believe that David Park recently answered this question.

$Version

6.0 for Mac OS X x86 (32-bit) (June 19, 2007)

(* In earlier versions use 
Needs["Miscellaneous`PhysicalConstants`"] *)

Needs["PhysicalConstants`"];

dist[t_, a_: AccelerationDueToGravity] := a t^2;

dist[t]

(9.80665*Meter*t^2)/Second^2

Plot[dist[t] /. {Meter -> 1, Second -> 1},
 {t, 0 , 10}]

Plot[dist[t] /. Thread[Variables[dist[1]] -> 1],
 {t, 0 , 10}]


Bob Hanlon

---- phillman5 <PHILLMAN5 at gmail.com> wrote: 
> Is there any hints how to plot things other than downloading custom
> packages when you use units?  To plot position verus time.
> 
> <<Units`
> dist:= a t^2
> a=9.8 Meter/Second^2
> Plot[dist,{t, 0 Second, 10 Second}]
> 
> Does not work.  Of course you can use
> 
> Plot[dist/Meter,{t, 0 Second, 10 Second}]
> 
> to make the y axis unitless, but how about the x axis?
> 
> 



  • Prev by Date: Re: What is $MaxNumber on a 64 bit Computer?
  • Next by Date: Re: Exporting images without white borders
  • Previous by thread: Re: using units and plotting
  • Next by thread: reducing the size of a Manipulate slider control, problem when using ImageSize