Hey there, I am very new to Mathematica. This is my code to get a graph for dynamic CMOS. This is just the first stage and I get a few errors. Can an expert guide me? I have already checked the documentation, yet can't solve it.
In[26]:= aRatio = 6/11;
iSize = {11*40, 6*40};
iSize2 = {400, 300};
view = {2, 1, 2};
view1 = {4, 1, 2};
font1 = {"Courier", FontSize -> 13, FontWeight -> "Bold"};
pStyle1 = {RGBColor[1., 0, 0], PointSize[0.015], Thickness[0.007]};
pStyle2 = {GrayLevel[0.5], PointSize[0.015], Thickness[0.007]};
pStyle3 = {RGBColor[0, 0, 0], PointSize[0.015], Thickness[0.007]};
In[78]:= Clear["soln3", "stage2", "stage4", "temp"]
vdd = 5;
k = 0.01;
c0 = 5* 10^-12;
vt = 1;
m = 1*10^9;
In[98]:= input1 = vt/m;
In[99]:= N[1/1000000000]
Out[99]= 1.*10^-9
In[100]:=
soln = Simplify[
Solve[{ip ==
k*((vdd - vin - vt)*(vdd - vo[t]) - (vdd - vo[t])^2/2),
vin == m*t}, ip, {vin}]];
During evaluation of In[100]:= Solve::ivar: 0.` is not a valid variable. >>
In[101]:= stage1[t] = ip /. Part[Part[soln, 1] 1];
During evaluation of In[101]:= ReplaceAll::reps: {True,True} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >>
soln1 = NDSolve[{vo'[t] == stage1[t]/c0, vo[0] == vdd}, {vo[t]}, {t,
0, input1}];
In[102]:= graph1[t_] vo[t] /. Part[Part[soln1, 1], 1];
During evaluation of In[102]:= NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.`. >>
During evaluation of In[102]:= ReplaceAll::reps: {(vo^[Prime])[t]==100000000000 (0./. {0.,True})} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >>
In[103]:=
Plot[graph1[t], {t, 0, vt/m}, PlotRange -> {{0, vt/m}, All},
PlotStyle -> Thick, Frame -> True, GridLines -> Automatic,
FrameTicks -> Automatic, AspectRatio -> 0.5,
ImageSize -> {500, 250}];