JLWSUtilityFunctions¶
jwsutils.spad line 1 [edit on github]
Julia Wolfram Symbolic utility functions using the MathLink Julia package.
- fourierMatrix: PositiveInteger -> JLWSMatrix JLWSExpression
fourierMatrix(n)returns thenxnFourier matrix.
- gaussianMatrix: JLWSReal -> JLWSMatrix JLWSReal
gaussianMatrix(r)returns the Gaussian matrix with radiusr. For example: example{gaussianMatrix “2.2”}
- hankelMatrix: PositiveInteger -> JLWSMatrix JLWSInteger
hankelMatrix(n)returns the square Hankel matrix with integer coefficients.
- hilbertMatrix: PositiveInteger -> JLWSMatrix JLWSRational
hilbertMatrix(n)returns the square Hilbert matrix.
- identityMatrix: PositiveInteger -> JLWSMatrix JLWSInteger
identityMatrix(n)returns the identity matrix of sizen.
- jlWSDateString: () -> JLWSExpression
dateString() returns the JLWSExpression string of the local date and time. For example: example{toString dateTime()}
- jlWSDateString: (JLWSExpression, JLWSExpression) -> JLWSExpression
jlWSDateString(expr, form)returns JLWSExpression string of the date from aWSdate object withWSformat form. Fo example: example{jlWSDateString(jWSExpr(“Now”), jWSExpr(“Entity[_”Language_”, _”French::367gk_”]”))}
- jlWSDateString: JLWSExpression -> JLWSExpression
jlWSDateString(expr)returns the JLWSExpression string of the date from aWSdate object. For example: example{jlWSDateString jWSExpr “Tomorrow”}
- jlWSExport: (String, JLWSExpression) -> JLWSExpression
jlWSExport(file.ext, obj)exports the object obj to the file file.ext. The extension ext will determine the saved format. AWSexpression for example can be exported in an image file, it will be saved in theWS‘StandardForm’ whereas in FriCAS it is outputted inWS‘OutputForm':example{x:=jWSExpr(x);jlWSExport(“legendreP.png”, legendreP(7, x))}
- jlWSExportString: (JLWSExpression, JLWSExpression) -> JLWSExpression
jlWSExportString(expr, jWSString(format))returns the string representation ofexprin the format form. Use toString or string to obtain the FriCAS String. For example: example{jWSExpr "Probability[x < 0, x \[Distributed] NormalDistribution[]]"} example{jWSExpr "Probability[x < 1, x \[Distributed] NormalDistribution[]]"} example{string jlWSExportString(%,jWSString “TeX”)}
- jlWSImport: (String, JLWSExpression) -> JLWSExpression
jWSImport(expr, form) imports expr with format form.
- jlWSImport: String -> JLWSExpression
jWSImport(expr) imports expr.
- jlWSInformation: Symbol -> JLWSExpression
jWSInformation(
sym) prints informations about the symbolsym. For example: example{jWSInformation sin}
- jlWSPlot: (JLWSExpression, JLWSExpression) -> JLWSExpression
jlWSPlot(expr, options)is theWSplot function. Since it should be run in a Wolfram notebook or any other supported graphical interfaces, the Wolfram Jupyter “plugin” for example, it is left to the user for testing purposes. The following uses the jlWSExport function: example{x:=jWSExpr(x);opt:=jWSList [x,-5,5]} example{jlWSExport(“sin.png”, jlWSPlot(sin(x),opt))}
- jlWSRange: (JLWSInteger, JLWSInteger) -> JLWSList JLWSInteger
jlWSRange(n,m)returns aWSagg that ranges fromntom.
- jlWSRange: (JLWSInteger, JLWSInteger, JLWSInteger) -> JLWSList JLWSInteger
jlWSRange(n,m,d)returns aWSagg that ranges fromntomwith stepd.
- jlWSRange: JLWSInteger -> JLWSList JLWSInteger
jlWSRange(n)returns aWSagg that ranges from 1 ton. For example: example{jlWSRange(10)@JWSLIST(JWSINT)}
- jWSDateObject: () -> JLWSExpression
jWSDateObject()returns the JLWSExpression object of the local date and time.
- jWSDateObject: (JLWSExpression, JLWSExpression) -> JLWSExpression
jWSDateObject(date,type)returns the JLWSExpression object of thedateandtype, for example “Month”.
- jWSDateObject: JLWSExpression -> JLWSExpression
jWSDateObject(expr)returns the JLWSExpression object of the date fromexpr.
- seedRandom: JLWSInteger -> JLWSExpression
seedRandom(n)reseeds the random number generator withnas seed. Returns the random generator state.
- urand01Complex: (PositiveInteger, PositiveInteger) -> JLWSMatrix JLWSComplex
urand01Complex(rows,cols)returns a JuliaWSmatrix with uniformly distributed random complex elements in the unit square. Convenience function.
- urand01Complex: PositiveInteger -> JLWSVector JLWSComplex
urand01Complex(n)returns a JuliaWSvector with uniformly distributed random complex elements in the unit square. Convenience function.
- urand01Real: (PositiveInteger, PositiveInteger) -> JLWSMatrix JLWSReal
urand01Real(rows,cols)returns a JuliaWSmatrix with uniformly distributed random elements in the range 0..1. Convenience function.
- urand01Real: PositiveInteger -> JLWSVector JLWSReal
urand01Real(n)returns a JuliaWSvector with uniformly distributed random elements in the range 0..1. Convenience function.
- vandermondeMatrix: (JLWSList JLWSExpression, JLWSInteger) -> JLWSMatrix JLWSExpression
vandermondeMatrix(lvars, m)returns a Vandermonde matrix with nodes fromlvarsandmcolumns.
- vandermondeMatrix: JLWSList JLWSExpression -> JLWSMatrix JLWSExpression
vandermondeMatrix(lvars)returns a Vandermonde matrix with nodes fromlvars.
- zeroMatrix: (PositiveInteger, PositiveInteger) -> JLWSMatrix JLWSInteger
zeroMatrix(m, n)returns anm-by-nzero matrix.