1+1

sin[5];
sin[5.1]
Sin[5]
Sin[5.1]
Sin[5.]

1+a

21a=6

21 a

a=1

a

b+a

Sin[5]
Sin[5.]
N[Sin[5]]
Sin[5]//N
5//Sin
5//Sin//N

(franta+pepa)*jarda
franta+pepa*jarda

?=

?==

vysl=Solve[x^2+d*x+1==0,x]

vysl[[2]]
vysl[[2]]/.d->3

x/.{x->(1/2) (-3+(Sqrt[5]))}

Solve[(x^3)+d*(x^2)==14*c,x];

?Plot

Plot[Sin[bohous],{bohous,-2,3},PlotLabel->"Nazev grafu",AxesLabel->{"osa x","osa y"},PlotStyle->{RGBColor[1,0,0],Thickness[0.01]}]

Plot[{Sin[bohous],Cos[bohous]},{bohous,-2,3},PlotLabel->"Nazev grafu",AxesLabel->{"osa x","osa y"},PlotStyle->{{RGBColor[1,0,0],Dashing[0.02]},{Thickness[0.01],RGBColor[0,1,0]}}]

Plot3D[Sin[x+y^2],{x,-3,3},{y,-2,2}]

listik={1,2,3,opice,Sin[6]}

listik[[3]]

listik2={1,2,3,{opice,krava,{pes,kocka}},Sin[6]}

listik2[[5]]
listik2[[4,3,1]]
listik2[[-4]]

Table[i,{i,1,10}]
Table[2i,{i,1,10}]
Table[Sin[i],{i,1,10}]

vysl=Solve[(x^3)+(x^2)+(a^2)*x+(a^3)==0,x];

tisk=Abs[x/.vysl[[1]]];
Plot[tisk,{a,-1,1},AxesLabel->{"a","Abs[x1]"},PlotStyle->Thick]

tisk/.a->5

f=5;
f=6;
f

Sin[5.]

?_

?:=

ClearAll[f];
f[x_]:=(x^2)
f[5]

?x

ClearAll[f];
x=2;
f[x_]:=(x^2)
f[5]

ClearAll[f];
x=2;
f[x_]=(x^2)
f[5]

ClearAll[f,x];
f[x_]=(x^2)
f[5]

g[5]

(*ClearAll[g];
g[x_]=Integrate[(x^3)*Sin[(x^2)],x]
Plot[g[a],{a,-1,1},AxesLabel->{"a","g[a]"},PlotStyle->Thick]*)

(*nevyhodnocuje se*)

ClearAll[h];
h[x_,y_]:=(x^2)+5x*y+3x-y+2(y^2)+5;
graf=Plot3D[h[x,y],{x,-1,3},{y,-2,2},AxesLabel->{"x","    y","h[x,y]"}]

Export["D:\Dokumenty\graf.png",graf,ImageSize->{600,600}]

ClearAll[h];
h[x_,y_]:=(x^2)+5x*y+3x-y+2(y^2)+5;
Print["derivace podle x= ",derx=D[h[x,y],x]]
Print["derivace podle y= ",dery=D[h[x,y],y]]
Print["druha derivace podle x= ",D[h[x,y],{x,2}]]
Print["druha derivace podle y= ",D[h[x,y],{y,2}]]
Print["souradnice minima jsou ",Solve[{derx==0,dery==0}][[1]]]

"http://eem.fel.cvut.cz/sites/all/html/prednes2b.zip";

res=Timing[NDSolve[{rce1,rce2,poc1,poc2},{i[t],uc[t]},{t,0,0.08}][[1]]]

u=230*(Sqrt[2.])*Sin[314t];
R=100;
L=0.1;
c=(10^(-6));
rce1=u==R*i[t]+L*i'[t]+uc[t];
rce2=i[t]==c*uc'[t];
poc1=i[0]==0;
poc2=uc[0]==0;
res=DSolve[{rce1,rce2,poc1,poc2},{i[t],uc[t]},t][[1]]//Chop;
proud=i[t]/.res;
Plot[proud,{t,0,0.08},AxesLabel->{"t[s]","i[A]"},PlotStyle->Thick]

Manipulate[u=230*(Sqrt[2.])*Sin[314t+fi];
R=100;
L=0.1;
c=(10^(-6));
rce1=u==R*i[t]+L*i'[t]+uc[t];
rce2=i[t]==c*uc'[t];
poc1=i[0]==0;
poc2=uc[0]==0;
res=NDSolve[{rce1,rce2,poc1,poc2},{i[t],uc[t]},{t,0,0.08}][[1]]//Chop;
proud=i[t]/.res;
Plot[proud,{t,0,0.08},AxesLabel->{"t[s]","i[A]"},PlotStyle->Thick,PlotRange->{Automatic,{-0.8,0.8}}],{fi,((-Pi)/2),(Pi/2)}]

Table[co[i],{i,0,1.5,0.2}]

Interpolation

Options[Interpolation]

Plot[proklad[x],{x,0,4Pi}]

n=10;
data=Table[{x,Sin[x]},{x,0,2.Pi,2.(Pi/n)}];
pl1=ListPlot[data,PlotStyle->{PointSize[0.02],GrayLevel[0]}];
proklad=Interpolation[data,InterpolationOrder->3];
Show[Plot[proklad[x],{x,0,2Pi}],pl1];

data={{10,1.3*(10^(-6))},{20,1.*(10^(-6))},{30,0.805*(10^(-6))}};
nahr=Interpolation[data,InterpolationOrder->1];
nahr[19.485]

zmereno;

SeedRandom[1];
ClearAll[rnd];
rnd:=Random[Real,{-1,1}];
R=10;
zmereno=Table[{i+0.2rnd,R*i+0.5rnd},{i,0.1,2.5,0.1}];
pl1=ListPlot[zmereno,PlotStyle->{PointSize[0.015],GrayLevel[0]},AxesLabel->{"i[A]","u[V]"}];
nahrada=Fit[zmereno,{i},i];
Print["odpor= ",D[nahrada,i],"  Ω"]
pl2=Plot[nahrada,{i,0.1,2.5},PlotStyle->{Thick,Hue[0]},AxesLabel->{"i[A]","u[V]"}];
Show[pl1,pl2];

Table[((zmereno[[i,2]])/(zmereno[[i,1]])),{i,Length[zmereno]}]

zmereno/.{a_,b_}:>(b/a)

Range[100]/.List->Plus

Range[10]/.List->Plus

Plus[1,2,3,4,5,6,7,8,9,10]

Sin[x]*Cos[x]/.Sin->Tan

FullForm[(x^3)*((Sin[2*y-7])^(1+2x))]

((x^3)*((Sin[2*y-7])^(1+2x)))[[2,1,2]]

(x^3)*((Sin[2*y-7])^(1+2x))
%/.{Times->Plus,Power->Times}