Math, asked by jaytla, 11 months ago

I forgot how to define variables and how to write functions. Can anyone help me plz =^-^=

Answers

Answered by lalitkumar28
0
The Wolfram Language's symbolic architecture supports a highly generalized notion of assignment, in which you can specify a transformation for any class of expressions defined by a Wolfram Language pattern. Simple cases correspond to assignments for "variables", "indexed variables", or "structure elements". Other cases define functions or general transformations.

x=v — assign a value (Set)

{x,y}={u,v} — assign multiple values

{x,y}={y,x} — swap values

a[[i]]=v — assign a value to a list/array/expression element

x++ (Increment) ▪  ++x (PreIncrement) ▪  x+=y (AddTo)

x-- (Decrement) ▪  --x (PreDecrement) ▪  x-=y(SubtractFrom)

x*=y (TimesBy) ▪  x/=y (DivideBy)

AppendTo, PrependTo — add elements to a list

Function Definitions

f[x_]:=body — define a function

Forms of Assignment

lhs=rhs — immediate assignment, with rhs evaluated at the time of assignment

lhs:=rhs — delayed assignment, with rhs reevaluated every time it is used

f/:lhs=rhs, f/:lhs:=rhs — associate assignments with the head f

lhs^=rhs, lhs^:=rhs — define "upvalues" associated with the leading head in lhs

Clearing Assignments

x=. — unset the value of x (Unset)

Clear — clear all values associated with a symbol

ClearAll ▪  Remove

Information about Assignments

?x (Information) — get information about all assignments for x

DownValues ▪  UpValues ▪  Save

Related Tutorials

Associating Definitions with Different SymbolsMaking DefinitionsDefining VariablesDefining Numerical ValuesDefining FunctionsMaking Definitions for FunctionsImmediate and Delayed Definitions

Answered by Anonymous
2
variables are termed as a value that can be changable from place to place.

jaytla: Thank you =^-^=
Similar questions