Qurak

Clear my definitions

ハウツー 15 ステップを1つのセッション内で順に実行します。各ステップはエンジンで実行済みで、以下の出力は実際に生成されたものです。

ステップ 1
x = 5;
y = 7;
x + y
出力
12
ステップ 2
Clear[x, y]

出力なし - このステップは次のステップの準備をします。

ステップ 3
Expand[(x + y) ^ 2]
出力
x^2 + 2*x*y + y^2
ステップ 4
Clear["Global`*"]

出力なし - このステップは次のステップの準備をします。

ステップ 5
f[x_] := Table[i, {i, 0, x}]

出力なし - このステップは次のステップの準備をします。

ステップ 6
f[{2, 4, 5, 6}]
出力
Table[i, {i, 0, {2, 4, 5, 6}}]
ステップ 7
SetAttributes[f, Listable]
f[{2, 4, 5, 6}]
出力
{{0, 1, 2}, {0, 1, 2, 3, 4}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5, 6}}
ステップ 8
Clear[f]
 ? f
出力
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|>]
ステップ 9
ClearAll[f]
 ? f
出力
Missing[UnknownSymbol, f]
ステップ 10
f[x_] := Table[i, {i, 0, x}]
SetAttributes[f, Listable]
 ? f
出力
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|>]
ステップ 11
ClearAttributes[f, Listable]
 ? f
出力
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|>]
ステップ 12
x = 5
出力
5
ステップ 13
x=.
 ? x
出力
Missing[UnknownSymbol, x]
ステップ 14
Remove[x]
 ? x
出力
Missing[UnknownSymbol, x]
ステップ 15
x
 ? x
出力
Missing[UnknownSymbol, x]

使用する関数

関連レシピ

すべてのレシピ · 関数リファレンス · MCPクライアントから使う