“《超越学科的认知基础》2015张世超学习报告第六周”版本间的差异
来自iCenter Wiki
(→Mathematica 指令表) |
(→Mathematica 指令表) |
||
第21行: | 第21行: | ||
|esc-ee-esc | |esc-ee-esc | ||
|- | |- | ||
− | | | + | |power |
− | | | + | |control-6 |
+ | |- | ||
+ | |fraction | ||
+ | |control-forwardslash | ||
+ | |- | ||
+ | |evaluate | ||
+ | |shift-return | ||
+ | |- | ||
+ | |new line | ||
+ | |return | ||
+ | |- | ||
+ | |alias for the last output expression | ||
+ | |% | ||
+ | |- | ||
+ | |make substitution | ||
+ | |/. | ||
+ | |- | ||
+ | |Expand | ||
+ | |Expand[ ] | ||
+ | |- | ||
+ | |Simplify x²+(2x²+sin(x)) | ||
+ | |Simplify[x²+(2x²+sin[x])] | ||
+ | |- | ||
+ | |Factorise | ||
+ | |Factor[x²-1] | ||
+ | |- | ||
+ | |Evaluate πto decimal places | ||
+ | |N[π,100] | ||
+ | |- | ||
+ | |poly=1+3x+5x³+6sin[x] | ||
+ | |poly=1+3x+5x³+6sin[x] | ||
+ | |- | ||
+ | |extract the coefficient | ||
+ | |Coefficient[poly,x²] | ||
+ | |- | ||
+ | |Solve the equation z=x²+1 for x (remember to use == not =) | ||
+ | |z==x²+1 | ||
+ | |rowspan="2"|Solve the system of equations | ||
+ | x+y+z=1 | ||
+ | x-y=2 | ||
+ | |Solve[x+y+z==1&&x-y==2,{x,y,z}] | ||
|- | |- | ||
|Mutiply the matrix A by the Vector v. | |Mutiply the matrix A by the Vector v. |
2015年10月27日 (二) 06:47的版本
关键词
Mathematica[1]
学习报告
Mathematica 指令表
Mathematica 指令表 | ||||||||
---|---|---|---|---|---|---|---|---|
操作 | 指令 | |||||||
enter i | type esc-ii-esc | |||||||
enter square root | control -2 | |||||||
enter "e" | esc-ee-esc | |||||||
power | control-6 | |||||||
fraction | control-forwardslash | |||||||
evaluate | shift-return | |||||||
new line | return | |||||||
alias for the last output expression | % | |||||||
make substitution | /. | |||||||
Expand | Expand[ ] | |||||||
Simplify x²+(2x²+sin(x)) | Simplify[x²+(2x²+sin[x])] | |||||||
Factorise | Factor[x²-1] | |||||||
Evaluate πto decimal places | N[π,100] | |||||||
poly=1+3x+5x³+6sin[x] | poly=1+3x+5x³+6sin[x] | |||||||
extract the coefficient | Coefficient[poly,x²] | |||||||
Solve the equation z=x²+1 for x (remember to use == not =) | z==x²+1 | Solve the system of equations
x+y+z=1 x-y=2 |
Solve[x+y+z==1&&x-y==2,{x,y,z}] | |||||
Mutiply the matrix A by the Vector v. | A.v %//MatrixForm | |||||||
Determinant | Det[A] | |||||||
Inverse | Inverse[A]//MatrixForm | |||||||
MatrixPower | [A,2]//MatrixForm or A²//MatrixForm | |||||||
Transpose | Transpose[A]//MatrixForm | |||||||
Extract | A1//MatrixForm | |||||||
Make a 10×10 matrix and automatically populate if with a formula. | M=Table[i*j+sin[i+j},{i,1,10},{j,1,10}];M//MatrixForm | |||||||
data={1,2,3,4,5} | av2[v_]:=Total[v]/Length[v];av2[data] | |||||||
Function | ||||||||
Define a function;f[x_]:=cos[x]+sin[x];g[x_]:=cos[x]-2; | Evaluate+for x =1;N[f[1],500] | |||||||
Average:Write a function av(v) | evaluate it for {1,2,3,4,5} | |||||||
Plotting | ||||||||
Plot the function sin(x) in the range 0<x<5 | Plot [sin[x],{x,0,5}] | |||||||
Superimpose the plots of sin(x) and cos(x) | Plot[{sin[x],cos[x]},{x,0,10}] | |||||||
Make a 3D plot of sin(x)cosxy over the range 0<x<5,0<y<5 | Plot 3D[sin[x]Cos[y],{x,0,5},{y,0,5}] | |||||||
Change the font size and disale the mesh | Plot3D |