1+1

(Sqrt[2])

(Sqrt[2.])

N[(Sqrt[2]),100]

?N

(Sqrt[3])(3^6)(6/3)

LaplaceTransform
LaplaceTransform

2 3
promena=3

promena

auto5=6;
5auto

(*komentar*)

Solve[a*(x^4)-1==0,x]

Plot[Sin[x],{x,0,5}]

3I

Solve[{x+y==4},{x,y}]

Solve[Sin[x]==0,x]

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

DSolve[{x''[t]+x'[t]+2x[t]==(1/t)*(E^t),x[1]==2,x'[1]==3},x[t],t];

∫(E^x)*Cos[x]\[DifferentialD]x

Integrate[(E^x)*Cos[x],{x,2,10}]

N[Pi,100]

Limit[((3n-(n^2)*(((-1))^n))/(n+3)),n->∞]

toto=3x
fel=6
toto je fel

Sin[3.];
3.//Sin;
Sin@3.

NDSolve[(t+1)*x''[t]+6*x'[t]+3*x[t]==(((Sin[3t+1]))^10),x[t],{t,1,10}]

(*2 cviceni 23.2.2015*)

res=DSolve[{y'''[t]-y''[t]+y'[t]-y[t]==Cos[t]*(E^(-3*t))+1,y[0]==2,y'[0]==-4,y''[0]==0.},y[t],t];

a/.a->3

b/.a->3

x/.{x->3,x->2}

y/.{x->3,y->4}

x/.{x->3,x->2}[[2]]

x/.{x->3,y->4,x->2}[[2]]

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

D[y[t],{t,3}]

Plot[Sin[x],{x,-4,4}]

resProGraf=y[t]/.res[[1,1]];

y[t]

Plot[{resProGraf,40*Sin[t]},{t,-4,4},AxesLabel->{"t[s]","I[A]"},PlotStyle->{{Hue[0.2], Thickness[0.1],Dashed},{RGBColor[1,0,1],Thickness[0.01],DotDashed}},PlotLabel->"Muj graf proud napeti",PlotRange->{Automatic,{0,50}}]

MRes1=DSolve[{y''''[t]+11*y''[t]+18*y[t]==Sin[t],y[0]==1,y'[0]==-1,y''[0]==3,y'''[0]==-2},y[t],t];

MRes=y[t]/.MRes1[[1]];

Plot[MRes,{t,0,100},PlotStyle->{ Green,Thick,Dashed},PlotLabel->"Muj graf",AxesLabel->{"t[s]","I[A]"}]

(*treti cv 2.3.2015*)

res=FindRoot[{Log[Abs[x-0.5]]==y,y^2==Log[x]},{{x,5},{y,1}}];
iks=x/.res[[1]];
yps=y/.res[[2]];
Plot[{iks*Sin[yps*t],yps*Sin[iks*t]},{t,0,8},PlotStyle->{{Thick,Dashed,Black},{Thick,Red}},PlotLabel->"Graf sin1 sin2",AxesLabel->{"t [s]","sin1, sin2"},GridLines->Automatic,PlotRange->{Automatic,{-4,4}}]

TreeForm[res]

res=FindRoot[{Log[Abs[x-0.5]]==y,y^2==Log[x]},{{x,5},{y,1}}];
iks=x/.res[[1]];
yps=y/.res[[2]];
Plot[{iks*Sin[yps*t],yps*Sin[iks*t]},{t,0,8},PlotStyle->{{Thick,Dashed,Black},{Thick,Red}},PlotLabel->"Graf sin1 sin2",AxesLabel->{"t [s]","sin1, sin2"},GridLines->Automatic,PlotRange->{Automatic,{-4,4}}]

Manipulate[
b=Round[φ1,0.01];
Plot[{iks*Sin[yps*t+φ1],yps*Sin[iks*t+φ2]},{t,0,8},PlotStyle->{{Thick,Dashed,Black},{Thick,Red}},PlotLabel->"Graf sin ("<>ToString[b]<>") sin2",AxesLabel->{"t [s]","sin1, sin2"},GridLines->Automatic,PlotRange->{Automatic,{-4,4}}],{φ1,0,2Pi},{φ2,0,2Pi}]

"Graf sin ("<>ToString[φ1]<>") sin2"

ClearAll[mojeFunkce]
mojeFunkce[a_,b_,c_]:=Solve[a*(x^2)+b*x+c==0,x]

mojeFunkce[1,2,3]

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

ClearAll[a,b,c];
h=mojeFunkce[a,b,c];

(*ctvrtek cv. 9.3.2015*)
mH=(10^(-3));
R1=10;
R2=12;
L=5*mH; 
c=5*(10^(-6));
Is=Tanh[100*(((Sin[314*t]))^50)]-0.5;
Us=230*Sin[314*t];
rceUzly={0==IUs[t]+IR1[t],IR1[t]==IR2[t]+IL[t],IR2[t]==Is+IC[t]};
rceSoucastky={U1[t]-U2[t]==R1*IR1[t],U1[t]-0==Us,U2[t]-0==L*IL'[t],U2[t]-U3[t]==R2*IR2[t],IC[t]==c*U3'[t]};
pocPodm={IL[0]==0,U3[0]==0};

Plot[Tanh[100*(((Sin[314*t]))^50)-1],{t,0,0.1}];

NDSolve

rceVse=Union[pocPodm,rceSoucastky,rceUzly];

nezname=Union[Cases[rceVse,_Symbol[t],{0,Infinity}]];

rceVse//TreeForm;

tMax=0.2;

res=NDSolve[rceVse,nezname,{t,0,tMax},StartingStepSize->(10^(-12)),MaxSteps->(10^5)];

proudL=IL[t]/.res;
proudC=IC[t]/.res
Plot[{Is,proudL,proudC},{t,0,tMax},PlotStyle->{Red,Green,Blue},PlotRange->All];

(*Zde zacina 5. cviko 16.3.2015*)

rceUzly={Iz==IR1,IR1==IUz+IR2+IR3,IR2==IR4+Iout};
rceSoucastky={U1-U2==R1*IR1,Uz==U2,U2-U3==R2*IR2,U2==R3*IR3,U3==R4*IR4};
rceVsechny=Union[rceUzly,rceSoucastky];
U3/.Solve[rceVsechny,{U1,U2,U3,IR1,IR2,IR3,IR4,IUz}][[1]]/.{R1->1,R2->2,R3->3,R4->4,Uz->10,Iz->1}//Expand//N

ClearAll[par,ser];
par[list_]:=(((Plus@@((list^(-1)))))^(-1));
ser[list_]:=Plus@@list;

par[{R1,R2,R3}]

j=I;
Za=par[{R1,I*ω*L1,(1/(I*ω*c1))}];
Z1=ser[{Za,I*ω*L2}];

Zb=par[{R2,I*ω*L4}];
Z2=ser[{I*ω*L3,(1/(I*ω*c2)),Zb}];

prenos=(Z2/(Z1+Z2))/.{R1->100,L1->5*(10^(-3)),c1->20*(10^(-6)),L2->500*(10^(-6)),L3->1*(10^(-3)),c2->5*(10^(-6)),R2->8*(10^3),L4->2*(10^(-3))};

LogLogPlot[Abs[prenos],{ω,1000,30000},PlotRange->All,PlotStyle->{Thick,Red},GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","prenos[-]"}]

LogLogPlot[Abs[Z1+Z2]/.{R1->100,L1->5*(10^(-3)),c1->20*(10^(-6)),L2->500*(10^(-6)),L3->1*(10^(-3)),c2->5*(10^(-6)),R2->8*(10^3),L4->2*(10^(-3))},{ω,1000,30000},PlotRange->All,PlotStyle->{Thick,Red},GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","Abs(Z1+Z2) [Ω]"}]

Z1n=ser[{par[{R1,I*ω*L1,(1/(I*ω*c1))}],I*ω*L2}]

LogLinearPlot[Arg[prenos],{ω,1000,30000},PlotRange->All,PlotStyle->{Thick,Red},GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","prenos[-]"}]

(*Zde zacina 6. cviceni 23.3.2015*)

ClearAll[par,ser];
par[list_]:=(((Plus@@((list^(-1)))))^(-1));
ser[list_]:=Plus@@list;
Z1=par[{ser[{R1,par[{I*ω*L1,(1/(I*ω*c1))}]}],R2}];
Z2=par[{R3,ser[{(1/(I*ω*c2)),I*ω*L2}]}];
prenos=(Z2/(Z1+Z2))/.{R1->10,R2->1000,R3->100000,L1->0.01,L2->0.002,c1->10*(10^(-12)),c2->50*(10^(-6))};
LogLogPlot[Abs[prenos],{ω,(10^(-3)),(10^10)},PlotRange->All,PlotStyle->{Thick,Green,Dashed},GridLines->Automatic,AxesLabel->{"ω [(s^(-1))]","Přenos[-]"},PlotLabel->"Náš graf"];

SetDirectory[NotebookDirectory[]];

data=Import["scope_7.csv"];

bocnik=0.05;
data2=data/.{a_,b_,c_,d_}:>{a,b};
data2upr=Table[data2[[i]],{i,3,Length[data2]}];
pl1=ListPlot[data2upr];

data3=data/.{a_,b_,c_,d_}:>{a,(c/bocnik)};
data3upr=Table[data3[[i]],{i,3,Length[data3]}];
pl2=ListPlot[data3upr,PlotStyle->Red];

data4=data/.{a_,b_,c_,d_}:>{a,d};
data4upr=Table[data4[[i]],{i,3,Length[data4]}];
pl3=ListPlot[data4upr,PlotStyle->Green,PlotLabel->"data"];

Show[pl3,pl2,pl1]

ClearAll[data]

data=Table[{i,Log[Prime[i]]},{i,1,100,1}];

ListPlot[data]

dataFit=Fit[data,Table[(x^i),{i,0,10}],x]

Table[(x^i),{i,0,10}]

ClearAll[fce,dataFit,data,pl1,pl2,x]
dataFit=Fit[data,Table[(x^i),{i,0,10}],x];
data=Table[{i,Log[Prime[i]]},{i,1,100,1}];
dataFit=Fit[data,Table[(x^i),{i,0,10}],x];
pl1=ListPlot[data]
pl2=Plot[dataFit,{1,100}];
Show[pl1,pl2]

Manipulate[fce[n],{n,0,20}]

ClearAll[fce,dataFit,pl1,pl2,x]
fce[stupen_]:=Module[{data,pl1,pl2,dataFit},

data=Table[{i,Log[Prime[i]]},{i,1,100,1}];
pl1=ListPlot[N[data]];
dataFit=Fit[data,Table[(x^i),{i,0,stupen}],x];
pl2=Plot[dataFit,{x,1,100},PlotStyle->{Thick,Red}];
Show[pl1,pl2]
]

Manipulate[fce[i],{i,0,20,1}]

Fit[{{1,99},{24,95}},{1,(E^t)},t]

Fit[data,{1,x,(E^x)},x]