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