Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Mathematica sorted by activeHow to create a discussion with the library?
https://community.wolfram.com/groups/-/m/t/1593874
Hi there
I'm new to Wolfram Alpha, currently trying to figure out Mathematica. I created an URL library and would now like to create a discussion with that library. Does anyone have any tips on how to get me started? It can be anything really, also if it is only a little related to the question.
Thanks a lot!
Nadine MackayNadine Mackay2019-01-17T23:07:39ZDisplay the line number in a mathematica package?
https://community.wolfram.com/groups/-/m/t/1592936
for example ,
BeginPackage[ "Package`"]
MainFunction::usage =
"MainFunction[ x] computes a simple function."
Begin[ "Private`"]
MainFunction[ x_] :=
Module[ {y},
y = x^2;
y + 1
]
End[]
EndPackage[]
i don't know how to display the line number in a mathematica's .m file. Thank you in advance!zhu xiaoming2019-01-16T09:03:58ZRun python code from a mathematica notebook? (Mac OS)
https://community.wolfram.com/groups/-/m/t/1588303
Hi,
I am trying to run python code in Mathematica. Ideally, I would like to use Mathematica's algebraic facilities to rearrange values in my python functions. However I am having problems starting an external session. I already have python installed. I have been following the documentation
https://reference.wolfram.com/language/workflow/ConfigurePythonForExternalEvaluate.html
![enter image description here][1]
If someone could let me know where I am going wrong, see screenshot, that would be great!
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2019-01-12at11.45.42.png&userId=1587970
Thanks in advanceCharlotte Hawkins2019-01-12T11:47:48ZFactoring out common factors from a list / vector / matrix
https://community.wolfram.com/groups/-/m/t/153277
I'd like a way to pull out common factors from lists, basically a way to reverse the automatic mapping of multiplication across a list. If you type
[mcode]a{x,y,z}[/mcode]
[i]Mathematica[/i] performs the scalar multiplication immediately:
[mcode]{a x, a y, a z}[/mcode]
Similarly,
[mcode]2 IdentityMatrix[3][/mcode]
gives
[mcode]{{2,0,0},{0,2,0},{0,0,2}}[/mcode]
But what if we want to factor back out the 2? Is there a simple way to factor out common factors from lists, or lists of lists? FactorTerms and FactorTermsList do something similar, but only for numerical factors of polynomials.
I'm thinking of turning the list/vector/matrix into a polynomial, then FactorTermsList could be used to identify common factors, and then the list or matrix would have to be reconstructed. Like this:
[mcode]a {x, y, z}
% . Table[Z^(k-1),{k,Length[%]}]
FactorTermsList[%,Z]
Row[{Times @@ Most[%], CoefficientList[Last[%], Z]}][/mcode]
I could wrap that in a function, preferably first generalizing it to handle matrices or arbitrary depth lists of lists. But does anyone have a simpler idea? Thanks!Ken Caviness2013-11-13T22:34:30ZMathematica Package Repository (Paclet Server) Updates
https://community.wolfram.com/groups/-/m/t/1575086
__The server is open for submissions. Please do. [It's easy](https://github.com/paclets/PacletServer/wiki/Contributing#updating-paclet) and [here's a template to work off of](https://github.com/paclets/PacletServer/issues/37).__
---
A while back I posted here about a paclet server, which is to say a repository for Mathematica packages which people can easily install and use
The key, here, is the *easily*. As in single-line installation and integrated with all of Mathematica's standard tools.
[![enter image description here][1]](https://paclets.github.io/PacletServer/)
The server is [hosted on GitHub](https://github.com/paclets) and so everything is open source and anyone can contribute. The deployment is done with GitHub pages as [the cloud is still insufficient](https://community.wolfram.com/groups/-/m/t/1485141) for a number of reasons. There is also a [GitHub Wiki](https://github.com/paclets/PacletServer/wiki) that provides notes on how you can install from the server, upload to the server, etc.
This server has been slowly evolving over the past just-under-a-year as I get a better handle on how to make it easier to add paclets, easier to customize, and nicer in general.
I decided to start this thread to track this progress in a place that Mathematica users would see.
Any suggestions people can provide are greatly appreciated and feel free to communicate with [us on Gitter](https://gitter.im/paclets/community#) for potentially faster discussion.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3804blah.png&userId=1186441b3m2a1 2018-12-20T08:22:16ZSimplifying (Making) Mathematica Documentation
https://community.wolfram.com/groups/-/m/t/1592149
The Documentation Center is nice. The docs are reasonably complete. Stuff is somewhat searchable. It looks really nice. But if you've ever made your own system for generating these kinds of docs you know it's a *lot* of work. The notebooks are unnecessarily complicated. There are cutesy little elements here and there that don't really buy us much.
I wanted something cleaner that would be easier to write, more transparent, and, crucially, more distributable. What I came up with was the [SimpleDocs](https://paclets.github.io/PacletServer/simpledocs.html#main-content) package.
[![enter image description here][1]](https://paclets.github.io/PacletServer/simpledocs.html#main-content)
I'll write a more extended example soon and once the interface has gelled completely, but I want to show off what it can do for us, entirely automatically. To do so I decided to make documentation for my (admittedly a little bloated) package development package [BTools](https://paclets.github.io/PacletServer/btools.html#main-content).
The first thing I did was start a new project from the `SimpleDocs` interface (I'll document that later so it's easy to follow along). The build folder started out much simpler (but I didn't have to do much of anything for it!) but here's what it looks like now:
![enter image description here][2]
I'm making two things in tandem, on the one hand I'm making docs that integrate nicely with the documentation center. Here's an example of what I get when searching for `WebSiteBuild` locally:
![enter image description here][3]
It looks a lot like WRI docs (excluding the fact that I only have autogenerated content and the "Details" are hidden), but there are a few key differences, the big two being that it's much, much simpler internally and it's *version independent*. I package my own stylesheet with the docs, so they can be used cross version without issue and without looking terrible.
All the content in that notebook was generated automatically, though. I didn't write any of it (and there are lots of details and options you don't see here). In fact, I actually generated *all* of the function docs automatically, and now I can go back and more fully document the big ones at my leisure. There is also a tutorial on how this works in the `SimpleDocs` docs.
At the same time as I build the docs notebooks I also built out .md files for each docs page. This is nice because these can then be fed into any number of website generators to make nice docs websites. Here's the website I built for BTools that comes automatically from `SimpleDocs` (again, this will be documented more thoroughly in the coming weeks):
[![enter image description here][4]](https://www.wolframcloud.com/objects/b3m2a1.docs/BTools/)
In this there's an [index of functions](https://www.wolframcloud.com/objects/b3m2a1.docs/BTools/index/functions.html) and if I had guides or tutorials yet there'd be an index for both of those as well.
You can also [search for keywords] (https://www.wolframcloud.com/objects/b3m2a1.docs/BTools/search.html?q=App) which is powered by [tipuesearch](http://www.tipue.com/search/):
[![enter image description here][5]](https://www.wolframcloud.com/objects/b3m2a1.docs/BTools/search.html?q=App)
And there is much, much more I could do with this website and things. At the moment I'm really just scraping the very most basic stuff of what I can automatically do without *any* real effort on my part (except for in development).
Hopefully this has shown that Mathematica docs can be simpler and, once I've finished using this package to document itself, can be simpler to make for anyone. As I said, I'm hoping to get this done and finalized in the next few weeks and once that is through I will write here again (and write a blog post) detailing how you can easily use it for yourself.
In the meantime here's a video of the documentation for BTools being autogenerated:
[![enter image description here][6]](https://www.youtube.com/watch?v=4lTrMwHCjyU)
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5722urg.png&userId=1186441
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=hmm.png&userId=1186441
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=meep.png&userId=1186441
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5444meh.png&userId=1186441
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bleep.png&userId=1186441
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=yt.png&userId=1186441b3m2a1 2019-01-15T02:42:56ZHow to copy and paste stuff in Mathematica Online
https://community.wolfram.com/groups/-/m/t/597085
I have figured out how to copy and paste whole cells, but not any kind of text (from clipboard). When I right-click in a cell (in the web browser), the 'Paste' option is shown, however nothing happens!Tim Nguyen2015-10-25T07:12:24ZMongoDB and Mathematica
https://community.wolfram.com/groups/-/m/t/88662
Hi everyone,
I'm looking for a database link between Mathematica and [b][url=http://en.wikipedia.org/wiki/MongoDB]MongoDB[/url][/b]. Is it possible? I see nothing about this in the DatabaseLink reference. Any ideas?
SteeveSteeve Brechmann2013-08-03T04:30:38ZObtain a numerical solution and Plot this equation?
https://community.wolfram.com/groups/-/m/t/1578585
I found equations of motion for my generalized coordinates which are "Phi" and "l" , but I can not get numeric solutions and plots for them.Could you help me please?
z1 = (-R*W*Sin[\[Theta]] + l'[t]*Sin[\[Phi][t]] +
l*\[Phi]'[t]*Cos[\[Phi][t]] - R*W*Cos[\[Theta]] +
l'[t]*Cos[\[Phi][t]] - l*\[Phi]'[t]*Sin[\[Phi][t]]);
z1^2 // Expand // TrigReduce;
V = -m*g*(-R*Sin[\[Theta]] + l[t]*Cos[\[Phi][t]]) +
1/2*k*(l[t] - l0)^2;
T = 1/2*m*z1^2 // Expand // TrigReduce;
Lagrange = T - V;
eqs = D[D[Lagrange, \[Phi]'[t]], t] - D[Lagrange, \[Phi]] // Expand //
TrigReduce;
eqs2 = D[D[Lagrange, l'[t]], t] - D[Lagrange, l] // Expand //
TrigReduceÖmer Faruk AKYILDIZ2018-12-27T19:27:52ZCreate a GUI for a classifier based on images?
https://community.wolfram.com/groups/-/m/t/1586343
I developed the following code which is suitable for cloud deployment. However, in order to avoid the problems of the cloud, I would like to create an user interface that runs in a Mathematica notebook. How could I do that?
My code is as follows:
dobermann =
{-> "Dobermann", -> "Dobermann", -> "Dobermann", -> "Dobermann", -> "Dobermann"};
rottweiler =
{-> "Rottweiler", -> "Rottweiler", -> "Rottweiler", -> "Rottweiler", -> "Rottweiler"};
alano =
{-> "Alano", -> "Alano", -> "Alano", -> "Alano", -> "Alano"};
labrador =
{-> "Labrador", -> "Labrador", -> "Labrador", -> "Labrador", -> "Labrador" };
husky =
{-> "Husky", -> "Husky", -> "Husky", -> "Husky", -> "Husky" };
dogTypeSet = {dobermann, rottweiler, alano, labrador, husky};
class = Classify[Flatten[{dobermann, rottweiler, alano, labrador, husky}]];
CloudDeploy[
FormPage[
"image" -> "Image",
Column[{#image, "This is a " <> ToString[class[#image]]}] &,
AppearanceRules ->
<|"Title" -> "What dog is that?",
"Description" -> "Enter an image of a dog and I'll tell you what it is",
"SubmitLabel" -> "Classify"|>, PageTheme -> "Blue"],
Permissions -> "Public"]
The images must be inserted before the arrows. I removed them so as not to have problems in transcribing the code.Pasquale Rossi2019-01-10T08:06:17ZWhat is the status of the 64 bit front end development?
https://community.wolfram.com/groups/-/m/t/1586602
I may have missed the notice, but the latest information I have seen is that High Sierra is the latest Mac OS that Wolfram officially supports. I installed Mojave on my laptop and it seems to work, although I do get occasional notifications that Mathematica is not optimized (rather than the one-time notification that occurred with High Sierra).
The first question I have is whether Mathematica under Mojave is supported by Wolfram. The next question is when will a 64 bit front end be released. I am concerned that when the next version of the Mac OS is released there is no guarantee that any 32 bit code will have a chance of working.Mike Luntz2019-01-10T14:35:36Z