1+1

(*takto vypada komentar*)
(*Funguje podobne jako komunikace na webu, tj napisi co pozaduji, Shift+Enter odeslu do kernelu(jadra) a dostanu vystup*)

2

(Sqrt[2])

(*odmocninu muzeme napsat pomoci Palettes/Other/Basic Math Input, nebo dalsi moznost Ctrl+2   *)

(Sqrt[4])

(*Vysledek je vzdy nejkratsi a nejpresnejsi odpoved*)

(Sqrt[2.])

(*Nepresnou dvojiku vytvorim pomoci 2.  *)

(30/7)

(*Zlomek mohu vytvorit klavesovou zkratkou ctrl+/*)

(30/7.)

N[(30/7)]

(*Pouziti funkce N pro vycisleni zlomku*)

N[1/7,50]

(*Funkce muze mit dva parametry, druhy urcuje pocet platnych cislic (v tomto pripade 50)*)

x
cos
(*modra barva znamena, ze symbol jeste neni v jadre, funkce implementovane uvnir jadra pri spusteni zacinaji velkym pismenem*)
π
(*Pi mohu vzit z palety a nebo Esc+p+Esc*)
Cos

d=5

(* Na prirazeni hodnoty do promene pouzije jedno = (v tomto pripade do d davam 5), neni nutne specifikovat typ promenne predem (int, funkce, pole,...) *)

ClearAll[d]

(*Funkce ClearAll vymaze vsechny promenne na ktere ji aplikuji*)

d=5;
C=2+d
(*Pripravene funkce v jadru nelze prepsat, po tomto prikazu prijde, ze C je Protected*)

Sin=3

N=2+d

a=3
b=2
b==4
(*Pro rovnice pouzivame dvojity = , (ptáme se na to zda b je rovno 4)*)

b==a

a=2
b==a

Solve[x*Log[x]==2,x]
(*Funkce Solve pocita nediferencialni rovnice, prvni argument je rovnice, druhy je co chci vypocitat*)

FindRoot[x*Log[x]==2,{x,2}]
(*Funkce FindRoot pocita nediferencialni rovnice ale numerickym, prvni argument je rovnice, druha je list ve tvaru{co chci pocitat, kde zacni}*)

FindRoot[Sin[x]==0,{x,3}]

(x+1)*(x-1)
(*kulate zavorky jsou pro vyrazy*)

jsou vsude diverzanti

(*Mezera znamena nasobeni (Nepouzivat!!!), pote seradi promenne podle abecedy*)

2 3

2*3

Sin[π]

π
ω
(*omega napisi bud z palety nebo dle Esc+o+Esc (podobne i ostatni pismena recke abecedy)*)

list={2.5,{E,π,I},diverzant,a}
(*List tvorim pomoci slozenych zavorek, list muze obsahovat dalsi listy*)

NestList[x,f[x],4];

list[[1]]
list[[2]]
list[[2,2]]
(*Prvek v listu volam pomoci dvojhranatych zavorek ([[]]), poté se dostavam do dalsich urovni listu*)

list[[3]]=protistatny

list

list[[4]]=zivel

list

Plot3D[Sin[x]*Cos[x]+(E^(x*y)),{x,-1,1},{y,-1,1}]
(*Funkce Plot3D zobrazi graf funkce dvou promennych*)

N[(Sqrt[2])]
(*Standartni volani funkci*)

(Sqrt[2])//N
(*Volani funkce pro line programatory*)

N[(Sqrt[2]),100]

N@(Sqrt[2])
(*Dalsi typ volani funkce  *)

(Sqrt[2])@N

Sin@Cos

Sin@{a,b,c}

%
(*Posledni output*)

(775/21.)

%-36

Plot[(E^((-t)/0.05))*Sin[314*t],{t,0,0.1},AxesLabel->{x,f[x]}]

Options[Plot]

x=divezant;
Plot[(E^((-t)/0.05))*Sin[314*t],{t,0,0.1},AxesLabel->{x,f[x]}]

Plot[(E^((-t)/0.05))*Sin[314*t],{t,0,0.1},AxesLabel->{"x","f(x)"}]

Plot[(E^((-t)/0.05))*Sin[314*t],{t,0,0.1},AxesLabel->{"x","f(x)"},GridLines->Automatic,AxesOrigin->{0,-1},PlotLabel->"muj graf",PlotStyle->{Red,Thick,Dashed}]

Plot[(E^((-t)/0.05))*Sin[314*t],{t,0,0.1},AxesLabel->{"x","f(x)"},GridLines->Automatic,AxesOrigin->{0,-1},PlotLabel->"muj graf",PlotStyle->{RGBColor[1,0,1],Thickness[0.005],Dashed},AxesStyle->{Directive[20,Blue,Italic],Directive[10,Red,Bold]}]

Plot[(E^((-t)/0.005))*Sin[314*t],{t,0,0.1},AxesLabel->{"x","f(x)"},GridLines->Automatic,AxesOrigin->{0,0},PlotLabel->"muj graf",PlotStyle->{Red,Thick,Dashed},PlotRange->{Automatic,{-0.2,1}}]

Plot[{(E^((-t)/0.008))*Sin[314*t],(E^((-t)/0.05))},{t,0,0.1},PlotStyle->{{Red,DotDashed},{Blue,Thick}},AxesLabel->{"t","(Subscript[u, 1])(t), (Subscript[u, 2])(t)"}]

proexport=Plot[{(1/(Abs[Sin[x]]+1)),Cos[Sin[x]],ArcTan[x+2]},{x,0,10},PlotRange->All,PlotStyle->{{Green,DotDashed,Thick},{Yellow,Dashed,Thickness[0.02]},{Blue}},AxesLabel->{"x","(1/(Abs[Sin[x]]+1)),Cos[Sin[x]],ArcTan[x+2]"},PlotLabel->"Graf"]

SetDirectory[NotebookDirectory[]]

Export["kefalin.png",proexport,ImageResolution->300]
Export["jasanek.jpg",proexport,ImageResolution->300]

x=2;
Plot[Evaluate[Sin[x]],{x,0,3π}]
Plot[Sin[x],{x,0,3π}]

ClearAll[x]
res=Solve[a*(x^2)+b*x+c==0,x]

a=2;
b=(7/8);

{2,student,kefalin}/.{kefalin->basa}

{x,y,z}/.{x->1,y->5}

{2,student,kefalin}/.{kefalin->diverzant,kefalin->basa}

{x,y,z}/.{x->1,x->5}
{x,y,z}/.{x->1,x->5}[[2]]

x/.x->z/.z->y

res=x/.Solve[{2*x+y==t,t+y+4*x==(t^2)},{x,y}][[1]]

Plot[res,{t,-1,2}]

Plot[Evaluate[x/.Solve[{2*x+y==t,t+y+4*x==(t^2)},{x,y}][[1]]],{t,-1,2}]

Manipulate[Plot[a*Sin[2 π*f*t+φ],{t,0,0.05},PlotRange->{Automatic,{-1,1}}],{{a,0.5},0,1},{{f,100},50,300,50},{φ,0,2 π}]

Manipulate[Plot[E^(-t/τ)*Sin[2 π*f*t],{t,0,0.1},AxesLabel->{t,u},PlotStyle->{Thick,Hue[x]},PlotLabel->{"graf"},PlotRange->{Automatic}],{τ,0.001,0.01},{f,50,500,25},{x,0,1}]

ClearAll[funkce];

funkce[promenna_]:=(((Sin[promenna]))^2)

funkce[-(π/2)]

ClearAll[funkce2];

c=3;
x1=x/.Solve[a*(x^2)+b*x+c==0,x][[1]];
x2=x/.Solve[a*(x^2)+b*x+c==0,x][[2]];

funkce2[a_,b_]:=Module[{c,x1,x2},
c=2;
x1=x/.Solve[a*(x^2)+b*x+c==0,x][[1]];
x2=x/.Solve[a*(x^2)+b*x+c==0,x][[2]];
{x1,x2}
]

funkce2[1,2]

list={0,(π/6),(π/3),(π/2)};

funkce[list]

funkce[aaa]

ClearAll[R,L,c]

L=0.01;
R=10;
c=(10^(-6));
amplitudova[ω_]:=Abs[R+I*ω*L+(1/(I*ω*c))]

fazova[ω_]:=Arg[R+I*ω*L+(1/(I*ω*c))]

LogLogPlot[amplitudova[frekv],{frekv,0.1,(10^9)},PlotStyle->{Thick,Blue},AxesLabel->{"ω [rad.(s^(-1))]","Abs(Z)[Ω] "},GridLines->Automatic,PlotRange->{Automatic,{0.01,(10^7)}}]

LogLinearPlot[fazova[frekv],{frekv,0.1,(10^9)},PlotStyle->{Thick,Blue},AxesLabel->{"ω [rad.(s^(-1))]","Arg(Z)[rad] "},GridLines->Automatic,PlotRange->{Automatic,{((-π)/2),(π/2)}}]

amplitudova[ω_,R_]:=Abs[R+I*ω*L+(1/(I*ω*c))]
Manipulate[LogLogPlot[amplitudova[frekv,r],{frekv,0.1,(10^9)},PlotStyle->{Thick,Blue},AxesLabel->{"ω [rad.(s^(-1))]","Abs(Z)[Ω] "},GridLines->Automatic,PlotRange->{Automatic,{0.01,(10^7)}}],{r,0.1,10}]

Total

par[listodporov_]:=(((Total[(listodporov^(-1))]))^(-1))

par2[listodporov_]:=(((Plus@@((listodporov^(-1)))))^(-1))
par3:=(((Plus@@((#)^(-1))))^(-1))&;
ser[listodporov_]:=Total[listodporov]

par[{R1,R2,R3}];
par2[{R1,R2,R3}];
par3[{R1,R2,R3}]
ser[{R1,R2,R3}]

R8=par[{R5,R6}];
R9=ser[{R8,R7}];
R10=par[{R2,R9,ser[{R3,R4}]}];
Rvysl=ser[{R10,R1}]

Rvys2=ser[{R1,par[{R2,ser[{R3,R4}],ser[{R7,par[{R5,R6}]}]}]}]//FullSimplify

par[{R1,R2}]//FullSimplify

(((a^2)-(b^2))/(((a-b))^2))

%//FullSimplify