﻿07.10.2012 11:33:23 [->] smath_int(a,b)
07.10.2012 11:33:23 [->] D:\tmp\tmp99CA.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp99CB.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
smath_int(a,b):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:23 [<-] D:\tmp\tmp99CB.tmp:
a*b
07.10.2012 11:33:23 [<-] a*b

07.10.2012 11:33:23 [->] int(a,b)
07.10.2012 11:33:23 [->] D:\tmp\tmp9A49.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9A4A.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
int(a,b):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9A4A.tmp:
a*b
07.10.2012 11:33:24 [<-] a*b

07.10.2012 11:33:24 [->] parse("int(a,b)")
07.10.2012 11:33:24 [->] D:\tmp\tmp9A89.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9A8A.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
parse("int(a,b)"):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9A8A.tmp:
a*b
07.10.2012 11:33:24 [<-] a*b

07.10.2012 11:33:24 [->] convert(parse("int(a,b)");string)
07.10.2012 11:33:24 [->] D:\tmp\tmp9AF8.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9AF9.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
convert(parse("int(a,b)");string):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9AF9.tmp:
on line 19, syntax error, `;` unexpected:
convert(parse("int(a,b)");string):
                         ^
07.10.2012 11:33:24 [->] smath_diff(sin(x);x)
07.10.2012 11:33:24 [->] D:\tmp\tmp9B48.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9B49.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
smath_diff(sin(x);x):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9B49.tmp:
on line 19, syntax error, `;` unexpected:
smath_diff(sin(x);x):
                 ^
07.10.2012 11:33:24 [->] diff(sin(x),x)
07.10.2012 11:33:24 [->] D:\tmp\tmp9B98.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9B99.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
diff(sin(x),x):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9B99.tmp:
cos(x)
07.10.2012 11:33:24 [<-] cos(x)

07.10.2012 11:33:24 [->] parse("diff(sin(x),x)")
07.10.2012 11:33:24 [->] D:\tmp\tmp9BE8.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9BE9.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
parse("diff(sin(x),x)"):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9BE9.tmp:
cos(x)
07.10.2012 11:33:24 [<-] cos(x)

07.10.2012 11:33:24 [->] smath_diff(sin(x);x,2)
07.10.2012 11:33:24 [->] D:\tmp\tmp9C29.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9C2A.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
smath_diff(sin(x);x,2):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9C2A.tmp:
on line 19, syntax error, `;` unexpected:
smath_diff(sin(x);x,2):
                 ^
07.10.2012 11:33:24 [->] smath_diff(smath_diff(x^4,x);x)
07.10.2012 11:33:24 [->] D:\tmp\tmp9C69.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9C6A.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
smath_diff(smath_diff(x^4,x);x):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9C6A.tmp:
on line 19, syntax error, `;` unexpected:
smath_diff(smath_diff(x^4,x);x):
                            ^
07.10.2012 11:33:24 [->] diff(sin(x),x$2)
07.10.2012 11:33:24 [->] D:\tmp\tmp9CA9.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9CAA.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
diff(sin(x),x$2):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9CAA.tmp:
-sin(x)
07.10.2012 11:33:24 [<-] -sin(x)

07.10.2012 11:33:24 [->] diff( x^2 * y^2, x, y )
07.10.2012 11:33:24 [->] D:\tmp\tmp9DE3.tmp:
interface(quiet=true);
with(linalg):
writeto("D:\\tmp\\tmp9DE4.tmp"):
smath_line := proc() local i: for i from 1 to nargs - 2 do args[i]; od: end:
smath_int := proc() if nargs = 2 then int( args[1], args[2] ); elif nargs = 4 then int( args[1], args[2] = args[3] .. args[4] ); fi: end:
smath_diff := proc() if nargs = 2 then diff( args[1], args[2] ); elif nargs = 3 then diff( args[1], args[2] $ args[3] ); fi: end:
smath_sys := proc() { args[i] $ i = 1 .. nargs - 2 }; end:
smath_el := proc() args[1][ args[2] ]; end:
smath_mat := proc() 
local i, j, out: 
out := [ args[j] $ j = 1 .. args[ nargs ] ]: 
for i from 2 to args[ nargs - 1 ] do 
out := out, [ args[j] $ j = ( i - 1 ) * args[ nargs ] + 1 .. ( i - 1 ) * args[ nargs ] + args[ nargs ] ]: 
od: 
 convert( [ out ], array ); 
end:
smath_submatrix := proc() submatrix( args[1], args[2] .. args[3], args[4] .. args[5] ); end:
ans := \
diff( x^2 * y^2, x, y ):
if ( whattype( ans ) = `exprseq` ) then 
    convert( convert( cat( `mat(`, substring( convert( [ans], string ), 2..-2 ), `,`, nops( [ans] ), `,1)` ), string ), symbol );
elif ( whattype( ans ) = `set` ) then 
    convert( convert( cat(`mat(`,substring(convert(map2(op,2,[ans[i]$i=1..nops(ans)]),string),2..-2),`,`,nops(ans),`,1)`), string ), symbol );
elif ( whattype( ans ) = `symbol` ) then 
    convert( convert( eval( ans ), string ), symbol ); 
elif ( whattype( ans ) = `series` ) then 
    convert( convert( ans, polynom) , symbol ); 
elif ( whattype( ans ) = `string` ) then 
    convert( ans, symbol ); 
else 
    convert( convert( ans, string ), symbol ); fi;
quit:

07.10.2012 11:33:24 [<-] D:\tmp\tmp9DE4.tmp:
4*x*y
07.10.2012 11:33:24 [<-] 4*x*y

