49

For the TL;DR crowd The Wolfram Cloud is envisioned as the precursor to the omniscient central computer often depicted in science fiction. It runs on the Wolfram Language (WL) and the Wolfram Knowledgebase (KB). The Programming Cloud lets you write web applications in WL hosted on their infrastructure. This targets commercial developers, with a huge ...


21

You can match formatting between Mathematica figures and LaTeX using a small package I just wrote for using LaTeX-snippets in Mathematica: MaTeX. Here's an example: <<MaTeX` Plot[Sin[z], {z, -2 Pi, 2 Pi}, Frame -> True, FrameStyle -> BlackFrame, FrameLabel -> (MaTeX[#, Magnification -> 20/12] &) /@ {"z", "a(z) = \\sin z"}, ...


16

You are looking for $CloudEvaluation system variable. For example: $CloudEvaluation (* False *) and CloudEvaluate[$CloudEvaluation] (* True *)


12

In general, packages need to be placed in the Applications directory within $UserBaseDirectory. $UserBaseDirectory has different locations on different systems. With standard Mathematica, we can just evaluate $UserBaseDirectory to find this location, e.g. on a Windows system: $UserBaseDirectory (* "C:\\Users\\JoeUser\\AppData\\Roaming\\Mathematica" *) ...


9

In Mathematica, you can work with the function h(z) directly, since Mathematica is symbolic based. In other words, while in Matlab one needs to work for numerical values of coefficients of numerator and denominator and make sure they are in the correct order and so on, in Mathematica, you work with the actual formula or expression itself (transfer function, ...


9

Install version 11.3 of the player, write your script.wl and run wolframscript -f script.wl If you want a GUI check https://github.com/mmatera/iwolfram and run jupyter remotely. On AWS VM run jupyter-notebook --no-browser --port=7000 then on you local machine ssh -NfL localhost:7000:localhost:6001 <IP>)


8

There is something deeply unsatisfying in using Text in 3D graphics, and I think the poster agrees, having requested to "show only certain points". Let me illustrate the issue with an example. Here is a dodecahedron dodecahedron = With[{r5 = Sqrt[5]}, { "faceNormals" -> With[{a = (5 + r5)/10, b = (5 - r5)/10, g = 1/r5}, With[{sa = Sqrt[a], ...


8

This old problem is solved, at least on the wolfram development platform. I guess it's the same for Mathematica Online & Co. Tried on Chrome. Edit (08.02.2019) : It works on Firefox now !


8

Before making a move, test if the new position is a valid position. A valid position is one where Pac-Man does not touch the walls. Mathematica has convenient functions that deal with regions, so we might consider creating a region and then using those functions. Regions can be built using Graphics primitives and then converted into regions with ...


7

Here's a maze for the pacman to operate in (which is taken from here) style = {Background -> GrayLevel[0], BaseStyle -> {Directive[White, EdgeForm[], Opacity[1]]}, VertexShapeFunction -> (Rectangle[#1 + .16, #1 - .16] &), EdgeShapeFunction -> (Rectangle[#1[[1]] + .16, #1[[2]] - .16] &)}; embedding = GraphEmbedding[GridGraph[{...


7

This so called "cloud cdf" (which should probably be abandoned) is clunky and slower than a turtle, extra points for a way to increase fps. Only a faster internet connection can save you as almost everything has to be calculated cloud side. It may happen that what you want to calculate takes longer than the call itself but generally the connection is the ...


7

As mentioned in the comments, here's the answer to how I got the median. I found the value $y$ that minimized $$ f(y) = \int_0^1 \left| 2^x-x-y \right| dx. $$ First, to break up the absolute value in the integrand, I solved for when $2^x = y$: Solve[(2^x - x) == y && 9/10 < y < 1, x, Reals] Then I integrated and found where $f'(y) = 0$: ...


6

Currently APIFunction / CloudDeploy works only with the Public Cloud or an Enterprise Private Cloud. So either you need an EPC on your side or you can use WebMathematica or Mathematica (WebMMA license required anyway). Though WebMMA does not support APIFunctions anyway so you'd have to adapt it to create JSP based api interface. Let's hope someone in WRI ...


6

An alternative data = {{258, 1028, 0}, {217, 747, 0}, {212, 754, 0}, {210, 748, 0}, {191, 654, 0}, {157, 638, 0}}; Show[ Graphics3D[{Blue, PointSize[0.04], Point[data]}], Graphics3D[Text[#[[1]], 1.04 #] & /@ data], Axes -> True, BoxRatios -> 1] Just for fun with points more apart data = {{258, 830, 0}, {217, 747, 0}, {212, 680, 0}, {...


6

You can use region functionality for this. Here is the intersection of the boundary of the cylinders: reg = RegionIntersection[ RegionBoundary @ Cylinder[{{0,0,-2},{0,0,2}}], RegionBoundary @ Cylinder[{{0,-2,0},{0,2,0}}], RegionBoundary @ Cylinder[{{-2,0,0},{2,0,0}}] ]; Here is a visualization of the points of intersection: mesh = ...


6

You can Map the DateObject[] function onto each member of your watchdates list like in Map[DateObject, {{2020, 6, 26}, {2020, 6, 25}}] which yields a list of DateObjects. There is also a shorter symbolic form for Map DateObject /@ {{2020, 6, 26}, {2020, 6, 25}} Is this what you had in mind?


5

The : is used for named patterns, it's not part of any key-value data structure in Mathematica. You will not find it used in the way you propose anywhere in the documentation. You could use either a list of rules: ExportString[{ "key1" -> "value1", "key2" -> "value2" }, "JSON"] "{ "key1": "value1", "key2": "value2" }" Or an Association: ...


5

Installing packages and applications works the same way in Mathematica Online as with the desktop Mathematica. Place the package directory into the following location: FileNameJoin[{$UserBaseDirectory, "Applications"}] Limitations: Some packages don't follow the standard structure, or require additional setup steps. Read the installation instructions ...


5

It's working just fine, f[x_] := 1/2 x + 1/2*CantorStaircase[x] Plot[f[x], {x, 0, 1}]


5

You can show the lines corresponding to intersection of pairs of three surfaces using the option BoundaryStyle. You can get the points where all three surfaces intersect using NSolve (as Michael suggested in comments) and use them with Graphics3D and put the two graphics together using Show: ClearAll[x, y, z] pnts = {x, y, z} /. NSolve[{x^2 + y^2 == 1, x^2 +...


5

First, I think your code should be corrected to; f[w_] := Module[{M, Omega, normM, eigs}, M = Abs[ {{(I*w + 3)/((I*w + 6) (I*w + 1)), 1/(6*I*w + 1)}, {(I*w + 1)/(-w^2 + 11*I*w + 100), 2/(2*I*w + 1)}}]; Omega = DiagonalMatrix[{M[[1, 1]], M[[2, 2]]}]; normM = Dot[Inverse[Omega], M]; eigs = Eigenvectors[normM]; ...


4

ListPointPlot3D supports the wrapper Callout, generating automatic labels for points: ListPointPlot3D[Callout[#, #[[1]]] & /@ TCzvdata]


4

Few fixes to your code: As is, your code specifies the position of labels as 2D coordinates. i.e., the the last 2 coordinates (#[[{2,3}]]) of data points. Since these labels will appear in a 3D graphics, instead of the the last 2 coordinates, you should take all three (#) to specify the position: labels = Text[#[[1]], 1.04 #] & /@ TCzvdata Then, (1) ...


4

From the file browser that is shown on login: Preferences->Evaluation->Output Cell Format->Always Use Bitmaps. For notebooks, suppress as much output as possible, and shorten input cells as much as possible. When you must have a long input cell, manually insert line breaks rather than using the automatic wrapping algorithm. When evaluating entire notebooks, ...


4

here is an idea..crude but may show how to proceed. box = {{50, 200}, {300, 200}, {300, 400}, {50, 400}, {50, 200}}; up[p_] := Module[ {t = p + {0, 10}}, If[ 200 - 15 < t[[2]] < 400 + 15 && 50 < t[[1]] < 300 , 0, 10]] left[p_] := Module[ {t = p - {10, 0}}, If[ 200 < t[[2]] < 400 && 50 - 15 < t[[1]] < 300 + ...


4

MaTeX relies on an external TeX system. Since this cannot be installed in Wolfram Cloud, MaTeX would not be usable either.


4

RegionPlot3D[ x^2 + y^2 < 1 && x^2 + z^2 < 1 && y^2 + z^2 < 1, {x, -1.2, 1.2}, {y, -1.2, 1.2}, {z, -1.2, 1.2}, PlotPoints -> 100, PlotStyle -> Opacity[0.5]]


4

Two of the maximum likelihood estimates are on the boundary which does not bode well for obtaining a reasonable covariance matrix. I think you might need better starting values or use a bootstrap to estimate the covariance matrix. If you had estimates not on the boundaries, then the following would give you an estimate of the covariance matrix: cov = -...


Only top voted, non community-wiki answers of a minimum length are eligible