Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing questions from all groups sorted by newest repliesHow to make a 3D scatter plot using multiple data sets imported from excel?
http://community.wolfram.com/groups/-/m/t/1290300
I have multiple data sets in several excel (.xlsx) files that I want to visualize as a single 3D scatter plot. I can import each data set individually and plot them using the ListPointPlot3D command:
data3 = Import["/Users/hewittwm/Documents/Mathematica/data3.xlsx"]
ListPointPlot3D[data3, BoxRatios -> 1, PlotRange -> {{0, 3000}, {0, 1}, {0, 1}}, AxesLabel -> {"Volume", "Buriedness", "Hydrophobicity"}]
data4 = Import["/Users/hewittwm/Documents/Mathematica/data4.xlsx"]
ListPointPlot3D[data4, BoxRatios -> 1, PlotRange -> {{0, 3000}, {0, 1}, {0, 1}}, AxesLabel -> {"Volume", "Buriedness", "Hydrophobicity"}]
But when I try to plot both together:
ListPointPlot3D[{data3,data4}]
I get an error saying "must be a valid array or a list of valid arrays"
How do I resolve this? Is there a better way to go about plotting my data points in 3D? Any advice would be greatly appreciated as I am fairly new to Mathematica and the Wolfram Language.William Hewitt2018-02-22T21:08:15ZCUDAFunctionLoad fails to load a function from cubin, ptx or library file
http://community.wolfram.com/groups/-/m/t/1289656
According to the documentation of `CUDAFunctionLoad` it should be easy to specify a compiled file (cubin, ptx, dll should all work) as the source for loading a `CUDAFunction`. Unfortunately it does not for me. Compiling from source works fine, but as soon as I try to precompile and load the `CUDAFunction` from the compiled file (I tried cubin, ptx and a dll) things fail.
Here is a very simple example that does not work for me, no matter what combination I try:
Let's create a cubin file first from a very simple CUDA kernel:
code = "
__global__ void addTwo(int * in, int * out, int length) {
int index = threadIdx.x + blockIdx.x*blockDim.x;
if (index < length)
out[index] = in[index] + 2;
}";
CreateExecutable[code, "test", "Compiler" -> NVCCCompiler,
"CreateCUBIN" -> True, "TargetDirectory" -> NotebookDirectory[]]
This successfully creates test.cubin in the `NotebookDirectory[]`.
Unfortunately loading the function addTwo fails:
cudaFun =
CUDAFunctionLoad[File[NotebookDirectory[] <> "test.cubin"],
"addTwo", {{_Integer, _, "Input"}, {_Integer, _,
"Output"}, _Integer}, 256, "ShellCommandFunction" :> Print,
"ShellOutputFunction" -> Print];
> CUDAFunctionLoad::invsrc: CUDALink encountered invalid source input.
> The source input must be either a string containing the program, or a
> list of one element indicating the file containing the program.
The input file should be valid, but maybe I am missing something obvious here. Interestingly enough going the same route creating a .ptx file yields a different error:
CreateExecutable[code, "test", "Compiler" -> NVCCCompiler,
"CreatePTX" -> True, "TargetDirectory" -> NotebookDirectory[]]
cudaFun =
CUDAFunctionLoad[File[NotebookDirectory[] <> "test.ptx"],
"addTwo", {{_Integer, _, "Input"}, {_Integer, _,
"Output"}, _Integer}, 256, "ShellCommandFunction" :> Print,
"ShellOutputFunction" -> Print];
> CUDAFunctionLoad::notfnd: CUDALink resource not found.
In addition to cubin and ptx files I tried compiling a library file using `CreateLibrary`, which was created fine but also could not be loaded using `CUDAFunctionLoad`.
Any ideas on what is going wrong here and how I can actually load a CUDAFunction from a compiled file?
Additional Information:<br>
I am running Mathematica 11.2 on Windows 10.<br>
CUDA is setup properly and I can do all CUDA computations in MathematicaWizard2018-02-22T02:06:27ZAvoid DatabaseExamplesBuild to fail?
http://community.wolfram.com/groups/-/m/t/1289450
In Mathematica 11.2.0.0 (under macOS HighSierra 10.13.3), I'm trying to use `DatabaseLink` with the supplied example databases. Here's what I've done:
<< DatabaseLink`DatabaseExamples`
DatabaseExamplesBuild[]
> JDBC::error: invalid authorization specification - not found: SA
> $Failed[1, DatabaseLink`DatabaseExamples`Package`RestoreException["publisher"]]
What's wrong and how should it be fixed?Murray Eisenberg2018-02-21T21:27:38ZSolve Pdes in cylinder coordinates? ( Infinity error due to 1/r )
http://community.wolfram.com/groups/-/m/t/1288801
I have been trying to solve the following equations(Eq.1) in cylinder coordinates. And I want my solution domain is r>=0. Because of the 1/r and 1/r^2 terms in Eq.1, I ran into the Infinity error problem when using NDSolve . Then I rewrote my equations by multiplying them by r or r^2 to remove 1/r and 1/r^2 terms and got Eq.2, but I still met the Infinite problem using NDSolve. So is it possible to get solutions if my solution domain is r>=0. I believe this solution is physically real but I do not know how to get it using NDSolve. Any help would be great.
![enter image description here][1]
![enter image description here][2]
And my codes for Eq.2 are:
TMax = 1.615; S = 1/Pi^2/2; rMin = 0; rMax = 2;
{usol, hsol} =
NDSolveValue[{D[u[t, r], t]*r^2 == -D[u[t, r], r]*u[t, r]*r^2 +
3*1/h[t, r]^4*D[h[t, r], r]*r^2 +
3*S*(D[h[t, r], r, r, r]*r^2 - D[h[t, r], r] +
r*D[h[t, r], r, r]) +
4/h[t, r]*(h[t, r]*r^2*D[u[t, r], r, r] +
D[u[t, r], r]*D[h[t, r], r]*r^2 + h[t, r]*r*D[u[t, r], r] -
h[t, r]*u[t, r] - u[t, r]*r/2*D[h[t, r], r]),
D[h[t, r], t]*r == -h[t, r]*u[t, r] - u[t, r]*r*D[h[t, r], r] -
h[t, r]*r*D[u[t, r], r], u[0, r] == 0,
h[0, r] == 1 - 0.2*Cos[Pi*r], h[t, rMin] == h[t, rMax]}, {u,
h}, {t, 0, TMax}, {r, rMin, rMax}, PrecisionGoal -> Infinity,
AccuracyGoal -> 10, MaxSteps -> 10^6,
Method -> {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid",
"MaxPoints" -> 5000, "MinPoints" -> 5000,
"DifferenceOrder" -> 4}}]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20180220110517.jpg&userId=1266560
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20180220104746.jpg&userId=1266560Yixin Zhang2018-02-20T11:03:08ZSet Image acquisition ($ImagingDevice) on Unix?
http://community.wolfram.com/groups/-/m/t/1288310
When I do<br>
$ImagingDevice
I get the following message
Message[$ImagingDevice::notsupported, "Unix"]
What can I do to fix it?Santiago Hincapie2018-02-19T23:04:51ZUpload file to Wolfram Cloud?
http://community.wolfram.com/groups/-/m/t/1288289
I'm logged into my cloud account but I can't seem to save/open anything from MathematicaOnline's folders... Any suggestions?
![enter image description here][2]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-02-19at4.42.44PM.png&userId=900170
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Untitled.jpeg&userId=900170Mike Sollami2018-02-19T22:01:28ZFunctions or packages to implement Belief propagation?
http://community.wolfram.com/groups/-/m/t/1288141
I look for an efficient way to implement a [Belief Propagation][1] (more specific, parallel implementation). Does anyone know about any useful functions or packages?
[1]: https://en.wikipedia.org/wiki/Belief_propagationKiril Dan2018-02-19T17:50:59ZUnderstand algorithm for AudioLocalMeasurements, & ModifiedKullbackLeibler?
http://community.wolfram.com/groups/-/m/t/1287765
I recently was doing some experiments with AudioLocalMeasurements for some music analysis tasks, and in the process of trying to explain what I did to someone I realized that I didn't know what the ModifiedKullbackLeibler measurement is computing. Specifically, what is modified versus regular KL divergence, and what is done to the frequency spectra of the windows being compared? Without understanding what the algorithm is actually reporting, it's hard to make any interpretation of the results that it computes.Matthew Sottile2018-02-19T07:23:15ZsendPhoto using TelegramBot (exporting to multy-part form data format)
http://community.wolfram.com/groups/-/m/t/1285299
I created a telegram-bot and I execute requests to the telegram bot API from Mathematica. You can find full API documentation [here][1].
I have a problem with sending image from computer or RAM. I try send photo using this code:
```
$token = <token> (* string - bot token from @BotFather *)
$chat = <chat_id> (* string - allowed chat id *)
$api = StringTemplate["https://api.telegram.org/bot`token`"][<|"token" -> $token|>]
$url = URLBuild[{$api, "sendPhoto"}]
dataString = ExportString[Plot[Sin[x], {x, 1, 4}, ImageSize->Tiny], "JPEG"];
body = StringTemplate[
"
--WMAsrf456BGe4h
Content-Disposition: form-data; name=\"chat_id\"
`chat_id`
--WMAsrf456BGe4h
Content-Disposition: form-data; name=\"photo\";filename=\"photo.jpg\"
Content-Type: image/jpeg
`data`
--WMAsrf456BGe4h"
]; (* https://en.wikipedia.org/wiki/MIME#Multipart_messages *)
request[] :=
HTTPRequest[$url,
<|
Method -> "POST",
"ContentType" -> "multipart/form-data; boundary=WMAsrf456BGe4h",
"Headers" -> {
"Connection" -> "keep-alive"
},
"Body" -> body[<|"chat_id" -> $chat, "data" -> dataString|>]
|>
]
response = URLRead[request[]]
(* Out[..] := HTTPResponse[<<504>>] *)
response["Body"]
(* Out[..] := "<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor=\"white\">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>" *)
```
how to send an image?
[1]: https://core.telegram.org/bots/apiKirill Belov2018-02-15T07:47:13Z