1+1
2+2

3+3

(Sqrt[5])

(Sqrt[5.])

N[(Sqrt[5]),100]

(5/13)-(8/7)

N[(Sqrt[5]),3]

LaplaceTransform

LaplaceTransform[t*Sin[3t]*(E^(-t)),t,s]

opice12
12opice

5 6

kyncl je vul

sin=Sin

sin[Pi]

x=2

ClearAll[x]
promenna=Integrate[(E^(((-3)/2)(x^2))),x]

Plot[promenna,{x,-3,3}]

{{1,2},2,{4,3}}[[1]]

Plot3D[Cos[x*Sin[x*y]],{x,-4,4},{y,-4,4}]

Solve[{x+2y==t,-x-3y==-(t^2)},{x,y}]

Solve[x+2y==t&&-x-3y==-(t^2),{x,y}]

?&&

1==1

?===

?==

Equal[a,b]

N[Pi]

Pi//N

N@Pi

120!//N

x=4

{x+2y==t,-x-3y==-(t^2)}//Solve
%//N

DSolve[y''[t]+2*y'[t]+y[t]==(E^t)*Sin[4*t],y[t],t]

DSolve[y''[t]+2*y'[t]+y[t]==(E^t)*Sin[4*t],y,t]

Function[{t},(E^(-t)) C[1]+(E^(-t)) t C[2]-(1/100) (E^t) (4 Cos[4 t]+3 Sin[4 t])][t]

s=NDSolve[{y''[t]+2*y'[t]+y[t]==(E^t)*Sin[4*t],y[0]==0,y'[0]==1},y,{t,0,30}]

Plot[Evaluate[y[t]/.s],{t,1,10},PlotRange->All]

(*zde zacina druhe cviko*)

GoldenRatio

??Plot

x=levhart;
Plot[Cos[x],{x,0,2Pi},AxesLabel->{"x","Cos[x]"}]

Blue

Thick

Dashed

Plot[{Cos[x],Sin[x]},{x,0,2Pi},AxesLabel->{"x","Cos[x],Sin[x]"},PlotStyle->{{Dashing[{0.01,0.02,0.03}],Red,Thickness[0.009]},{Dashed,Thick,RGBColor[0.3,0.3,0.9]}}]

%30

$HistoryLength=2;

pl1=Plot[{((Cos[x])^(-1)),((Sin[x])^(-1))},{x,0,2Pi},AxesLabel->{"x","Cos[x]^(-1),Sin[x]^(-1)"},PlotStyle->{{Red,Thickness[0.009]},{Thick,Blue}},PlotRange->{Automatic,{-30,30}},GridLines->Automatic]

NotebookDirectory[]

SetDirectory[NotebookDirectory[]]

Export["MujPlot.jpg",pl1,ImageResolution->300]
Export["MujPlot.png",pl1,ImageResolution->300]

ClearAll[x]
pl2=Plot[{Sec[x],Csc[x]},{x,0,3.2},PlotStyle->{{Brown,Thick},{Green,Dashed}},PlotRange->{Automatic,{-5,5}},AxesLabel->{"x","Sec[x] Csc[x]"}]

Export["MujPlot2.png",pl2,ImageResolution->100]

Attributes[Plot]

x=4;
Plot[Sin[x],{x,0,6}]

x=4;
Plot[Evaluate[Sin[x]],{x,0,6}]

n==n0*(2^((-t)/τ))

Off[Solve::ifun]
n0=(10^7);
ClearAll[n]
τ=0.1;
protisk=t/.Solve[n==n0*(2^((-t)/τ)),t][[1]]

t/.Solve[n==n0*(2^((-t)/τ)),t]

Plot[protisk,{n,10,(10^7)}]

ClearAll[x,y,t]

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

Plot[res,{t,0,5},PlotStyle->{{Green,Thick},{Thick,RGBColor[1,0,1]}},AxesLabel->{"t","x,y"}]

ClearAll[f,x,k]
k=0.01;
f[x_]:=(Sqrt[(x^2)+(k^2)])-k
Plot[f[Sin[(Sqrt[t])]],{t,1,70}]

ClearAll[f,k]
k=0.01;
x=2;
f[x_]:=(Sqrt[(x^2)+(k^2)])-k
Plot[f[Sin[(Sqrt[t])]],{t,1,70}]

(*Zde zacina treti cviko*)

k=Abs[(((R+I*ω*L)*(1/(I*ω*C1)))/(R+I*ω*L+(1/(I*ω*C1))))]/.{R->10,L->0.001,C1->(10^(-6))};
LogLogPlot[k,{ω,(10^(-1)),(10^9)},PlotStyle->Thick,AxesLabel->{"ω [(s^(-1))]","Abs [-]"},GridLines->Automatic]

Manipulate[
k=Abs[(((R+I*ω*L)*(1/(I*ω*C1)))/(R+I*ω*L+(1/(I*ω*C1))))]/.{L->0.001,C1->(10^(-6))};
LogLogPlot[k,{ω,(10^(-1)),(10^9)},PlotStyle->Thick,AxesLabel->{"ω [(s^(-1))]","Abs [-]"},GridLines->Automatic,PlotRange->{Automatic,{(10^(-5)),1500}}]

,{R,1,100}];

Manipulate[Plot[a*Sin[b*t+c],{t,0,2Pi},PlotRange->{Automatic,{-5,5}}],{{a,2.5},1,5},{{b,2},1,5,1},{{c,3},1,5}]

Manipulate[Graphics[{Hue[b],Disk[]}],{b,0,1}]

ClearAll[par];
par[list_]:=Module[{n},
n=Length[list];
(1/((∑_(i=1)^n)(((list[[i]])^(-1)))))
];
par[{30,30,30}]

(({1,2,3})^(-1))

ClearAll[par2]
par2[list_]:=(((Total[(list^(-1))]))^(-1));

par2[{30,30,30}];
par2[{R1,R2,R3}];

ClearAll[par3]
par3[list_]:=(((Plus@@(list^(-1))))^(-1));

par3[{R1,R2,R3}]

par2[list_]:=(((Total[(list^(-1))]))^(-1));

par3[list_]:=(((Plus@@(list^(-1))))^(-1));

ClearAll[par];
par:=(((Plus@@((#)^(-1))))^(-1))&;
par[{R1,R2,R3}]

ClearAll[ser]
ser[list_]:=Total[list];
ser[{R1,R2,R3}]

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

dos=ToExpression["R"<>ToString[#]]->100&/@Range[5]

N[Rvys/.dos]

ser[{R,par[{ser[{R,R}],ser[{R,R,par[{R,R,R}]}]}]}]

(*Zde zacina ctvrte cviko*)

R1=R2=R3=100;
UZ=10;
IZ=-0.01;
rce={U2==R3*IR3,U3-U2==R2*IR2,U3-U1==R1*IR1,U1-U2==UZ,IR1+IZ==IUZ,IR2+IUZ==IR3+IOUT,0==IR1+IR2};
Solve[rce,{U1,U2,U3,IR1,IR2,IR3,IUZ}]

ClearAll[rceSoucastky,rceUzly,R1,R2,C1,C2,L,rceVse,Uz,Iz,pocPodminky];
IZ=0.1*Sin[100*t];
Uz=230*Sin[314t+(Pi/2)];
R1=R2=100;
C1=C2=0.0000001;
L=1;
rceSoucastky={U1[t]-U2[t]==IR1[t]*R1,U2[t]-U3[t]==R2*IR2[t],UC1[t]==U1[t]-U2[t],IC1[t]==C1*UC1'[t],UC2[t]==U2[t],IC2[t]==C2*UC2'[t],U2[t]-U3[t]==L*IL'[t],Uz==-U3[t]};
pocPodminky={UC1[0]==0,UC2[0]==0,IL[0]==0};
rceUzly={IZ==IR1[t]+IC1[t],IC1[t]+IR1[t]==IC2[t]+IL[t]+IR2[t],IR2[t]+IL[t]==IUZ[t]};

(*zde zacina pate cviko*)

list=Table[(x^i),{i,1,11,2}]
list2=Table[{(x^i),(y^j)},{i,1,11,2},{j,1,11,2}]//MatrixForm

Plot[list,{x,-1,1},AxesLabel->{"x","f[x]"},PlotStyle->Thick]

list=Table[(x^i),{i,1,11,2}];
barvy=Table[{Hue[i],Thick},{i,0,0.6,0.1}];
Plot[list,{x,-1,1},AxesLabel->{"x","f[x]"},PlotStyle->barvy]

Table[j+i,{i,1,4,1},{j,1,4,1}]//MatrixForm

Prime[1]

Off[Prime::intpp]

Table[Prime[4*(i-1)+j-1],{i,4},{j,4}]/.Prime[0]->1
%//MatrixForm

SetDirectory[NotebookDirectory[]]

data=Import["scope_7.csv"]

data2=Cases[data,{_Real,_Real,_Real,_Real}];
n=Length[data2];
jenProudACas=Table[{data2[[i,1]],data2[[i,3]]},{i,n}];
ListPlot[jenProudACas]

jenProudACas2=data2/.{t_,u1_,i_,u2_}:>{t,i};
ListPlot[jenProudACas2]

jenProudACas2Kazda10=Table[jenProudACas2[[i]],{i,1,n,10}];

ListPlot[jenProudACas2Kazda10]

prumPrervod=Mean[data2/.{t_,u1_,i_,u2_}:>(u2/u1)];
Print["Prevod je ",prumPrervod," -"]

Print["jablko= ",Pi," Ω"]

ListPlot[data2/.{t_,u1_,i_,u2_}:>{t,i}]

intProud=Interpolation[jenProudACas2Kazda10]

{tmin,tmax}=intProud[[1,1]]

Plot[intProud[t],{t,tmin,tmax}]

μF=(10^(-6));
kΩ=(10^3);
L=1.;
c=10. μF;
R1=10;
R2=1. kΩ;
iz=intProud[t];

rceSoucastky={U1[t]-U2[t]==L*IL'[t],U2[t]==R1*IR1[t],IC[t]==c*U1'[t],U1[t]==R2*IR2[t]};
rceUzly={iz==IC[t]+IL[t]+IR2[t],IL[t]==IR1[t]};
pocPodm={IL[tmin]==0,U1[tmin]==0};
vsechnyRovnice=Union[rceSoucastky,rceUzly,pocPodm];

res=NDSolve[vsechnyRovnice,{U1,U2,IL,IR1,IR2,IC},{t,tmin,tmax},MaxSteps->100000]

Plot[Evaluate[{U1[t],U2[t],IL[t],IR1[t],IR2[t],IC[t]}/.res],{t,tmin,tmax},PlotRange->All]

dvojice=MovingAverage[data2/.{t_,u1_,i_,u2_}:>{t,i},200];

ListPlot[dvojice];
intProud=Interpolation[dvojice];
{tmin,tmax}=intProud[[1,1]];
Plot[intProud[t],{t,tmin,tmax}]

(*Zde zacina 6. cviko*)

ClearAll[par];
par:=(((Plus@@((#)^(-1))))^(-1))&;

ClearAll[ser]
ser[list_]:=Total[list];

μF=(10^(-6));
μH=(10^(-6));
pF=(10^(-12));
kΩ=(10^3);
L=10μH;
c=100pF;
R1=1kΩ;
R2=1;

z2=(1/(I*ω*c));
z1=par[{ser[{R2,(1/(I*ω*c))}],R1,ser[{R2,I*ω*L}]}];

prenos=(z2/(z1+z2));

LogLogPlot[Abs[prenos],{ω,0.1,500*(10^6)},PlotRange->All,GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","Abs(prenos) [-]"},PlotStyle->{Red,Thick}]

μF=(10^(-6));
μH=(10^(-6));
pF=(10^(-12));
kΩ=(10^3);
L=2μH;
c=470pF;
R1=3kΩ;
R2=0.1;

z2=ser[{R2,par[{(1/(I*ω*c)),I*ω*L}]}];
z1=par[{R1,(1/(I*ω*c))}];

prenos=(z2/(z1+z2));

LogLogPlot[Abs[prenos],{ω,0.1,500*(10^10)},PlotRange->All,GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","Abs(prenos) [-]"},PlotStyle->{Magenta,Dashed,Thick}]

μF=(10^(-6));
μH=(10^(-6));
mF=(10^(-3));
pF=(10^(-12));
kΩ=(10^3);
c1=1μF;
c2=5mF;
L1=10μH;
L2=1;
R1=10;
R2=100;
za=ser[{R1,par[{(1/(I*ω*c1)),I*ω*L1}]}];
zb=par[{R2,I*ω*L2,ser[{(1/(I*ω*c1)),R2}]}];
z1=ser[{za,zb}];
z2=par[{R2,ser[{(1/(I*ω*c2)),I*ω*L2}]}];
prenos=(z2/(z1+z2));
LogLogPlot[Abs[prenos],{ω,0.1,500*(10^10)},PlotRange->All,GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","Abs(prenos) [-]"},PlotStyle->{Magenta,Dashed,Thick}]
Print["Abs(prenos pro ω=150)= ",Abs[prenos/.ω->150.]]

Iz=0.1*(E^(I*0.86))

ClearAll[R,c,L,Upp]

rceSoucastky={U1-U2==(1/(I*ω*c))*Ic,U1-U3==R*IR23,U2==R*IR2R,U3==I*ω*L*IL,U2-U3==100*R*I100R,Upp==U2-U3};
rceUzly={Iz==Ic+IR23,Ic==IR2R+I100R,IR23+I100R==IL};
rceVse=Union[rceSoucastky,rceUzly];

R=100;
L=0.1;
c=5μF;

style={Thick,Cyan};
res=Solve[rceVse];
LogLogPlot[Abs[Upp/.res[[1]]],{ω,0.1,500*(10^10)},PlotRange->All,GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","Abs(Upp) [V]"},PlotStyle->style]

Solve[rceVse]

(*Zde zacina 8. cviko*)

SetDirectory[NotebookDirectory[]];
data=Import["dat.csv"]//Union;

plList=ListPlot[data];
polynom=Table[(x^i),{i,0,3}];
mujFit=Fit[data,polynom,x];
plProklad=Plot[mujFit,{x,data[[1,1]],data[[-1,1]]},PlotStyle->{Thick,Red},PlotLabel->"rek"];
Show[plProklad,plList];

R=10;
L=0.1;
c=20*(10^(-6));
f=50;
ω0=2*Pi*f;
T=(1/f);
Z[ω_]:=R+I*ω*L+(1/(I*ω*c));
Uz0=10*(E^(I*0.4));
Uz5=3*(E^(I*(-0.7)));
I0=(Uz0/(Z[ω0]));
I5=(Uz5/(Z[5*ω0]));

doCasu[fazor_,omega_]:=Im[fazor*(E^(I*omega*t))]

vCase=doCasu[I0,ω0]+doCasu[I5,5*ω0];
Plot[vCase,{t,0,T},PlotStyle->Thick,AxesLabel->{"t [s]","I [A]"}]

ComplexExpand[vCase]