Qurak

Localize variables with Block

Voorbeeld 2 stappen, op volgorde uitgevoerd in één sessie. Elke stap is tegen de engine uitgevoerd en de uitvoer hieronder is wat hij opleverde.

Stap 1
Block[{f = Sin[x + I y]}, ParametricPlot[Evaluate[{Re[f], Im[f]}], {x, -Pi, Pi}, {y, -2, 2}, Mesh -> Automatic]]
Uitvoer
-Graphics-
Stap 2
? f
Uitvoer
Missing[UnknownSymbol, f]

Gebruikte functies

Gerelateerde recepten

Alle recepten · Functiereferentie · Gebruik dit vanuit een MCP-client