Re: bode diagram
- To: mathgroup at smc.vnet.net
- Subject: [mg57000] Re: [mg56979] bode diagram
- From: Selwyn Hollis <sh2.7183 at earthlink.net>
- Date: Thu, 12 May 2005 02:32:47 -0400 (EDT)
- References: <200505110926.FAA24142@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On May 11, 2005, at 5:26 AM, GaLoIs wrote: > hi, like plotting simple bode diagrams of systems. could you give > me some > information about it? i can do it with another program, but i'd > like to see > how mathematica works > thank you > Hello, Here's some simple code for making a Bode plot: gain[p_, q_, \[Omega]_] := q/Sqrt[p^2*\[Omega]^2 + (q - \[Omega]^2)^2]; \[Phi][p_, q_, \[Omega]_] := ArcCos[(q - \[Omega]^2)/Sqrt[p^2*\[Omega]^2 + (q - \[Omega]^2)^2]]; gainplot[p_, q_]:= Plot[20 Log[10, gain[p,q,10^x]], {x,-1,1}, PlotRange->All, AxesLabel -> {"\!\(log\_10\)\[Omega]", "Gain (dB)"}]; angleplot[p_, q_] := Plot[\[Phi][p, q, 10^x]/Degree, {x,-1,1}, PlotRange->All, AxesLabel -> {"\!\(log\_10\)\[Omega]", "Phase Angle (deg)"}, Ticks -> {Automatic, 30 Range[1, 6]}]; << "Graphics`Graphics`" BodePlot[p_, q_] := DisplayTogetherArray[{gainplot[p, q], angleplot [p, q]}, PlotLabel->"Bode Plot ( p="<>ToString[p]<>", q="<>ToString[q] <>" )", Frame-> True, ImageSize -> 500]; BodePlot[.5, 5] (See http://library.wolfram.com/infocenter/Books/4855/) Regards, Selwyn Hollis www.appliedsymbols.com www.math.armstrong.edu/faculty/hollis
- References:
- bode diagram
- From: "GaLoIs" <lanellomancante@inwind.it>
- bode diagram