>
|
use Maplets in
use Elements in
maplet := Maplet(
Window( 'title' = "Hilbert Matrix", [
["Dimension: ", TextField['TB1']( "10" )],
["Target format: ", DropDownBox['DDB1']( ["Matlab",
"MatrixMarket", "delimited"] )],
["File name:", TextField['TB2']( "hilmat" )],
[
Button( "OK", Shutdown(['TB1', 'DDB1', 'TB2']) ),
Button( "Cancel", Shutdown() )
]
] )
);
end use;
result := Display( maplet );
end use:
if result <> [] and result[3] <> "" then
try
n := parse( result[1] );
catch:
end try;
if type( n, 'integer' ) then
ExportMatrix(
result[3],
LinearAlgebra:-HilbertMatrix( n, outputoptions=[
'datatype'=float[8]] ),
'target' = convert( result[2], 'symbol' )
);
end if;
end if:
|