From 2c8c04629ba87a81c03d36d882f07ee9187c71d5 Mon Sep 17 00:00:00 2001 From: axexlck Date: Sat, 13 Jul 2019 20:49:07 +0700 Subject: [PATCH] Start of a Manipulate() function - based on https://github.com/paulmasson/mathcell - see https://github.com/paulmasson/mathcell/issues/1 - see https://github.com/tranleduy2000/ncalc/issues/67 (cherry picked from commit 9525f04de10496002f716975ca3db9e9221c35dc) --- .../doc/functions/Manipulate.md | 20 +++++++++++++++++++ symja_android_library/doc/index.md | 2 ++ .../src/main/resources/Manipulate.md | 20 +++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 symja_android_library/doc/functions/Manipulate.md create mode 100644 symja_android_library/matheclipse-core/src/main/resources/Manipulate.md diff --git a/symja_android_library/doc/functions/Manipulate.md b/symja_android_library/doc/functions/Manipulate.md new file mode 100644 index 0000000000..99708640bf --- /dev/null +++ b/symja_android_library/doc/functions/Manipulate.md @@ -0,0 +1,20 @@ +## Manipulate + +``` +Manipulate(plot, {x, min, max}) +``` + +> generate a JavaScript control for the expression `plot` which can be manipulated by a range slider `{x, min, max}`. + +**Note**: This feature is not available on all supported platforms. + +### Examples + +In the console apps, this command shows an HTML page with a JavaScript plot control, +where the value of the variable `a` can be manipulated by a slider in the range `[0..10]`. + +``` +>> Manipulate(Plot(Sin(x)*Cos(1 + a*x), {x, 0, 2*Pi}), {a,0,10}) + +``` + \ No newline at end of file diff --git a/symja_android_library/doc/index.md b/symja_android_library/doc/index.md index 816f83e20c..f05a3591a4 100644 --- a/symja_android_library/doc/index.md +++ b/symja_android_library/doc/index.md @@ -530,6 +530,7 @@ for a full description of their possible arguments, options, etc., see their ent * [MachineNumberQ](functions/MachineNumberQ.md) * [MangoldtLambda](functions/MangoldtLambda.md) * [ManhattanDistance](functions/ManhattanDistance.md) +* [Manipulate](functions/Manipulate.md) * [Map](functions/Map.md) * [MapIndexed](functions/MapIndexed.md) * [MapThread](functions/MapThread.md) @@ -803,3 +804,4 @@ for a full description of their possible arguments, options, etc., see their ent * [Xor](functions/Xor.md) * [YuleDissimilarity](functions/YuleDissimilarity.md) * [Zeta](functions/Zeta.md) + diff --git a/symja_android_library/matheclipse-core/src/main/resources/Manipulate.md b/symja_android_library/matheclipse-core/src/main/resources/Manipulate.md new file mode 100644 index 0000000000..99708640bf --- /dev/null +++ b/symja_android_library/matheclipse-core/src/main/resources/Manipulate.md @@ -0,0 +1,20 @@ +## Manipulate + +``` +Manipulate(plot, {x, min, max}) +``` + +> generate a JavaScript control for the expression `plot` which can be manipulated by a range slider `{x, min, max}`. + +**Note**: This feature is not available on all supported platforms. + +### Examples + +In the console apps, this command shows an HTML page with a JavaScript plot control, +where the value of the variable `a` can be manipulated by a slider in the range `[0..10]`. + +``` +>> Manipulate(Plot(Sin(x)*Cos(1 + a*x), {x, 0, 2*Pi}), {a,0,10}) + +``` + \ No newline at end of file