Qurak

Clear my definitions

Guida pratica 15 passi, eseguiti in ordine in una sola sessione. Ogni passo è stato eseguito sul motore e l'output qui sotto è ciò che ha prodotto.

Passo 1
x = 5;
y = 7;
x + y
Output
12
Passo 2
Clear[x, y]

Nessun output - questo passo prepara qualcosa per il successivo.

Passo 3
Expand[(x + y) ^ 2]
Output
x^2 + 2*x*y + y^2
Passo 4
Clear["Global`*"]

Nessun output - questo passo prepara qualcosa per il successivo.

Passo 5
f[x_] := Table[i, {i, 0, x}]

Nessun output - questo passo prepara qualcosa per il successivo.

Passo 6
f[{2, 4, 5, 6}]
Output
Table[i, {i, 0, {2, 4, 5, 6}}]
Passo 7
SetAttributes[f, Listable]
f[{2, 4, 5, 6}]
Output
{{0, 1, 2}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5, 6}}
Passo 8
Clear[f]
 ? f
Output
InformationData[<|ObjectType -> Symbol, Usage -> Global`f, Documentation -> None, OwnValues -> None, UpValues -> None, DownValues -> None, SubValues -> None, DefaultValues -> None, NValues -> None, FormatValues -> None, Options -> None, Attributes -> {Listable}, FullName -> Global`f|>]
Passo 9
ClearAll[f]
 ? f
Output
Missing[UnknownSymbol, f]
Passo 10
f[x_] := Table[i, {i, 0, x}]
SetAttributes[f, Listable]
 ? f
Output
InformationData[<|ObjectType -> Symbol, Usage -> Global`f, Documentation -> None, OwnValues -> None, UpValues -> None, DownValues -> Information`InformationValueForm[DownValues, f, {f[x_] :> Table[i, {i, 0, x}]}], SubValues -> None, DefaultValues -> None, NValues -> None, FormatValues -> None, Options -> None, Attributes -> {Listable}, FullName -> Global`f|>]
Passo 11
ClearAttributes[f, Listable]
 ? f
Output
InformationData[<|ObjectType -> Symbol, Usage -> Global`f, Documentation -> None, OwnValues -> None, UpValues -> None, DownValues -> Information`InformationValueForm[DownValues, f, {f[x_] :> Table[i, {i, 0, x}]}], SubValues -> None, DefaultValues -> None, NValues -> None, FormatValues -> None, Options -> None, Attributes -> {}, FullName -> Global`f|>]
Passo 12
x = 5
Output
5
Passo 13
x=.
 ? x
Output
Missing[UnknownSymbol, x]
Passo 14
Remove[x]
 ? x
Output
Missing[UnknownSymbol, x]
Passo 15
x
 ? x
Output
Missing[UnknownSymbol, x]

Funzioni usate

Ricette correlate

Tutte le ricette · Guida delle funzioni · Usa questo da un client MCP