Related

newline-printf-sprint

voltage : (26+31+63+1...

v_TB: 1.2;

R1: 51000;

Calculate

? newline;

Calculate

newline-printf-sprint

voltage : (26+31+63+1...

v_TB: 1.2;

R1: 51000;

Calculate

? newline;

Calculate

newline

Run Example
```(%i1)? newline;

-- Function: newline ()
-- Function: newline (<stream>)
Writes a new line (to <stream>).  See `sprint' for an example of
using `newline()'.  Note that there are some cases, where
`newline()' does not work as expected.

There are also some inexact matches for `newline'.
Try `?? newline' to see them.

(%o1)                                true
(%i2) ```
Run Example
```/*---Priklad 401---*/ newline();

(%o1)                                false
(%i2) q:2;
(%o2)                                  2
(%i3)  L:5;
(%o3)                                  5
(%i4) H:2;
(%o4)                                  2
(%i5) M:3;
(%o5)                                  3
(%i6) B:solve(-B*2*L+((3*L)/2)*(q*L)-M-q*H);
34
(%o6)                              [B = --]
5
(%i7) A:solve(-M-(L/2)*(q*L)+A*2*L-(q*H));
16
(%o7)                              [A = --]
5
(%i8) /*--<
d,a)--*/ expand(((-1*x)/3)*(1/2)*(q/(2*H))*(x)*(x));
3
x
(%o8)                                - --
12
(%i9) /*--moment na konci <
d,a>
--*/ x1:2*H;
(%o9)                                  4
(%i10) Ma:((-1*x1)/3)*(1/2)*(q/(2*H))*(x1)*(x1);
16
(%o10)                               - --
3
(%i11) /*--<
a,c)--*/ Mb=Ma+A*x;
16   16 x   16
(%o11)                    Mb = [x A - -- = ---- - --]
3     5     3
(%i12) /*--<
b,c)--*/ Mc=-(x/2)*(q*x)+B*x+M;
2          2   34 x
(%o12)               Mc = [x B - x  + 3 = - x  + ---- + 3]
5
(%i13) /*--<
e,b)--*/ Me=M;
(%o13)                              Me = 3
(%i14) ```
Run Example
```/* differentiation of piecewise defined function *//* tell Maxima how to differentiate charfun */gradef(charfun(dummy),0);
(%o1)                           charfun(dummy)
(%i2) /* function definition */itv: [[x<
0],[x>
=0,x<
1], [x>
=1]];
(%o2)                [[x < 0], [x >= 0, x < 1], [x >= 1]]
(%i3)  /* intervals */fi:  [ 1,    x^2+1,      2*x  ];
2
(%o3)                          [1, x  + 1, 2 x]
(%i4)  /* local functions *//* building of global function f and its derivative df */f:0;
(%o4)                                  0
(%i5) for i: 1 thru 3 do f:f+charfun(apply("and",itv[i]))*fi[i];
(%o5)                                done
(%i6) df:diff(f,x);
(%o6)        2 x charfun((x >= 0) and (x < 1)) + 2 charfun(x >= 1)
(%i7) /* display of local functions and derivatives */for i: 1 thru 3 do (  apply(assume,itv[i]),  newline(),  print(itv[i]),  print("f = ",ev(f)),  print("df = ",ev(df)),  apply(forget,itv[i])  );

[x < 0]
f =  1
df =  0

[x >= 0, x < 1]
2
f =  x  + 1
df =  2 x

[x >= 1]
f =  2 x
df =  2
(%o7)                                done
(%i8) plot2d([f,df],[x,-2,3],[y,-1,5],[style,[lines,4,3],[lines,2,2]]);
plot```

Help for Newline