Qurak

Clear my definitions

操作指南 共 15 個步驟,在同一個工作階段中依序執行。每一步都在引擎上實際執行過,下方的輸出就是它產生的結果。

步驟 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 用戶端使用這個