Re: used by LogLogPlot?
- To: mathgroup at smc.vnet.net
- Subject: [mg130515] Re: used by LogLogPlot?
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Wed, 17 Apr 2013 02:33:21 -0400 (EDT)
- Delivered-to: email@example.com
- Delivered-to: firstname.lastname@example.org
- Delivered-to: email@example.com
- Delivered-to: firstname.lastname@example.org
On 4/16/13 at 12:36 AM, fishe053 at cougars.csusm.edu wrote: >I'm confused too. I'm trying to plot this code below via >mathematica however I can't get the plot to come out correctly. >R = 10; >L = 0.01; >C = 2.533e-8; >f = logspace(3,5,2000); >w = 2*pi*f; >H = R./(R+j*w*L + 1./(j*w*C )); >semilogx(f,20*log10(abs(H))) >I've tried using LogLinearPlot to replicate it in mathematica but >when I try I get something completely different! Not sure why. Simply put you must use correct syntax. Do not get in the habit of using a single upper case letter as a variable. Too many of these have built-in meaning for Mathematica and using one that has built-in meaning generally results in undesired behavior. A short (but not complete) list of upper case letters with built-in meaning include C, D, E, I and N All built-in Mathematica functions/commands/symbols start with an upper case letter. That is 3.1459... is Pi not pi, the logarithm of x base 10, is Log[10,x] not log10(x) A consequence of this is anything that begins with a lower case letter is an undefined symbol that you have to define. That is j is not the Sqrt[-1] unless you specifically define it to be. The characters "(" and ")" are used only to group things and cannot be used to mark function arguments. That is log10(x) is seen by Mathematica as the product of symbols log10 and x.