Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Mathematica sorted by activePalette user interface
http://community.wolfram.com/groups/-/m/t/1238569
Hi all,
I am using Wolfram Mathematica about 10 years, but the user interface did not improve substantially. I really upset that such innovative company as Wolfram Research did not provide any useful alternative of palettes and docked cells for packages developers.
From my own point of view the palettes have several shortcomings.
1. they overlay each other and notebooks. Users have to waste more time for allocate the palettes than use them. Typically users open several notebooks and the next one notebook opens on its own place of screen without any correlation with the palettes. Finally users decide to close the palettes.
2. the functional of the palettes is scarce. Some package developers prefer to create a small notebook with buttons rather than the palette.
3. the palettes look archaic in comparison with other programs.
----------
For example, a ribbon interface has proved effective. Take a look at MS Word, Matlab, Foxit Reader and so on. Or maybe one can use a tabbed document interface for notebooks.Mikhail Cherkasskii2017-12-04T06:31:52ZWhat's wrong with my input syntax
http://community.wolfram.com/groups/-/m/t/1242466
I was using a delayed rule to substitute a multi-variable derivative, but syntax error encountered in my second input as the following and the attachments. I am a Newbie. Is there anyone who would like to tell me what's wrong and how to fix it? Thanks a lot!
kc1 = -\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(\[Eta][x, t]\)\) - U1 \!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]\(\[Eta][x, t]\)\) + \!\(
\*SubscriptBox[\(\[PartialD]\), \(y\)]\(
\(\*SubscriptBox[\(\[Phi]\), \(1\)]\)[x, y, t]\)\)
temp1 = kc1 /. {(\[Eta]^(a1_, a2_))[x, t] :> \!\(
\*SubscriptBox[\(\[PartialD]\), \({x, a1}, {t, a2}\)]\((
\*OverscriptBox[\(\[Eta]\), \(^\)] Exp[I\ k \((x - ct)\)])\)\)}Leshan Fisher2017-12-10T01:22:36ZFind Intersection Points of Lines using ListPlot
http://community.wolfram.com/groups/-/m/t/1242003
Hello, I am trying to find the intersection points of the two horizontal solid lined with the dashed line. I would like to label each point as for example point a and the second point as b. I would also like to display the value of the intersecting point. Note that I am aiming to find the x value of the intersecting point since I know y. I find it easier with function and using Plot function. I tried with this one but it didn't work.
Thank you
list1 = {0, 1};
list2 = {0, 5};
ListLinePlot[Transpose[{list1, list2}], PlotStyle -> {Thick, Dashed},
PlotRange -> {{0, 5}, {0, 5}},
GridLines -> {None, {{2, {Black, Thick}}, {4, {Green, Thick}}}}]Joeseph A2017-12-08T18:27:16ZHow to refresh or clear cached CloudObjects[]?
http://community.wolfram.com/groups/-/m/t/1242497
[*cross posted on mathematica.stackexchange.com*](https://mathematica.stackexchange.com/q/161661/5478)
Let's create an API which creates one file each time it is called/accessed:
obj = CloudDeploy[
APIFunction[{}
, Put[$RequesterWolframID
, "testFiles/" <> DateString["ISODateTime"] <> ".txt"
] &
]
, "apiTest"
, Permissions -> "Public"
];
CloudEvaluate@CreateDirectory@"testFiles/";
and let's call it:
URLRead[obj]
CloudObjects["testFiles/"]
URLRead[obj]
CloudObjects["testFiles/"]
[![enter image description here][1]][1]
But this is not true, if you visit a browser interface they will be there:
[![enter image description here][2]][2]
In fact, once you visit it, `CloudObjects` cache changes, but only once:
URLRead[obj]
CloudObjects["testFiles/"]
URLRead[obj]
CloudObjects["testFiles/"]
[![enter image description here][3]][3]
So how to make sure `CloudObjects` returns up to date result?
I am fine with an additional step to flush the cache, I just want it to be possible programmatically.
[1]: https://i.stack.imgur.com/jBXTj.png
[2]: https://i.stack.imgur.com/5WLAs.png
[3]: https://i.stack.imgur.com/9zzA7.pngKuba Podkalicki2017-12-10T13:57:17ZJust axes crossing at the origin
http://community.wolfram.com/groups/-/m/t/1242000
Hi, when I plot (3D) a 2 variable scalar function in wolfram Mathemática I always get the function in a box formed by the axis. How could I get rid of that box and just see the surface I´m plotting and the three ortogonal axis crossing at the origin??Victor Gutierrez2017-12-09T11:01:10ZProblem: Light transport through biological tissue
http://community.wolfram.com/groups/-/m/t/1241248
I'm new to Mathematica and while it seems like there should be a way to do this (it is effectively simultaneous equations) I don't know how to input it to Mathematica. I've tried using solve and setting it in a table first but it seems I'm not realizing something or missing something in the documentation about how to play with a few.
The problem represents light passing through tissue. There are two variables in the equation that I need to know, a and b. (if there is a method to input equations/code here can someone point it out to me?)
![enter image description here][1]
I(lam), I0(lam) are measured values. I will know these, they are the intensity of the light coming out and going into the volume at wavelength lambda. M(lam) is the absorption of tissue at the wavelength lamda, this I will also know at all lambdas.
d thickness of the tissue, this is a set value.
a and b are what I would like to know. That term represents the light scattering function for the tissue.
What I would like mathematica to do is tell me how many lambda's, or colors of light, do I have to measure at to find what a and b are, and the equation that gives me a and b.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=KsqisKw.png&userId=20103Alan Riordan2017-12-07T12:03:56ZGet["..."] and RAM
http://community.wolfram.com/groups/-/m/t/1242224
Hello everybody,
I have a little issue with my RAM during a Do loop. Within this do loop I use Get to open a file and thereafter to manipulate it. The memory used is increased by 120 every time the loop runs. This is not much but since I run the loop for several thousand times this small value accumulates. I could pin it down to the Get function and I have created a minimal example (see below) with all RAM tricks that I know of (although I assume that some of them are - in this case - not even necessary). Does anybody know what to do?
Unprotect[Out];
Unprotect[In];
$HistoryLength = 0;
Do[
Get[stringValueOfTheFile];
ClearSystemCache[];
Clear[In];
Clear[Out];
Print[MemoryInUse[]];
, {i, 1, 100}];
Thanks in advance
MarkusMarkus Thürmann2017-12-09T12:27:50ZHow to perform a specific substitution?
http://community.wolfram.com/groups/-/m/t/1240800
I was trying to substitute the "strain" in an expression with "displacement", and hopes to make it as general as possible in any dimensions. The relationship between the two is:
> e(i,j)=(du(i)/dx(j)+du(j)/dx(i))/2
where e(i,j) and u(i) are function of coordinates.
So I first created two lists, coor={x,y,z} and list={#1,#2,#3}, which are special case for 3D. This two lists can be generated by other function so it can be generalized to other dimensions.
Then, I try to substitute e(i,j) in some test expressions, like this one:
D[e[1,2][x, y, z], y]
But I don't know how to perform such a substitution, I have tried:
D[e[1,2][x, y, z], y] /.
e[i_ , j_] :> ((D[Evaluate[u[i] @@ list], coor[[j]]] +
D[Evaluate[u[j] @@ list], coor[[i]]])/2 &)
which doesn't work. But something like:
D[e[1,2][x, y, z], y] /. e[i_ , j_] :> (Evaluate[u[i] @@ list] &)
works fine. This is not what I want, though. I want to substitute the e(i,j) with derivative of u(i) instead. How can I achieve this?
Thanks in advance!
Edit: fix a mistake in the test expression.Ox Clouding2017-12-07T15:22:52ZHow to export a PNG file with ColorMap and RawData?
http://community.wolfram.com/groups/-/m/t/1241941
Some database for machine learning, like VOC dataset, use .PNG file to store information. They store information in 0~255, and display it by using ColorMap.
I import it by using this code:
data=Import[path, "RawData"]
cmap=Import[path, "ColorMap"]
But I cannot find a way to export a PNG file in this format. A .PNG file in this format is included.Zhang Yanbo2017-12-08T14:38:40Z$5K Mathematica Machine
http://community.wolfram.com/groups/-/m/t/1241177
Suppose you had \$5K to spend on a computer that was to be devoted to computation-intensive Mathematica-based explorations. What features would you look for? Is there a particular computer you'd recommend? Extra credit if the recommended machine costs less than \$5K.
Thanks in advance for any insight.Scott Guthery2017-12-07T15:53:33ZDynamic List Plot of Serial Input in Mathematica via Arduino Serial.Print()
http://community.wolfram.com/groups/-/m/t/1241353
Hey everybody,
I'm trying to read the serial input of my USB Port into Mathematica dynamically to create a live ListPlot.
My Arduino Uno sends strings in the format of a pair via Serial.print() to the Serial Port:
![\]\[1\]][1]
(the constant Output "{0,1}\n" is just a test value)
In Mathematica 11 I connect to the Serial Port via DeviceOpen[] and start a Task that reads out the Buffer Data on my Arduino and converts it to a string.
Then I split that string into substrings at any "\n" to get pairs and interpret them in Wolfram Language as a pair.
I add these pairs to a list and then Plot that list dynamically via ListLinePlot[].
![\]\[2\]][2]
My Problem is that Mathematica doesn't read that data correctly and mostly mashes up the data and crashes.
It would be great if you guys could help me out with that!
Thanks!
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=arduino.JPG&userId=1241339
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=8486signaltransfer.JPG&userId=1241339Franz Biermann2017-12-07T18:41:19ZAccelerate computations using GPU?
http://community.wolfram.com/groups/-/m/t/1237212
Hi,
I am trying to accelerate computation using GPU. I started with the textbook example
Needs["CUDALink`"]
ListLinePlot[
Thread[List[CUDAFoldList[Plus, 0, RandomReal[{-1, 1}, 500000]],
CUDAFoldList[Plus, 0, RandomReal[{-1, 1}, 500000]]]]]
This code should use GPU to accelerate the computation.
Then for comparison, I tried to generate similar result with
ListLinePlot[
Thread[List[FoldList[Plus, 0, RandomReal[{-1, 1}, 500000]],
FoldList[Plus, 0, RandomReal[{-1, 1}, 500000]]]]]
In both cases it took about 4 sec. to finish the computation i.e. there was no significant difference in time required to get the result. Why?Rafael Petrosian2017-12-03T01:43:49ZCreate (Header + Main area + Settings pane) notebook layout?
http://community.wolfram.com/groups/-/m/t/1239940
[*cross-posted in mathematica.stackexchange*](https://mathematica.stackexchange.com/q/161203/5478)
The goal is something like in the picture below.
Basic? I dare you to try to implement it in a manageable, scalable and flexible way.
[![enter image description here][1]][1]
## Requirements:
*The goal is a natural experience as this is a standard layout in many places. Keep that in mind if anything is not clear.*
Points 1. and 2. are required. 3. is optional.
1. Behavior:
- 'head' has fixed heigth and notebook's width (minus margins). Would be nice to not have to know the height before.
- notebook is resizeable and when it happens:
- 'main' and 'sett' adapt heights to fill the notebook
- 'sett' width remains the same, only 'main's' width is affected
- 'sett's' width can be changed by inner 'resizeArea' element. (not present above, usually one can dragg the vertical area between 'main' and 'sett' but how it will be done here does not matter.
- needs to work well at least on Mac and Win
- needs to work in a .cdf launched inside FreePlayer
- needs to work smoothly as this is only a template for further app, perfect solution would be completely FrontEnd side but it is enough if panels' contents are not *bothered* too much
2. Style: (*equally important*)
- panel's frames need to be aligned (like above)
- margins/spacings/cellmargins should be consistent. e.g. outer margins should be the same as spaces between panels inside, or whatever user desires.
3. Bonus points for:
- easily adaptable for different window frames e.g.: palette/default.
- max/min notebook size restrictions
- should handle magnification changes gracefully, e.g. panel layout should be left intact or scale notebook size together with it, while contents of panels should scale normally
## Wishes
The ideal answer should provide a general approach for multipanel layout that supports resizing/locking specific values and the final result is aligned nicely with adjustable margins etc.
A good test case would be to handle something like:
Grid[{
{"header", SpanFromLeft, SpanFromLeft},
{"left panel", Pane["main panel", ImageSize -> {300, 300}, Alignment -> {Center, Center}], "rightPanel"},
{"footer", SpanFromLeft}
}, Frame -> All]
### What have you tried?
A lot... and I always ended up with a really project specific solution that needed to sacrifice few features. I lost hope for `Full/Scaled` `ImageSize` spec, in terms of expected response, respecting margins or scalability for multiple panels.
Managing image size via `Dynamic` `ImageSize` for `Panes` quickly escalates to not worth the effort stage. And is not stable, I can cook up and example which works well till you move the window to a secondary screen... despite the fact it only uses WindowSize.
## Here is something to start with:
CreateDocument[
DynamicModule[{headerH = 50, settW = 150}
, Grid[
{ { Panel@ Pane["head", Dynamic@{AbsoluteCurrentValue[{WindowSize, 1}] - 28, headerH}]
, SpanFromLeft
}
, { Panel @ Pane["main", Dynamic[AbsoluteCurrentValue[
WindowSize] - {settW + 15 + 18 + 12, headerH + 15 + 18 + 12}]]
, Panel @ Pane["sett", Dynamic[{settW, AbsoluteCurrentValue[{WindowSize, 2}] - headerH - 15 - 18 - 12}]]
}
}
, Spacings -> {0, 0}
, Alignment -> {Left, Top}
]
, BaseStyle -> {
PanelBoxOptions -> {
FrameMargins -> 0, ImageMargins -> 5, BaseStyle -> FontSize -> 25
}
, PaneBoxOptions -> {FrameMargins -> 0, ImageMargins -> 0
, Alignment -> {Center, Center}
}
}
]
, WindowSize -> 500
, StyleDefinitions -> "Dialog.nb"
, CellMargins -> {{5, 5}, {5, 5}}
, CellFrameMargins -> {{0, 0}, {0, 0}}
, WindowFrameElements -> All
]
## Additional reading:
- https://mathematica.stackexchange.com/q/158835/5478
[1]: https://i.stack.imgur.com/Z3hOe.pngKuba Podkalicki2017-12-05T10:20:01ZMathematica 11.2: No printers to select (Ubuntu)
http://community.wolfram.com/groups/-/m/t/1239408
Me and a colleague of mine cannot print directly to our printers. If we want to print Mathematica offers only "Print to file (PDF)" but not the printers that are available to other applications. We are both running systems based on Ubuntu 16.04 x64 which uses CUPS 2.1 and Qt 5.5.
Any tips how to debug this? Or is it a known problem?Andreas Schamanek2017-12-04T19:52:44ZLooking for dendrogram / hierarchical clustering functionality
http://community.wolfram.com/groups/-/m/t/1239068
I am looking for a package that can do hierarchical clustering and plot publication quality dendrograms.
The following should be supported at a minimum:
- Provide a (symbolic) representation of dendrograms.
- Operations on dendrograms: cut at a certain level (to obtain clusters or sub-dendrogram), split into a given number of clusters (or sub-dendrograms), truncate at certain level, convert to/from the "merges matrix" representation that MATLAB and numerous other packages use.
- Cluster the given data and return a (symbolic) dendrogram (using the specified method)
- Take a precomputed dissimilarity matrix and return a (symbolic) dendrogram
- Visualize a dendrogram with flexible styling options. In particular, specify labels, format labels (rotate them!), highlight groups with custom styles, specify aspect ratio, specify orientation.
- Visualization must use predictable coordinates so that the result can be easily combined with other graphics.
The HierarchicalClustering built-in package comes close, but it's not there yet: cluster highlighting is unusably ugly and there aren't enough operations on symbolic dendrograms. Also, this package is abandoned. It conflicts with builtins and many options are highlighted in red.
There's the builtin Dendrogram, but I find it barely usable in practice. It doesn't have a practically usable symbolic representation of dendrograms, and the styling options are limited. It seems like one step forward and two steps backwards, compared to the package.
Does anyone know of alternatives? MATLAB has much much better dendrogramming functionality. It can even optimize the leaf node ordering.Szabolcs Horvát2017-12-04T13:38:30Z