APR Druhe 25.10.2006

Uvod

<< Graphics`Graphics`

Random[Integer]

?Random

Random[Integer, {1, 8}]

konst = 5

konst*2

{konst, a, b, c, 3, 4. }

?:=

b := 2

Sin[0.2]

x = 2

Clear[fce, x]

x

Cos[I]

x

Prenos

Clear[par]
par[A_, B_] := Simplify[((((1/A) + (1/B)))^(-1))]

par[R1, R2]

?par

par[2, 4]

R1pC2 = par[R1, (1/(I*ω*C2))]

prenos = ((R1pC2/(R1pC2 + (1/(I*ω*C1)))))

nasobky = {μ -> (10^(-6)), 
        k -> 1000}
dos = {R1 -> 1  k, C1 -> 4  μ, C2 -> μ, 
          L1 -> 4, L2 -> 1} /. nasobky

prenos /. dos

Abs[prenos /. dos] /. ω -> 1000
Arg[prenos /. dos] /. ω -> 1000

?LogPlot

LogLogPlot[20*Abs[prenos /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[1], 
            Thickness[0.02]}];
LogLinearPlot[Arg[prenos /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[0.6], Thickness[0.02]}];

Prenos jako funkce

fprenos[Z1_, Z2_] := (Z2/(Z1 + Z2))

Priklad 5.

prenos5 = 
      fprenos[(1/(I*ω*C1)), 
        par[R1, (1/(I*ω*C2))]]
prenos5 /. dos /. ω -> 1000

LogLogPlot[20*Abs[prenos5 /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[1], 
            Thickness[0.02]}];
LogLinearPlot[Arg[prenos5 /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[0.6], Thickness[0.02]}];

Priklad 7.

prenos7 = 
      fprenos[par[R1, I*ω*L1], 
        L2]
prenos7 /. dos /. ω -> 1000

LogLogPlot[20*Abs[prenos7 /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[1], 
            Thickness[0.02]}];
LogLinearPlot[Arg[prenos7 /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[0.6], Thickness[0.02]}];

Priklad a6.

prenosa6 = 
      fprenos[(1/(I*ω*C1)), 
        (1/(I*ω*C2)) + R1]
prenosa6 /. dos /. ω -> 1000

LogLogPlot[20*Abs[prenosa6 /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[1], 
            Thickness[0.02]}];
LogLinearPlot[Arg[prenosa6 /. dos], {ω, 1, 10000}, 
        PlotRange -> All, 
        PlotStyle -> {Hue[0.6], Thickness[0.02]}];

Animace a6

prenosa6a = 
      fprenos[(1/(I*ω*C1)), 
        (1/(I*ω*C2)) + 
          R1zmena]
prenosa6a /. dos /. ω -> 1000

Table[LogLogPlot[20*Abs[prenosa6a /. dos],{ω, 1, 10000},PlotRange -> {{10, 10000}, {15, 20}},
PlotLabel -> R1zmena,
AxesLabel -> {"ω", "|P|"},
PlotStyle -> {Hue[1], Thickness[0.02]}]
,{R1zmena, 100, 3000, 200}];

Table[LogLinearPlot[
              Arg[prenosa6a /. dos], {ω, 1, 10000}, 
              PlotRange -> All, 
              PlotStyle -> {Hue[0.6], Thickness[0.02]}]
,{R1zmena, 100, 2000, 200}];

Charky a6

prenosa6aw = 
      fprenos[(1/(p*C1)), (1/(p*C2)) + R1]
prenosvomega = 
      prenosa6aw /. p -> (I*ω)

wecko = 
      InverseLaplaceTransform[prenosa6aw /. dos, p, 
        t]
acko = 
      InverseLaplaceTransform[((prenosa6aw /. dos)/p), p, t]

Plot[wecko, {t, 0, 0.01}, 
      PlotRange -> All]
Plot[acko, {t, 0, 0.01}, PlotRange -> All]

Delka

zpalcudocm[palce_] := 2.54*palce

zestopdocm[stopy_] := stopy*zpalcudocm[12]

zestopapalcudocm[stopy_, palce_] := 
      zestopdocm[stopy] + zpalcudocm[palce]

zestopapalcudocm[6, 10]

<< Miscellaneous`Units`

Convert[6  Feet + 10  Inch, Centi Meter] // N

?Mod
?Round
?Ceiling
?Floor