Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Wolfram Sciencesearch.php?s=fe9d502914d96ae580a896013a31c1dd sorted by activeCouple singular integral- Chebyshev polynomial
https://community.wolfram.com/groups/-/m/t/1569039
G'day
I have a couple of singular integral equations. the equation has been solved numerically in (article)
using Chebyshev polynomials.
I am suspicious about the solution in the reference, as after checking for a few examples it seems does not work...
The solution of the equations is for evaluating the stress intensity factor in bonded plates with crack (Fracture Mechanics-Aerospace Engineering).
Probably there is notation mistakes in the solution or something similar.
The only way to check is to resolve these equations and see if I am getting the same presented solution in the reference.
I think I saw that there is a direct function of Chebyshev polynomial in Wolfram. However, I am not sure if that what I need to use
As I am very new here, any guidance and suggestions to solve these equations (Eq.23 in the attached) numerically. would be appreciatedWazy sky2018-12-11T04:33:34ZAn equivalent to Matlab "linspace" function
https://community.wolfram.com/groups/-/m/t/1568743
Hello
Matlab has a built in function called `linspace`, that, according to the documentation, generates a linearly spaced vector, but "gives direct control over the number of points and always includes the endpoints".
Mathematica doesn't work with vectors, rather with lists, but I wish to generate a list of numbers that start from `x1` and ends at `x2`, with `n` points in between (such that the spacing between the points is (x2-x1)/(n-1).
I couldn't find help with `Table`. `Table` generates a list of numbers with a starting point and an end point, with an extra option for the intervals, but I want to have `n` numbers in between.
Is there any work around?Ehud Behar2018-12-10T17:48:09ZAdjusting axis labels font size, but not tick marker size
https://community.wolfram.com/groups/-/m/t/1567112
Hi all! I am looking to change the size of my axis labels to make them slightly larger. The issue I am running into is that when I set the axis labels font size, it also changes the tick marker number font size. I have a line setting the tick marker size to what I want, it seems to be overridden though. Also, I am not sure why but despite all having the same font sizes set for each figure, the frame tick numbers are different sizes between figures. Not really sure what is going on, any help is appreciated. Here is the relevant code.
padding = {{60, 60}, {60, 10}};
a1 = ListLinePlot[Thread[{#, {##2}}] & @@@ gkinA // Transpose,
Frame -> True,
FrameLabel -> {{"Fractional Coverage", None}, {"Time", None}},
PlotLabel -> "Coverage Evolution",
ImagePadding -> padding,
PlotStyle -> {{Red, Thickness[0.01]}, {Blue,
Thickness[0.01]}, {Black, Thickness[0.01]}},
LabelStyle -> {FontFamily -> "Arial", FontSize -> 18, Black},
GridLines -> Automatic,
FrameTicksStyle -> Directive[Black, 15],
PlotRange -> {{0, 26000}, {0, 1}},
ImageSize -> {500, 500}];
b1 = ListLinePlot[Thread[{#, {##2}}] & @@@ gkinB // Transpose,
Frame -> True,
FrameLabel -> {{None, None}, {"Time", None}},
PlotLabel -> "Coverage Evolution",
ImagePadding -> padding,
PlotStyle -> {{Red, Thickness[0.01]}, {Blue,
Thickness[0.01]}, {Black, Thickness[0.01]}},
LabelStyle -> {FontFamily -> "Arial", FontSize -> 18, Black},
FrameTicksStyle -> {{Directive[FontOpacity -> 0, FontSize -> 0],
Directive[FontOpacity -> 0, FontSize -> 0]}, {Automatic,
Directive[FontOpacity -> 0, FontSize -> 0]}},
FrameTicksStyle -> Directive[Black, 15],
PlotRange -> {{0, 38000}, {0, 1}},
GridLines -> Automatic,
FrameTicks -> {{Automatic,
Automatic}, {{0, 5000, 15000, 25000, 35000}, Automatic}},
ImageSize -> {500, 500}];
GraphicsGrid[{{a1, b1}, {a2, b2}, {a3, b3}}, Spacings -> {-75, -170}]Sean Morgan2018-12-06T15:56:46ZVigenere Cryptosystem
https://community.wolfram.com/groups/-/m/t/1568246
Does anyone know how to create a Vigenere Cryptosystem on Mathematica? I'm attempting to encrypt and decrypt a message. I haven't found any tutorials.D William2018-12-08T19:57:05ZWhy does the program result in error messages Set::write and General::stop?
https://community.wolfram.com/groups/-/m/t/1568580
Can someone explain to me the error messages of the following program? I'm new to Mathematica and can't figure out what am I assigning wrong. How can I fix it? I'm getting the errors "Set::write: Tag Rational in (1/5)[0] is Protected" and "General::stop: Further output of Set::write will be suppressed during this calculation". Probably there is a problem with the assignment Do[delta[k] = x[k + 1] - x[k], {k, 0, n - 1}]; but I can't find it. Thanks in advance for the help!S. Werner2018-12-10T13:35:20Z[GIF] Bounce ((3,1)+(1,3) vibration mode of a square membrane)
https://community.wolfram.com/groups/-/m/t/1567736
![(3,1)+(1,3) vibration mode of square membrane][1]
**Bounce**
The vibration modes of a rectangular membrane of width $L_x$ and length $L_y$ are
$\Psi_{mn}(x,y) = \sin\left(\frac{\pi m}{L_x}x\right) \sin\left(\frac{\pi n}{L_y}y\right);$
in other words, each direction just consists of standing waves with wavelength given by the reciprocal of some integer multiple of the length of the side of the membrane.
Ψ[m_, n_, {x_, y_}] := Sin[m π x] Sin[n π y];
In general these modes all have different frequencies, but when, e.g., one side length is a multiple of the other, it is possible for two different modes to have the same frequency, and then linear combinations of modes of the same frequency will also be vibration modes of the membrane. See [Dan Russell's demo][2] for more.
This animation shows the combination of the $(1,3)$ mode and the $(3,1)$ mode of the square where each factor is equally weighted. (Compare previous vibration mode animations [_Square Up_][3], [_Drumbeat_][4], and [_Things That Go Bump in the Night_][5]).
Here's the code:
DynamicModule[{n = 25, a = 1.2, dots,
cols = RGBColor /@ {"#0098d8", "#f54123", "#0b3536"}},
Manipulate[
dots = Table[
{2 π (x - 1)/n, 2 π (y - 1)/n,
Cos[θ] (1/Sqrt[2] Ψ[3, 1, {(x - 1)/n, (y - 1)/n}] + 1/Sqrt[2] Ψ[1, 3, {(x - 1)/n, (y - 1)/n}])},
{x, 1, n + 1}, {y, 1, n + 1}];
Graphics3D[
{AbsoluteThickness[2],
Table[
Line[#[[i]], VertexColors -> (Blend[cols[[;; -2]], (# + a)/(2 a)] & /@ #[[i, ;; , 3]])],
{i, Length[#]}] & /@ {dots, Transpose[dots]}},
Boxed -> False, PlotRange -> {{0, 2 π}, {0, 2 π}, {-2, 2}},
ImageSize -> 540, ViewPoint -> {2, 0, 1/2},
SphericalRegion -> True, Background -> cols[[-1]]],
{θ, 0, 2 π}]
]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=rolling34Lr.gif&userId=610054
[2]: https://www.acs.psu.edu/drussell/Demos/rect-membrane/rect-mem.html
[3]: https://community.wolfram.com/groups/-/m/t/896369
[4]: https://community.wolfram.com/groups/-/m/t/899038
[5]: https://community.wolfram.com/groups/-/m/t/985795Clayton Shonkwiler2018-12-07T21:38:05ZRaspberryPi 3 Model B+ and I2C issue
https://community.wolfram.com/groups/-/m/t/1431827
Hello,
I have been struggling with SenseHAT and Mathematica. First Mathematica was not able to find SenseHAT at all even than I followed I2C setup guide but eventually after adding following line to /boot/config.txt I was able to make some progress:
dtparam=i2c0=on
After that there is two i2c buses in the system:
pi@raspberrypi:~ $ ls -l /dev/i2c-*
crw-rw---- 1 root i2c 89, 0 Aug 30 21:34 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 Aug 30 21:34 /dev/i2c-1
However Mathematica reports variety I2C errors:
pi@raspberrypi:~ $ wolfram
Wolfram Language 11.3.0 Engine for Linux ARM (32-bit)
Copyright 1988-2018 Wolfram Research, Inc.
In[1]:= sensehat = DeviceOpen["SenseHAT"]
Out[1]= DeviceObject[{SenseHAT, 1}]
In[2]:= DeviceRead[sensehat, "Temperature"]
DeviceWrite::unknownMRAAWriteError: An unknown error occured writing to the I2C bus.
DeviceWrite::unknownMRAAWriteError: An unknown error occured writing to the I2C bus.
DeviceWrite::unknownMRAAWriteError: An unknown error occured writing to the I2C bus.
General::stop: Further output of DeviceWrite::unknownMRAAWriteError
will be suppressed during this calculation.
Out[2]= 42.4979 degrees Celsius
when investigating further linux journal it seems that libmraa (presumably of Mathematica MRAALink) tries to use I2C-0 bus:
Aug 30 21:38:05 raspberrypi libmraa[1037]: libmraa version v1.6.1 initialised by user 'pi' with EUID 100
Aug 30 21:38:05 raspberrypi libmraa[1037]: libmraa initialised for platform 'Raspberry Pi Model B Rev 1'
Aug 30 21:38:05 raspberrypi libmraa[1037]: i2c_init: Selected bus 0
Aug 30 21:38:22 raspberrypi libmraa[1037]: i2c0: write: Access error: Remote I/O error
Aug 30 21:38:22 raspberrypi libmraa[1037]: i2c0: write: Access error: Remote I/O error
However as far as I can tell the SenseHAT is in i2c bus 1. So I removed "dtparam=i2c0=on" and after reboot added symbolic link for i2c-0 from i2c-1:
pi@raspberrypi:/ $ ls -la /dev/i2c-*
lrwxrwxrwx 1 root root 10 Aug 30 21:43 /dev/i2c-0 -> /dev/i2c-1
crw-rw---- 1 root i2c 89, 1 Aug 30 21:41 /dev/i2c-1
and tried again SenseHAT in Mathematica which seems to work now:
pi@raspberrypi:/ $ wolfram
Wolfram Language 11.3.0 Engine for Linux ARM (32-bit)
Copyright 1988-2018 Wolfram Research, Inc.
In[1]:= sensehat = DeviceOpen["SenseHAT"]
Out[1]= DeviceObject[{SenseHAT, 1}]
In[2]:= DeviceRead[sensehat, "Temperature"]
Out[2]= 38.9896 degrees Celsius
So for me it looks that Matkematica uses wrong I2C bus at least in this particular model:
pi@raspberrypi:/dev $ cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.3
pi@raspberrypi:/ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
I think this should be fixed to Mathematica.Teemu Ahola2018-08-30T18:49:14ZWhere can I find documentation on "StyleHints"?
https://community.wolfram.com/groups/-/m/t/1557788
I've done some searching but I can't seem to find any documentation on "StyleHints". I'm using 11.3 on OS X High Sierra and there doesn't seem to be any built-in documentation. A search on this site also didn't turn up much. Is there any formal documentation? Has anyone posted a tutorial somewhere?
Thanks.Andrew2018-11-22T22:15:46ZFit data with a proper Gaussian using NonlinearModelFit?
https://community.wolfram.com/groups/-/m/t/1568328
Hi everybody. I need help!
I'm trying to fit my data set with a Gaussian, but I was able to get a curve that doesn't look like a Gaussian. I'm noob with this, so you guys please help me!
At least I wanna have a hint about how can I handle the parameters to get the best as possible fit. This is what I already have done...
data = Import[
"/home/leblanc/Documents/Astro/Paper/a.csv", "table", FieldSeparators -> " "];
nlm = NonlinearModelFit[data, a Exp[-(x - b)^2/2 c^2], {a, b, c}, x];
nlm["AdjustedRSquared"];
nlm[x];
nlm["ParameterTable"];
dataplot = ListPlot[data];
fitplot = Plot[nlm[x], {x, 1.8, 2.00}];
Show[dataplot, fitplot];Christian Leblanc2018-12-09T05:19:09ZSearching for collaborators about image tiling
https://community.wolfram.com/groups/-/m/t/1568407
Symmetry and symmetry breaking is a central topic of my artistic work. I am fascinated by image tiling as a source of symmetry but until recently the situation was not different than 25+ years ago when my interest started with the Photoshop plugin Terrazzo: There are thousands of known euclidean tilings ([Tiling Database][1]) but only the basic 17 wallpapergroups were used for image tiling.
I am working on a general approach to change this: Every image tiling or image pattern in general can be made by one or more proto-tiles (rectangle or masked polygon shaped images with transparency) and a list of clone-, rotate-, mirror- (flip,flop), and translate-commands collected in a CRMT command list. A CRMT interpreter would take such a list and a set of proto-tiles and generate an image tiling, ornament or pattern by step-by-step processing the commands.
For example the following CRMT command list is coding the 14 processing steps to generate a p3m1 tile from a given equilateral triangle proto-tile image (see my p3m1-examples using this CRMT approach on [p3m1-CRMT album 1][2] and [p3m1-CRMT album 2][3]):
C0, x0, y0, C0, Fo, R-60, x-1/2*t_w, y0, C0, Fo, R60, x1/2*t_w, y0, C0, Fo, R-60, Fi, xt_w, y0, C0, Fi, x3/2*t_w, y0, C0, Fo, R60, Fi, x2*t_w, y0, C0, Fo, R-60, x5/2*t_w, y0, C0, Fi, x0, yt_h, C0, Fo, R-60, Fi, x-1/2*t_w, yt_h, C0, Fo, R60, Fi, x1/2*t_w, yt_h, C0, Fo, R-60, xt_w, yt_h, C0, x3/2*t_w, yt_h, C0, Fo, R60, x2*t_w, yt_h, C0, Fo, R-60, Fi, x5/2*t_w, yt_h
The operation sequence for one proto-tile processing like "C0, Fo, R-60, x-1/2*t_w, y0" is interpreted as: clone the first (starting with 0) element in the proto-tile list, flop it, rotate it 60 degrees counterclockwise (+ trim), make a translation in x-direction with floor(-1/2*t_w) where t_w is the width of the equilateral triangle, make a translation in y-direction with 0 and then compose the proto-tile over the tile background which is in the p3m1 case a black image with an (2*t_h, 3*t_w) area were t_h = 1/2*sqrt(3)*t_w.
![p3m1 CRMT example from my art][4]
Additionally the CRMT interpreter also needs a list with coordinates for one or more masks that must be draw because the masked proto-tiles must come somewhere; in the p3m1 case the x and y coordinates of the triangle are: x_coord = [0 t_w t_w/2]; y_coord = [0 0 t_h];
Such an approach is not fast but universal and because of the no-overlap condition of tilings the processing steps for one proto-tile are independent and therefore the 14 steps in the p3m1 case could be made in parallel. And there is always the option to optimize some specific tiling by using some knowledge about its structure. In the p3m1 case run-time can be saved by the knowledge that the lower half is a flipped version of the upper half.
To further develop the CRMT approach I am searching for
**1) programmer implementing CRMT interpreter in different environments like Mathematica**
Programming a CRMT interpreter seems neither a difficult nor a too costly task because the core is some string processing combined with calling some image processing functions. And if the used environment has RGBA abilities and boundary methods like "-virtual-pixel mirror" (ImageMagick function) or simple inpainting functions it makes everything much easier because composing polygon shaped images results in artifacts at the edges if non-90 degree polygon-masks were used.
There is active development in other environments underway: I have programmed a batch processing prototype in Matlab and a first prototype for a CRMT filter in G'MIC was published this week ([G'MIC][5], [discussion about the G'MIC CRMT filter][6]).
**2) people writing their own CRMT lists**
Every high school kid with basic trigonometry knowledge can determine the angles, lengths and distances in a given tiling image from the Tiling Database to write a CRMT-list without any knowledge of a specific programming language or image processing, so there is potential a huge community. It is only a question of persistence to code even the most complex periodic tilings like [Islamic patterns][7].
Math teachers are often looking for something motivational. Real world applications and aesthetics in math (see [Bridges conferences][8]) are mostly the areas they come up with and I think that image tiling is an excellent example for the later. Writing a CRMT command list for a tiling would be a nice assignment if intermediate states could immediately be checked for feedback with a CRMT interpreter. And there is the general question about meaning and sustainability of assignments: Making the first command list for a tile is a meaningful and sustainable activity because such a list can generate aesthetic images even decades later independent of whatever programming languages will be used then for a CRMT interpreter.
**Future perspectives**
Using trigonometry to extract information from given tilings, ornaments and patterns will restrict the audience mostly to academia and math enthusiasts. A much wider audience would be reached with a GUI based system where proto-tiles are placed with drag&drop. Combined with an interaction log that records the relevant actions and a CRMT optimizer that combines all the actions related to one proto-tile to one command set a CRMT-list for a pattern should be reconstructible. I am thinking about modifying this [Mathematica demonstration][9]. If in a long-term perspective AI-agents with a learned sense for symmetry and aesthetic can play such a system an endless stream of interesting pattern descriptions would be accessible that can directly be used in every environment with a CRMT interpreter.
The CRMT approach is also extendible in many directions for example by simply adding a new command type like "S" for scaling which makes image types like euclidean [Fractal Tiling][10], Iterated Function Systems and [orbit trapping][11] accessible.
[1]: http://www.tilingsearch.org/
[2]: https://www.flickr.com/photos/gbachelier/albums/72157673790864417
[3]: https://www.flickr.com/photos/gbachelier/albums/72157674278683877
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=32230404598_168f19be34_k.jpg&userId=753358
[5]: https://gmic.eu
[6]: https://discuss.pixls.us/t/collaborators-for-image-tiling/9966/24
[7]: https://patterninislamicart.com/drawings-diagrams-analyses/1/elements-art-arabe
[8]: http://bridgesmathart.org/
[9]: http://demonstrations.wolfram.com/TilingConstructorTileDraggingVariant/
[10]: https://www.mathartfun.com/encyclopedia/encyclopedia.html
[11]: http://2008.sub.blue/projects/fractal_explorer.htmlGuenter Bachelier2018-12-09T13:46:51ZFind all roots of the following equation?
https://community.wolfram.com/groups/-/m/t/1568356
I'm currently doing some Mathematica exercises, and I'm stuck on this one task where you're supposed to plot the functions h(t)= |3-t^2|+|t-1|-t^2 , g(t)=3sin(t) in the same grap, and then find all the roots. This is what I've got so far:
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=UHvxo.png&userId=1540567
The instructions say that I should use FindRoot to exactly decide all the roots, but I don't think I've done it right. What should I change with the function in order to make it find all of the roots?
Thanks in advance.Jhn Snd2018-12-09T11:50:45ZImprove code for finding the coordinates of a triangular mesh?
https://community.wolfram.com/groups/-/m/t/1567948
Hello, The problem of finding the coordinates of a triangular (equilateral) mesh discussed earlier is solved. It also counts the number of equilateral triangles formed by the intersecting parallel lines. But the problem is that the code takes more time for larger values of n i.e. the size of the side of the triangle. Can the code be improved? The code is given here. Thanks for any suggestion.
n = 4;
Print["Number of lines/size of triangle = ", n]
h = Sqrt[3] /2;
Array[x, n];
Array[s, n];
x[0] = {{n/2, n h}};
For[i = 1, i <= n, i++,
x[i] = Table[{x[0][[1, 1]] - i/2 + j, n h - i h}, {j, 0, i}]];
set = Apply[Union, Table[x[i], {i, 0, n}]];
Print["Number of vertices = ", Length[set]]
cond := (EuclideanDistance[#[[1]], #[[2]]] ==
EuclideanDistance[#[[2]], #[[3]]] ==
EuclideanDistance[#[[1]], #[[3]]] && #[[1]] != #[[2]] != #[[
3]] && #[[1, 1]] < #[[2, 1]] < #[[3,
1]] && (#[[1, 2]] == #[[2, 2]] || #[[2, 2]] == #[[3, 2]] || #[[
3, 2]] == #[[1, 2]]) &)
tr0 = Tuples[set, 3];
tr1 = Select[tr0, cond];
Print["Number of Triangles = ", Length[tr1]]jagannath debata2018-12-09T07:39:12ZFormat the line spacing of an input cell?
https://community.wolfram.com/groups/-/m/t/1558301
In 11.3 on OS X High Sierra, if I want to change the font size of the code in an input cell, I can easily do that with the notebook's stylesheet by choosing the "Input" style and using the Option Inspector to change the font size.
However, when I try to adjust the line spacing, the same approach does not work (it's as if the LineSpacing option under "Text Layout Options" has no effect).
I can change the line spacing by editing the cell directly, using Cell->Show Expression and manually typing in the option
LineSpacing->{1,0}
But I don't want to do this manually for all Input cells. I suspect there must be some other way to control the line spacing for all Input Cells in a notebook, but I can't find where it is documented. Any pointers would be appreciated.
Thanks.Andrew2018-11-22T23:06:12ZPlot Poincare map in order to analyze chaos?
https://community.wolfram.com/groups/-/m/t/1567675
Consider the following code:
U[t] + 3 U[t]^2 + 6 V[t] + 3 V[t]^2 + 5 W[t] + 2 W[t]^2 + 4 U[t]*V[t] == 2 U'[t] ;
6 U[t] + 3 U[t]^2 + 3 V[t] + 4 V[t]^2 + 8 W[t] + 4 W[t]^2 + 3 U[t]*V[t] == V'[t];
5 U[t] + 3 U[t]^2 + 5 V[t] + 3 V[t]^2 + 8 W[t] + 4 W[t]^2 + 8 U[t]*V[t]+ Q*Sin[100*t] == W'[t] + 2 W''[t];
U[0] == V[0] == W[0], U'[0] == V'[0] == W'[0]==0.0001
Q=const
I need to plot a Poincare map with W [t], W '[t]. I am having trouble. I thank everyone.Vũ Ngọc Việt Hoàng2018-12-08T07:33:18ZFind "CDF Export" in File submenu in MMA 11.3 (Windows)?
https://community.wolfram.com/groups/-/m/t/1568136
I am new to Mathematica, and I am using Mathematica 11.3 (Windows). The documentation refers to a "CDF Export" sub menu item from the file menu.( File --> CDF Export). I do not have a CDF export menu as a submenu on my File menu. Thanks for any heip.Thomas Seibel2018-12-08T16:05:41Z[✓] Use NMinimize calling an own defined function?
https://community.wolfram.com/groups/-/m/t/1567463
I want to call an own defined function through NMinimize. For the sake of simplicity, let us define the problem as follow:
radpatt[x1_] := (Print[x1]; x1 )
NMinimize[{radpatt[xx], 0.1 <= xx <= 1.1}, {xx}]
If you run the above-listed instructions, you will notice that x1 is not number as soon as the function radpatt is called by NMinimize, but it is equal to xx. This causes me an issue because in my original problem x1 needs to be a number just at the beginning of my own function. Any ideas?
Many many thanks in advance.Mario Junior Mencagli2018-12-08T06:23:38ZUse CUDA functions in Mathematica 11.3?
https://community.wolfram.com/groups/-/m/t/1567399
Hi,
I previously had Mathematica 11.0.0 and I successfully used it with my NVIDIA GT 630M GPU on my DELL Inspiron through CUDALINK. I am using Windows 10 Professional.
I now have installed Mathematica 11.3. To my surprise, CUDA functions have stopped working.
Although `CUDAQ[]` Returns `True` and `CUDAResourcesInformation[]` returns:
CUDAResourcesInformation[]
{{"Name" -> "CUDAResources", "Version" -> "11.3.82",
"BuildNumber" -> "", "Qualifier" -> "Win64",
"WolframVersion" -> "11.2,11.3", "SystemID" -> {"Windows-x86-64"},
"Description" -> "{ToolkitVersion -> v9.1, MinimumDriver -> 290}",
"Category" -> "", "Creator" -> "", "Publisher" -> "",
"Support" -> "", "Internal" -> False,
"Location" ->
"C:\\Users\\DELL\\AppData\\Roaming\\Mathematica\\Paclets\\\
Repository\\CUDAResources-Win64-11.3.82", "Context" -> {},
"Enabled" -> True, "Loading" -> Manual,
"Hash" -> "8e54b1af34017668d20caeae2d6e364d"}}
The graphics card driver is the latest for my card:
CUDADriverVersion[]
391.35
Running, for example, `CUDADot[]` gives an error
CUDADot[{1,2,3},{3,4,5}]
CUDAQ::internal: CUDALink experienced an internal error.
What seems to be the problem here? Do I need to install and configure a C Compiler so that `CUDACCompilers[]` does not return an empty list?Hamood Khan2018-12-07T13:30:01ZMake a Sous Vide using Raspberry Pi and Mathematica?
https://community.wolfram.com/groups/-/m/t/1563105
Hello, I am trying to make a Sous Vide using Raspberry Pi and Mathematica. I am in the process of collecting everything I need but am not sure which Pi to get. Can anyone tell me what model I need? (I am following the article posted by Liz Upton)George Saucedo2018-11-30T17:56:32ZSolve the differential equation by Runge Kutta method?
https://community.wolfram.com/groups/-/m/t/1563269
I need to solve the equation as follows by numerical methods such as Runge Kutta, Newton Raphson, ... Hope everyone help me. I thank everyone.
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Untitled.png&userId=1563397Vũ Ngọc Việt Hoàng2018-12-01T15:10:42ZGet formula to calculate text rotation angle (clock angle problem)?
https://community.wolfram.com/groups/-/m/t/1567764
Hello.
Let's say we have circle. We cut it to 4 'triangles' but longest hand is perfect arc. I want to write some letters on this arc but rotate it to be horizontal always.
In other words, how to make clock face with horizontal numbers. It can be any hour, so can be 12-3-6-9, but can be 1-4-7-11 etc.
Thanks for suggestions.John Cosmic2018-12-08T00:16:55ZFeature Request - add Rust to EmbedCode and ExternalEvaluate
https://community.wolfram.com/groups/-/m/t/1566948
Greetings to all,
Not sure if this is the space to create feature requests, but I figured I'd give it a try.
For my security and low-level device work, it wasn't until the 11.3 version of the Wolfram Language that it became a viable stack.
Stephen and Co. have managed to cover with WL a great deal of situations and platforms. What I'd like to see now is extend that functionality further by including support for Rust and bring it up to par with other already included environments. Rust's light footprint, security emphasis and the fact that it doesn't require a runtime - let's not forget it's also super fast - make for a great addition.
$EmbeddedCodeEnvironments
{Android, C#, C++,VisualStudio, GoogleDocs, HTML, Java, Java-Jersey, Javascript, Perl, PHP, Python, Ruby, Scalia, VisualBasic}
I mean, look at the cool stuff one can do with EmbedCode
https://reference.wolfram.com/language/ref/EmbedCode.html
With ExternalEvaulate I could use WL to develop and create Rust/WL functions that run on AWS Lambda and small micro controller platforms. A match made in heaven. Did I mention WebAssembly?
https://reference.wolfram.com/language/ref/ExternalEvaluate.html
This type of functionality would be worth the price of a license all by itself. Just asking!
Thanks,
JoseJose M.2018-12-06T19:03:04Z[✓] Import data into the right format (ex: E+-03 -> 10^3)?
https://community.wolfram.com/groups/-/m/t/1567362
Hi.
I have a question about data import.
My data represent 10^3 as E+03.
So, If I import data, Mathematica can't get a handle on E+03.
How can I solve this problem?
Thanks.Myunghwan Kim2018-12-07T08:24:43ZDraw multiple bar chart labels?
https://community.wolfram.com/groups/-/m/t/1567723
I am drawing a Bar Chart using this code:
outlabels={"Label1(1-10)", "Label1(11-20)", "Label1(21-30)"};chartouttable={{1, 1, 1}, {2, 3, 2}, {1, 1, 1}};BarChart3D[chartouttable, ChartLayout -> "Grid",
ChartLabels -> Placed[outlabels, Center]]
And I get:
![enter image description here][1]
1. The problem is that each label is on there three times. I know that
I can put them on the Axis to only show them once but I want them on
the side of the first series and vertical if possible and only once.
Is there a way to do this?
2. Also, I would like to add labels to the
series axis but can't figure how to. How can that be done?
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4034BarChart.jpg&userId=1523039Jamie Dixson2018-12-07T16:45:42Z[✓] Use series as Z on 3D Bar Chart?
https://community.wolfram.com/groups/-/m/t/1567386
I need individual series to be shown on the Z axis in a 3D bar chart. However, when I I use BarChart3D it places the series side-by-side. The documentation has a weather chart example but it is hard to understand how they got what they did without knowing something about their actual data. This is what I have that is not right:
BarChart3D[{{1, 2, 3, 4}, {4, 3, 2, 1}, {3, 2, 1, 4}}]
And it produces a chart that looks like:
![enter image description here][1]
However, I need a chart that looks like:
![enter image description here][2]
I know this is probably just a styling option but I cannot find it in the documentation.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BarChart.jpg&userId=1523039
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BarChart2.jpg&userId=1523039Jamie Dixson2018-12-07T12:15:01ZDynamically create a list of strings for chart labels?
https://community.wolfram.com/groups/-/m/t/1567311
I am attempting to dynamically create a list that will serve as labels for a chart. The list will be based on a name which the user inputs for a list and the range of elements from the list. I can't seem to get the While loop to work just right. What am I doing wrong? What I have so far is:
seq1 = {52.000, 52.289, 39.000,
0.000, -10.121, -19.000, -22.000, -28.203, -18.000, -6.000, -5.615,
0.000, 0.000, 1.770, 2.000, 4.000, 3.903,
2.000, -4.000, -3.729, -3.000, 4.000, 20.378, 20.000, 47.000,
74.958, 58.000, 54.000, 68.563, 40.000};
window = 10;
offsetwindow = 5;
wordseqname = "Lab1";
stopper = Length[Partition[seq1, window, window]]; st = 0; While[
st <= stopper,
outlabel =
wordseqname <> "_(" <> st*window + 1 <> "-" <> st*window + 1 +
window; st++]
The output needs to be:
outlabel={"Lab1 (1-10)","Lab1 (11-20)","Lab1 (21-30)"}Jamie Dixson2018-12-07T04:16:57ZCan Wolfram´s Mathematica read CmapTools files?
https://community.wolfram.com/groups/-/m/t/1567561
Hi,
I would like to analyze CmapTools Concept Maps using Wolfram´s Mathematica. I intend to use graph theory to analyze the maps but I don´t know if Mathematica can read CmapTools files or if I have to convert them to a different format. Does anyone have experience with that or have any idea about it?
RibasJose Ribamar2018-12-07T11:30:00ZDownload manager won't start downloading and displays errors
https://community.wolfram.com/groups/-/m/t/1211541
Hello everyone!
Could anyone please help me with this situation? I am trying to download the latest version of Mathematica, but I am having this problem with download manager utility and I can't find any solution. The download process nevers starts and I only see those error messages...
![enter image description here][1]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=helpmeifyoucan.png&userId=1211525
I would really appreciate some explanation for fixing this, thanks a lot :)
(2 hours after creating this thread Update) - **Timeout in I/O** has just been replaced by **Socket error** :(Samuel Čech2017-10-31T18:31:36ZUse NMinimize calling a own defined function with FindRoot?
https://community.wolfram.com/groups/-/m/t/1567276
I defined my own function which solves a transcendental equation by using a findroot, and it works. But, when I call my own defined function with NMinimize, it gives me an error. I do not understand where it comes from. Attached please find my code. Please let me know if you know where the problem might be.Mario Junior Mencagli2018-12-07T05:10:37Z[✓] Use Map with If to apply a test to a nested list?
https://community.wolfram.com/groups/-/m/t/1566989
I have the nested list:
outtable={{2936.43, 2010.95, 805.145}, {1277.23, 646.763, 40.0572}, {11.9107,
28.5548, 52.7854}, {14.1702, 1305.69, 1775.71}, {412.422, 773.669,
726.661}}
I would like to apply a test to the list and output a table of identical dimensions but with "1" if the value in the list is less than a threshold value and 0 if it is not. Here is what I have tried:
threshold = 50;
outtable2 = Map[[If[[#] <= threshold, 1, 0]], outtable]
The output should look like this:
outtable2={{0,0,0},{0,0,0},{1,1,0},{1,0,0},{0,0,0}}
Any help with getting this to work would be appreciated.Jamie Dixson2018-12-07T01:29:48Z[✓] Get nested table data in right place?
https://community.wolfram.com/groups/-/m/t/1566967
I am trying to get a nested table but my code gives the output matrix with the right dimensions but the data in the wrong place. My code is:
seq1 = {52.000, 52.289, 39.000,
0.000, -10.121, -19.000, -22.000, -28.203, -18.000, -6.000, -5.615,
0.000, 0.000, 1.770, 2.000, 4.000, 3.903,
2.000, -4.000, -3.729, -3.000, 4.000, 20.378, 20.000, 47.000,
74.958, 58.000, 54.000, 68.563, 40.000, 50};
seq2 = {52.000, 52.289, 39.000, -12.000, -1.792, -6.000, 49.000,
69.931, 59.000, 24.000, 27.989, 7.000, 7.000, 21.857, 18.000,
41.000, 55.666, 41.000, 18.000, 33.127, 18.000, 41.000, 57.813,
43.000, 25.000, 28.099, 11.000, 2.000, -2.715, -6.000};
window = 10;
offsetwindow = 5;
coltot = IntegerPart[Length[seq1]/window]
rowtot = Length[Partition[seq2, window, offsetwindow]]
dist1 = Tuples[{Partition[seq1, window, window],
Partition[seq2, window, offsetwindow]}]
outtable =
Table [CanonicalWarpingDistance[dist1[[i, 1]], dist1[[i, 2]],
Automatic, {"SlantedBand", 950},
Method -> {"MatchingInterval" -> "Flexible"},
DistanceFunction -> CosineDistance], {i, 1, rowtot}, {j, 1,
coltot}]
The output is:
{{2936.43, 2936.43, 2936.43}, {2010.95, 2010.95, 2010.95}, {805.145,
805.145, 805.145}, {1277.23, 1277.23, 1277.23}, {646.763, 646.763,
646.763}}
But it should be:
{{2936.43,2010.95,805.145},{1277.23,646.763,40.0572}, {11.9107, 28.5548, 52.7854}, {14.1702, 1305.69, 1775.71},{412.422, 773.669, 726.661}}
I verified the values by running the code with output as an unnested list and the total list of output values are:
{2936.43, 2010.95, 805.145, 1277.23, 646.763, 40.0572, 11.9107, \
28.5548, 52.7854, 14.1702, 1305.69, 1775.71, 412.422, 773.669, \
726.661}
I just need them in matrix form. In this particular case it should be a 3X5 matrix but that will change depending on the input variables seq1 and seq2. The size of the matrix will be "rowtot" X "coltot." Where am I going wrong?Jamie Dixson2018-12-06T23:06:54ZImplementation of topology optimization algorithms in Wolfram Mathematica
https://community.wolfram.com/groups/-/m/t/1566977
----------
## One year ago ##
One year ago I posted my first [publication][1] about implementation the topology optimization algorithms in Wolfram Mathematica by using my own finite element method. I want to continue this post by presenting new results, which I received during year.
----------
## Introduction ##
It is really important problem in aircraft and spacecraft engineering. Why? Because the main goal of using topology optimization algorithms in such spheres is a decreasing the weight of any construction. As example - full optimization of the aircraft wing:![enter image description here][2]
Results of this optimization presented by Niels Aage, Erik Andreassen, Boyan S. Lazarov and Ole Sigmund in their paper ["Giga-voxel computational morphogenesis for
structural design"][3]. They achieived the 20-40% saving of weight with saving the durability with using SIMP (Solid Isotropical Material with Penalization) method. It is incredible result because of it is the first paper about optimizing object of such scale. It is important to say that now it is not fantastic idea to optimize multiscale objects or object with huge amount of components. Many commercial products realized their own algorithms.
----------
## What did I do? ##
- SIMP 2D algorithm (not my own)
- SIMP 2D modification (my own realization by **FindMinumum** function, but not effective in comparison with traditional algorithm, but I can use any type of elements)
- SIMP 3D algoritm (not my own)
- Level-set 2D algorithm (not my own)
- Level-set 3D algorithm based on 2D (my own)
- Modifications in methods for better quality of solutions (my own)
SIMP 3D algorithm in Matlab was written by Kai Liu and Andres Tovar in paper ["An efficient 3D topology optimization code written in MATLAB"][4]. It should be mentioned that [Ole Sigmund][5] and [Martin Philip Bendsoe][6] were first men who published effective numerical algorithm of first topology optimization algorithms.
Level-set 2D algorithm was written by Vivien J. Challis in paper ["A discrete level-set topology optimization code written in MATLAB"][7].
It was a little sad that most of realizations of topology optimization algorithm were written in MATLAB. I found only one implementation of SIMP method in Wolfram Mathematica written by Vladimir Uskov.
----------
## SIMP ##
So I realized these algorithms in Wolfram Mathematica. Both of them have a simple implementation of FEM. In 2D case we have quad elements with first order interpolation, and in 3D case - hexahedron elements with first order interpolation. It should be mentioned that also I realized not effective topology optimization algorithm based on Wolfram Mathematica function **FindMinimum** and **NDSolve\`FEM\`** module in Mathematica. This function has a solver for constrained optimization problem based on Interior point method of Narendra Karmarkar. Here some solutions of traditional topology optimization problem I received by using this function:
![enter image description here][8]
Graphical formulation of topology optimization problem.
![enter image description here][9]
First order element with first order penalty function
![enter image description here][10]
Second order element with first order penalty function
![enter image description here][11]
Second order element with second order penalty function
![enter image description here][12]
Second order quad element with second order penalty function
All results and code you can look on my [GitHub][13] page in file **TopOpt2.nb**.
SIMP 3D implementation results you can look below:
![enter image description here][14]
Algorithm realization you can look also on my [GitHub][15] page in file **SIMP3D.nb**.
----------
## Level-set ##
I translated the educational code of Vivien J. Challis from MATLAB code to Wolfram Mathematica with saving the names of variables for better understanding by my readers. You can look all meanings of all variables in his publication ["A discrete level-set topology optimization code written in MATLAB"][16]. I decided that it will be good to make an animation for any future user of level-set topology optimization for clear understanding of the idea:
![enter image description here][17]
Here we can see the how we receive the solution of problem by level-set algorithm. It is interesing that the same method is used for receiving 3D model from Magnetic resonance imaging. Hamilton-Jacobi equation and volume constraints, which describe our optimization problem define by itself 3D surface in 2D case problem. In 3D problem it will be 4D surface. And algorithm only move the plane through this surface until it receives the correct solution. Below 3D case is presented:
![enter image description here][18]
Here you can see the possible solution of 3D case problem. But the main difference between SIMP and Level-set is a possibility to modify internal domain. Without topology sensitivites in 2D and 3D level-set method - internal domain modification forbidded. We can make an initial hole inside the body for overwhelming this forbid. FEM implementation of voxel mesh was taken from paper Kai Liu and Andres Tovar. Idea of realization 3D Level-set was taken from paper Vivien J. Challis. In my research I tried to change the algorithm of satisfying constrained optimization from Lagrange multiplier method to something heuristic algorithm. The main Idea was avoiding of seeking right values of Lagrange multipliers. Standard and modificated algorithms were realized and compared. I received the longer convergence of algorithm, but I need only 1 run for any optimization problem. Standard and modificated realization and comparison you also can look on [GitHub][13] page in file **Level-set3D.nb**.
----------
## Further Exploration ##
Now is appeared a new implementation of Level-set algorithm based on reaction-diffusion equation. The main advantage of this is an independence level-set function on nucleation process. Possibly all implementations will be united in mini-extension of Wolfram Mathematica.
----------
## Acknowledgements ##
I want to thank Dr. Vivien Challis from The University of Queensland for clear explanations and helpful conversation about 3D Level-set method implementation.
[1]: https://community.wolfram.com/groups/-/m/t/1163322
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG&userId=1083954
[3]: https://www.nature.com/articles/nature23911
[4]: https://link.springer.com/article/10.1007/s00158-014-1107-x
[5]: http://www.dtu.dk/english/service/phonebook/person?id=2278
[6]: https://www.dtu.dk/english/service/phonebook/person?id=165&tab=1
[7]: https://link.springer.com/article/10.1007/s00158-009-0430-0
[8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10361%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG&userId=1083954
[9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1552%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG&userId=1083954
[10]: https://community.wolfram.com//c/portal/getImageAttachment?filename=9214%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG&userId=1083954
[11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2031%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG&userId=1083954
[12]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1927%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.PNG&userId=1083954
[13]: https://github.com/AndreyKrotkikh/TopologyOptimization
[14]: https://community.wolfram.com//c/portal/getImageAttachment?filename=animate2.gif&userId=1083954
[15]: https://github.com/AndreyKrotkikh/TopologyOptimization
[16]: https://link.springer.com/article/10.1007/s00158-009-0430-0
[17]: https://community.wolfram.com//c/portal/getImageAttachment?filename=animate.gif&userId=1083954
[18]: https://community.wolfram.com//c/portal/getImageAttachment?filename=animate3.gif&userId=1083954Andrey Krotkikh2018-12-07T00:06:08ZOpen a hidden folder from Mathematica frontend?
https://community.wolfram.com/groups/-/m/t/1564012
Hello.
How to open a hidden folder, for example ~/.WolframEngine, from the Mathematica 11.0.1 frontend?Pierre Albarède2018-12-03T00:04:25Z[✓] Find -luuid on Ubuntu 16.04 while using MMA 11.3?
https://community.wolfram.com/groups/-/m/t/1566233
I am using 11.3 trial version on Ubuntu 16.04.
I am going to compile the following routines.
mcc addtwo.tm addtwo.c -o addtwo
However, it reports the following error:
/usr/bin/ld: cannot find -luuid
collect2: error: ld returned 1 exit status
I can use mprep to produce addtow.tm.c file.
Can you give me some suggestions, thanks in advance.Jason Wang2018-12-05T07:19:38ZAvoid problem using "Nested" NMaximize?
https://community.wolfram.com/groups/-/m/t/1566000
I'm having trouble with NMaximize in the following code (this is an example of my real problem, I know that this example has an exact analytical solution).
This part works just fine, is the clasical consumer maximization problem :
Util[x_, y_, a_] := x^a* y^(1 - a)
UtilMax[a_, px_, py_, P_] := Module[{temp, UtilMax, XYOptim},
temp = NMaximize[{Util[x, y, a], px*x + py*y <= P, x > 0,
y > 0}, {x, y}];
UtilMax = temp[[1]];
XYOptim = {x, y} /. Last[temp];
Flatten[{XYOptim, UtilMax}]]
Sales[vecAlfa_, vecP_, px_, py_] := Module[{temp},
temp = Table[
UtilMax [vecAlfa[[i]], px, py, vecP[[i]]], {i, 1,
Length[vecAlfa]}];
Sum[temp[[i, 1]] + temp[[i, 2]], {i, 1, Length[vecAlfa]}]
]
vecAlfa = {0.1, 0.9};
vecP = {10, 20};
Test that the functions are working ok:
In[6]:= UtilMax[vecAlfa[[1]], 5, 5, vecP[[1]]]
UtilMax[vecAlfa[[2]], 5, 5, vecP[[2]]]
Sales[vecAlfa, vecP, 5, 5]
Out[6]= {0.2, 1.8, 1.44493}
Out[7]= {3.6, 0.4, 2.88987}
Out[8]= 6.
The problem arises with the followin part:
NMaximize[{Sales[vecAlfa, vecP, px, py], 0 < px < 100, 0 < py < 50}, {px, py}]
During evaluation of In[10]:= NMaximize::bcons: The following constraints are not valid: {x>0,y>0,px x+py y<=10}. Constraints should be equalities, inequalities, or domain specifications involving the variables. >>
During evaluation of In[10]:= ReplaceAll::reps: {x,y} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >>
During evaluation of In[10]:= NMaximize::bcons: The following constraints are not valid: {x>0,y>0,px x+py y<=20}. Constraints should be equalities, inequalities, or domain specifications involving the variables. >>
During evaluation of In[10]:= ReplaceAll::reps: {x,y} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >>
During evaluation of In[10]:= NMaximize::nnum: The function value -x^0.9 y^0.1-x^0.1 y^0.9-2 ({x,y}/. {x,y}) is not a number at {px,py} = {1.91862,1.66351}. >>
Out[10]= NMaximize[{x^0.9 y^0.1 + x^0.1 y^0.9 + 2 ({x, y} /. {x, y}),
0 < px < 100, 0 < py < 50}, {px, py}]
Any idea what could I've been doing wrong?Augusto Umaña2018-12-06T05:47:13ZFind the Coordinates of a triangular mesh?
https://community.wolfram.com/groups/-/m/t/1565820
Hello , I have an equilateral triangle with vertices at {0,0},{4,0} and {2,2 Sqrt[3]}. Three points on each side are taken dividing the side into four equal parts .These points are joined so as to draw lines parallel to the sides. How do we get the coordinates of the intersecting points of the triangular mesh obtained? For example {{1/2,sqrt[3]/2},{1,0},{0,0}} is a triangle. Thanks for any help.jagannath debata2018-12-04T16:04:49ZCompare all sublists of two different lists using PartitionMap?
https://community.wolfram.com/groups/-/m/t/1565905
I have an list of values and I would like to cut it into into sublists of 5 elements and compare each sublist with each sublist of another list which will also be 5 elements in length using CanonicalWarpingDistance. I have been successful in using "Partition" to cut the lists into sublists and I have also been successful in using CanonicalWarpingDistance to compare two single sublists. However, I cannot seem to combine the two to output an array of distances between every sublist in the first list and every sublist in the second list. This is what I have tried:
seq = {52.000, 52.289, 39.000,
0.000, -10.121, -19.000, -22.000, -28.203, -18.000, -6.000, -5.615,
0.000, 0.000, 1.770, 2.000, 4.000, 3.903,
2.000, -4.000, -3.729, -3.000, 4.000, 20.378, 20.000, 47.000,
74.958, 58.000, 54.000, 68.563, 40.000, 17.000, 16.861,
2.000, -4.000, -11.492, -11.000, -20.000, -21.798, -14.000, 6.000,
7.932, 10.000, -1.000, -4.688, -7.000, -7.000, -10.321, -7.000, \
-7.000, -10.321, -7.000, -7.000, -10.321, -7.000, -7.000, -10.321, \
-7.000, -7.000, -10.321, -7.000};
seq2 = {52.000, 52.289, 39.000,
0.000, -10.121, -19.000, -22.000, -28.203, -18.000, -6.000, \
-5.615, 0.000, 0.000, 1.770, 2.000, 4.000, 3.903,
2.000, -4.000, -3.729, -3.000, 4.000, 20.378, 20.000, 47.000,
74.958, 58.000, 54.000, 68.563, 40.000, 17.000, 16.861,
2.000, -4.000, -11.492, -11.000, -20.000, -21.798, -14.000, 6.000,
7.932, 10.000, -1.000, -4.688, -7.000, -7.000, -10.321, -7.000, \
-7.000, -10.321, -7.000, -7.000, -10.321, -7.000, -7.000, -10.321, \
-7.000, -7.000, -10.321, -7.000};
dist = CanonicalWarpingDistance[Partition[seq, 5], Partition[seq2, 5],
Automatic, {"SlantedBand", 950},
Method -> {"MatchingInterval" -> "Flexible"},
DistanceFunction -> EuclideanDistance]
This does run but it does not give me an array of distances. Instead it gives me a huge number which is probably the sum of all of the distances. How can I get the output in an array showing distances between each sublist of "seq" and each sublist of "seq2?"Jamie Dixson2018-12-05T00:47:43ZIs there a way to use Wolfram Language in Unity 3D?
https://community.wolfram.com/groups/-/m/t/312155
Is there a way to use wolfram language in Unity3d. If i can do it can you tell me how? I just want to display mathematical symbols(limits, functions, etc) in unity's GUI system.Raducu Mihai2014-08-04T20:56:33ZAutomate converting an imported excel spreadsheet to a dataset?
https://community.wolfram.com/groups/-/m/t/1566323
I would like to import a large excel spreadsheet with many columns into Mathematica. The first row of the spreadsheet contains the column headings and the remaining rows contain the data. After importing I first separate the column headings and data into separate variables and would like to convert the data to a dataset. Here is an example of what I have tried.
These steps simulate of importing the spreadsheet and separating into columns and data
cols = {"col1", "col2", "col3", "col4", "col5"};
dat = RandomReal[{0, 1}, {10, 5}];
I now need to create an association to use to map the data to the columns but here is where I am having trouble. The best I am able to come up with is to generate
assoc = Table[cols[[k]] -> #[[k]], {k, 1, 5}]
This results in some error messages, but produces
{"col1" -> 1, "col2" -> #1[[2]], "col3" -> #1[[3]], "col4" -> #1[[4]],
"col5" -> #1[[5]]}
which is nearly the result desired. I can then copy that result, paste it into a new cell, and edit that cell by hand, changing the first element of the list, applying an association function, and applying a function to get the desired function to apply to the data
assoc1 = Association[{"col1" -> #[[1]], "col2" -> #1[[2]],
"col3" -> #1[[3]], "col4" -> #1[[4]], "col5" -> #1[[5]]}] &
Map[assoc1,dat]
With this association I can then generate the dataset. Is there any way of generating this function without the necessity of the hand editing step?Mike Luntz2018-12-05T14:55:47ZFind the curvature of an object from an image
https://community.wolfram.com/groups/-/m/t/1562821
`curvatureMeasure.m` is a Mathematica script for calculating curvature along the boundary of an image object. It might be useful to people working in the computer vision community. This simple script can be easily extended to even track the curvature of an object as it deforms (will add soon) across several images.
Here is our input image:
![enter image description here][1]
boundary is discretized into equidistant points
![enter image description here][2]
circle fits to a given point point Pi, Pi + N-left, Pi + N-right, where N is the neighbour to the point Pi.
![enter image description here][3]
curvatures (found as 1/radius) is the colormap:
![enter image description here][4]
**code**
(* ::Package:: *)
BeginPackage["curvatureMeasure`"];
curvatureMeasure::usage = "measures the curvature along the image object";
Begin["`Private`"];
shiftPairs[perimeter_,shift_]:=Module[{newls},
newls=perimeter[[-shift;;]]~Join~perimeter~Join~perimeter[[;;shift]];
Table[{newls[[i-shift]],newls[[i]],newls[[i+shift]]},{i,1+shift,Length[newls]-shift}]
];
(* we can either use the suppressed code below to fit circles or the Built-In Circumsphere to find the fits
(* from Mathematica StackExchange: courtesy ubpdqn *)
circfit[pts_]:=Module[{reg,lm,bf,exp,center,rad},
reg={2 #1,2 #2,#2^2+#1^2}&@@@pts;
lm=LinearModelFit[reg,{1,x,y},{x,y}];
bf=lm["BestFitParameters"];
exp=(x-#2)^2+(y-#3)^2-#1-#2^2-#3^2&@@bf;
{center,rad}={{#2,#3},Sqrt[#2^2+#3^2+#1]}&@@bf;
circlefit[{"expression"->exp,"center"->center,"radius"->rad}]
];
circlefit[list_][field_]:=field/.list;
circlefit[list_]["Properties"]:=list/.Rule[field_,_]:>field;
circlefit/:ReplaceAll[fields_,circlefit[list_]]:=fields/.list;
Format[circlefit[list_],StandardForm]:=HoldForm[circlefit]["<"<>ToString@Length@list<>">"]
*)
curvatureMeasure[img_Image,div_Integer,shift_Integer]:=Module[{\[ScriptCapitalR],polygon,t,interp,sub,sampledPts,
pairedPts,circles,\[Kappa],midpts,regMem,col,g,fn},
\[ScriptCapitalR] = ImageMesh[img, Method -> "Exact"];
polygon = Append[#,#[[1]]]&@MeshCoordinates[\[ScriptCapitalR]][[ MeshCells[\[ScriptCapitalR],2][[1,1]] ]];
t = Prepend[Accumulate[Norm/@Differences[polygon]],0.];
interp = Interpolation[Transpose[{t,polygon}],InterpolationOrder -> 1,
PeriodicInterpolation->True];
sub = Subdivide[interp[[1,1,1]],interp[[1,1,2]],div];
sampledPts = interp[sub];
Print[Show[\[ScriptCapitalR],Graphics@Point@sampledPts,ImageSize-> 250]];
pairedPts = shiftPairs[sampledPts, shift];
circles = (Circumsphere/@pairedPts)/. Sphere -> Circle;
(*circles = (fn=circfit[#]; Circle[fn["center"],fn["radius"]])&/@pairedPts;*)
Print[Graphics[{{Red,Point@sampledPts},{XYZColor[0,0,0,0.1],circles}}]];
\[Kappa] = 1/Cases[circles,x_Circle:> Last@x];
midpts = Midpoint/@pairedPts[[All,{1,-1}]];
regMem = RegionMember[\[ScriptCapitalR],midpts]/.{True-> 1,False-> -1};
\[Kappa] *= regMem;
col = ColorData["Rainbow"]/@Rescale[\[Kappa], MinMax[\[Kappa]],{0,1}];
g = Graphics[{PointSize[0.018],MapThread[Point[#1,VertexColors->#2]&,{sampledPts,col}]}];
Print[Show[HighlightMesh[\[ScriptCapitalR],{Style[1, Black],Style[2,White]}],g,ImageSize->Medium]];
\[Kappa]
]
End[];
EndPackage[];
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=inputImage.png&userId=942204
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=mesh.png&userId=942204
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=curvatureFitstoShape_cropped.png&userId=942204
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=curvatureFinal.png&userId=942204Ali Hashmi2018-11-30T07:26:13ZUse NetTrain[net,f] to read in a large set of rules (Is there an example?)
https://community.wolfram.com/groups/-/m/t/1560692
Hello,
Is there an example of using NetTrain[net,f] to read in a large file (1.8 million lines). The file is in text format with lines of the form
{17.,1.,34.,6.,14.,21.}->{26.,2.,53.,13.,20.,45.},
{16.,2.,3.,21.,17.,10.}->{13.,21.,49.,47.,51.,27.},
{4.,38.,40.,20.,5.,49.}->{15.,32.,51.,28.,50.,24.},
{37.,52.,29.,15.,39.,5.}->{34.,53.,25.,21.,47.,12.}
.
.
.
Thank You
MichelMichel Mesedahl2018-11-28T11:56:17ZEdit specific parts of vector fields?
https://community.wolfram.com/groups/-/m/t/1565312
I would like to take a specific part of a given vector field, and make all the vectors bold.
For example, I want to take the {x, y} vector field, and make all the vectors from x=0 to x=10 to be
bold, and the rest of the field to be regular. I would appreciate it if anyone could help me figure this out!Hafez Rais2018-12-04T05:24:35ZMy Robots and Mathematica
https://community.wolfram.com/groups/-/m/t/1153218
Hi there, (Sharing an idea)
I am a hobbyist user of Mathematica. I am using it to control my three robot systems. Firstly there is Jeeves. It is a modified Meccano G15 KS. The Meccano control system has been removed and replaced with another control system (EZ-Robot). This new controller and its PC based control software is capable of starting an external program. In my case that external program is Mathematica. The sensors on the robot read in data and pass these data onto the PC based control software which then fires up Mathematica which in turn carries out some computation and passes a result back to the PC based control software. Data is stored in files. Using this set up means there can be latency. Sometimes quite a bit. For me this is not a problem as the robot is mainly used to test algorithms. Waiting a minute for a result is not an issue.
![Modified Meccano G15 KS][1]
This robot can read text from a sheet of paper or screen and then repeat what it has seen. It can also read text and evaluate it. For example given the question, “What is the capital of England” the robot will reply “London”. It can recognise objects in an image(potentially thousands). By reading in text similar to the following “AABBCCD”, it will play sounds relating to the musical notes. All this is made possible because of Mathematica. As stated above I use this robot for algorithm testing. In this case Mathematica is used indirectly.
My second robot is a small 16 DOF humanoid robot. This robot is controlled by a 24 channel Pololu Maestro servo controller.
![Modified EZ-Robot][2]
![Rear of modified EZ][3]
Now this robot is controlled directly by Mathematica. All code is contained in a notebook and uses all the features of connected devices contained within Mathematica. Data can be read from and sent to the robot. Just by using the Manipulate function every servo in the robot can be controlled by Mathematica. I have not done so at the moment but to create a robot animation system using Mathematica would only be a few dozen lines of code. That is one of my first tasks. This robot is a modified EZ-Robot now totally under the control of Mathematica.
My third robot is a robot workbench. Built by me to test more complex algorithms. This is controlled by a 24 channel Pololu Maestro servo controller. In turn controlled completely by, you guessed Mathematica.
![Robot Workbench 1][4]
![Robot Workbench 2][5]
![Robot Workbench 3][6]
![Robot Workbench 4][7]
![Robot Workbench 5][8]
The robot workbench only has a servo control program written at the moment. This control program makes use of the Manipulate function. I have some great plans for this workbench in the future. Under the control of Mathematica it will perform tasks using all the power of the neural networks and machine learning. Image and text processing. To name but a few.
My big goal is to create a Robot Operating System that will contain all the code required for the robots to carry out complex tasks. This would include features such as inverse and forward kinematics. I want to achieve this using only Mathematica.
My reason for putting my robots on the forum is simply to see if anyone is doing anything similar. With only a few lines of Mathematica code I have been able to get the robots to read text and interpret it. I am sure that my Robot Operating System will be thousands of lines of code. I plan to write it in two parts. A front end to carry out general robot tasks, such as movement and manipulation, data processing from sensors and the solving of problems using neural nets and machine learning. A back end that can be made to match up to a specific controller or micro controller. That is my plan. Any code I produce will be made available to this forum.
Well I had better get back to coding.
----------
# CODE
----------
The code for the G15 KS simply performs a task and returns a result to the control software of the robot. There is no direct control. The humanoid robot and the workbench code have direct control.
The following is the code that allows the modified G15 KS to read text and repeat what it has seen.
str = TextRecognize[Import["C:\\mathscripts\\images\\img3.jpg"], Language -> "English"];
str = StringReplace[str, Whitespace -> " "];
str
s = OpenWrite[File["C:\\mathscripts\\jeeves\\output.txt"]]
WriteLine[s, str];
Close[s];
Here the image taken by the robots camera is picked up by mathematica and the TextRecognize function gets the text from the image and stores it in a file ready to be used by the robots control system. Pretty simple coding to get a robot to read text.
The following code allows the G15 KS to read text, evaluate it.
str = TextRecognize[Import["C:\\mathscripts\\images\\img3.jpg"], Language -> "English"];
str = StringReplace[str, Whitespace -> " "];
str
s = OpenWrite[File["C:\\mathscripts\\jeeves\\output2.txt"]]
res = Interpreter["SemanticExpression"][str];
If[NumericQ[res], res = N[res], res]
WriteLine[s, ToString[res]];
Close[s];
The following code allows the G15 KS to identify an object within an image. Actually thousands of objects'
txt = ImageIdentify[Import["C:\\mathscripts\\images\\img3.jpg"]]
s = OpenWrite[File["C:\\mathscripts\\jeeves\\output3.txt"]]
WriteLine[s, ToString[CommonName[txt]]];
Close[s];
The following code allows the G15 KS to read text relating to geographic location. This was used by the robot to read the text generated by a mobile phone app and speak the result.
str = TextRecognize[Import["C:\\mathscripts\\images\\img3.jpg"], Language -> "English"];
str = StringReplace[str, Whitespace -> " "];
str = StringSplit[str];
If[NumberQ[ToExpression[str[[1]]]] && NumberQ[ToExpression[str[[2]]]],
$GeoLocation =
GeoPosition[{ToExpression[str[[1]]], ToExpression[str[[2]]]}];
country = CountryData[$GeoLocationCountry, "Name"];
citytown = CityData[$GeoLocationCity, "Name"];
s = OpenWrite[File["C:\\mathscripts\\jeeves\\output4.txt"]];
WriteLine[s, country <> " is the country I am in and the nearest town or city is called " \<> citytown];
Close[s];,
s = OpenWrite[File["C:\\mathscripts\\jeeves\\output4.txt"]];
WriteLine[s, "Invalid input Please try again " ];
Close[s];];
The following code allows the robot to play a tune. The text the robot must read is as follows: AABBCCD
str = TextRecognize[Import["C:\\mathscripts\\images\\img3.jpg"], Language -> "English"];
str = StringReplace[str, Whitespace -> ""];
str
s = OpenWrite[File["C:\\mathscripts\\jeeves\\output5.txt"]]
WriteLine[s, str];
Close[s];
It can be seen from the code that most of the work is passing data in files. The code to carry text and image analysis is simply one line of code. It can not get better than that.
The code that follows is the code the is used to control all of the humanoid and workbench servo. Firstly the workbench.
Button["Open connection to Maestro", dev = DeviceOpen["Serial", "COM5"]]
Manipulate[
DeviceWriteBuffer[
dev, {132, 1, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1224, "Right Base"},
496, 2016, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 0, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1224, "Left Base"},
496, 2016, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 3, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1216, "Right Pivot"},
1008, 2000, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 2, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1216, "Left Pivot"},
1008, 2000, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 4, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1216, "Right Elbow"},
1024, 2144, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 5, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1270, "Left Elbow"},
1024, 2144, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 14, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1240, "Right Wrist"},
496, 2000, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 15, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1182, "Left Wrist"},
496, 2000, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 7, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1200,
"Right Gripper"}, 1024, 1296, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 6, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1200,
"Left Gripper"}, 1024, 1296, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 8, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1480, "Turn Table"},
992, 2000, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 10, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1240,
"Move Vertical"}, 496, 2000, 1}]
Manipulate[
DeviceWriteBuffer[
dev, {132, 11, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}], {{a, 1200,
"Move Horizontal"}, 800, 1600, 1}]
CloseDevice[dev];
Now the code to move the humanoid servos using Manipulate.
dev = DeviceOpen["Serial", "COM5"]
Manipulate[
DeviceWriteBuffer[
dev, {132, 0, BitAnd[a*4, 127],
BitAnd[BitShiftRight[(a*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 1, BitAnd[b*4, 127],
BitAnd[BitShiftRight[(b*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 2, BitAnd[c*4, 127],
BitAnd[BitShiftRight[(c*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 3, BitAnd[d*4, 127],
BitAnd[BitShiftRight[(d*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 5, BitAnd[e*4, 127],
BitAnd[BitShiftRight[(e*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 4, BitAnd[f*4, 127],
BitAnd[BitShiftRight[(f*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 6, BitAnd[g*4, 127],
BitAnd[BitShiftRight[(g*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 7, BitAnd[h*4, 127],
BitAnd[BitShiftRight[(h*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 15, BitAnd[l*4, 127],
BitAnd[BitShiftRight[(l*4), 7] , 127]}];
DeviceWriteBuffer[
dev, {132, 14, BitAnd[k*4, 127],
BitAnd[BitShiftRight[(k*4), 7] , 127]}], {{a, 1224, "Left Base"},
496, 2016, 1}, {{b, 1224, "Right Base"}, 496, 2016,
1}, {{c, 1216, "Left Pivot"}, 1008, 2000,
1}, {{d, 1216, "Right Pivot"}, 1008, 2000,
1}, {{e, 1270, "Left Elbow"}, 1024, 2144,
1}, {{f, 1270, "Right Elbow"}, 1024, 2144,
1}, {{k, 1024, "Right Wrist"}, 496, 2000,
1}, {{l, 1024, "Left Wrist"}, 496, 2000,
1}, {{g, 1200, "Left Gripper"}, 1024, 1296,
1}, {{h, 1200, "Right Gripper"}, 1024, 1296, 1}]
That's all for now at a later date there will be a lot more to come. It can be seen from above that very little code is required to get a great deal of functionality.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_204150%282%29.jpg&userId=1152078
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_210215%282%29.jpg&userId=1152078
[3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_210324%283%29.jpg&userId=1152078
[4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_205616%282%29.jpg&userId=1152078
[5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_205908%282%29.jpg&userId=1152078
[6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_210128%283%29.jpg&userId=1152078
[7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_204931%282%29.jpg&userId=1152078
[8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=20170722_205445%282%29.jpg&userId=1152078Terence Smith2017-07-26T17:11:41ZGet 3358th digit of Pi, E and Phi using W|A?
https://community.wolfram.com/groups/-/m/t/1564133
According to subidiom.com the first occurrence of 1984 on Pi is at the 3358th decimal digit.
http://www.subidiom.com/pi/pi.asp
![enter image description here][1]
I can use the command "3359 digit of pi" to get a similar output on WolframAlpha including nearby digits as you can see below.
http://m.wolframalpha.com/input/?i=3359+digit+of+pi
Unfortunately it doesn't seem to work with e or phi. Does someone have a workaround for that ?
Thanks,
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=F22D299C-8F24-4047-9F52-CAA9DC8A2271.png&userId=1562578Renan José2018-12-02T23:51:41ZUse "While" loop to get parts of a list?
https://community.wolfram.com/groups/-/m/t/1565084
I am trying to cut a list into several consecutive lists. For example, if I had a 10 element list:{1,2,3,4,5,6,7,8,9,10} I would want to cut it into 5 consecutive 2 element lists:{1,2},{3,4},{5,6},{7,8},{9,10}. I am trying to do this with a "While" loop as follows but I am not being able to get this to work. I have searched the knowledge base and documentation and it seems like I am doing it correct but obviously not because it does not work. Can someone tell me what I am doing wrong?
Below is what I have tried without success. Essentially nothing happens when I try to execute the code.
seq = {52.000, 52.289, 39.000,
0.000, -10.121, -19.000, -22.000, -28.203, -18.000, -6.000, -5.615,
0.000, 0.000, 1.770, 2.000, 4.000, 3.903,
2.000, -4.000, -3.729, -3.000, 4.000, 20.378, 20.000, 47.000,
74.958, 58.000, 54.000, 68.563, 40.000, 17.000, 16.861,
2.000, -4.000, -11.492, -11.000, -20.000, -21.798, -14.000, 6.000,
7.932, 10.000, -1.000, -4.688, -7.000, -7.000, -10.321, -7.000, \
-7.000, -10.321, -7.000, -7.000, -10.321, -7.000, -7.000, -10.321, \
-7.000, -7.000, -10.321, -7.000};
n = 1; m = 5; While[n < Length[seq]/5, Part[seq, n ;; m]; n += 5; m += 5]Jamie Dixson2018-12-04T22:53:11ZString Art
https://community.wolfram.com/groups/-/m/t/1563492
In the United States from the late 1960s to the early 1970s there was a fad for making [string art][1]. In basement workshops and garages all over the country, amateur artists whiled away their free time stringing colorful bits of yarn between little tacks hammered into felt-covered plywood. The resulting artwork looked vaguely mathematical, and I recall that a photograph of one such piece graced the cover of my seventh grade mathematics textbook.
For this post, imagine 360 tacks spaced evenly around a circle. Beginning at the top (i.e., the 12:00 position) label the tacks from 0 to 359 proceeding clockwise. Choose a constant *m*. Then, for points *i* = 0 to 359, draw a line (or string a piece of yarn if you wish) between tack *i* and tack (*i m*) mod 360.
Different values of m produce different patterns, but allowing m to vary smoothly between 1 and 360 produces a psychedelic effect that might have inspired Dr. Timothy Leary back in the day.
![String Art][2]
The Mathematica code is very simple:
base = 360;
max = 359;
plist = {Sin[(2.*Pi*#/base)], Cos[2.*Pi*#/base]} & /@
Range[0, base - 1];
colors = Table[Hue[x], {x, 0, 1, 1./base}];
zlist[p_, m_] :=
Table[{p[[i + 1]], p[[Mod[IntegerPart[m*i], base] + 1]]}, {i,
base - 1}]
stringArt =
Animate[Graphics[{colors[[IntegerPart[m]]],
Line[zlist[plist, m]]}], {m, 1.1, base - 0.1, 0.1},
AnimationRate -> 3, AnimationRunning -> True,
AnimationDirection -> Forward, AnimationRate -> .1]
The gif doesn't really do it justice; to get the full effect I suggest you run the code in your own copy of Mathematica.
[1]: https://en.wikipedia.org/wiki/String_art
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=stringart.gif&userId=66744John Shonder2018-12-01T21:45:03ZCalculate and plot the roots of a polynomial?
https://community.wolfram.com/groups/-/m/t/1565716
Hi, on mathematica I have represented the following polynomial a * x ^ 4 + b * x ^ 2 + c * x + 2 using the "Plot" command and, through the "Manipulate" command, it is possible to vary the parameters a, b, c. Now, however, I would like the program to give me back the roots of the polynomial according to the parameters a, b, c .... could you help me kindly?
This is the code:
Manipulate[
Plot[a*x^4 + b*x^2 + c*x + 2, {x, -20, 20},
PlotRange -> {{-20, 20}, {-20, 20}}],
{a, -1, 1}, {b, -10, 10}, {c, -10, 10}, ControlPlacement -> Right]Pasquale Rossi2018-12-04T19:00:18ZDisplay a specific part of an output?
https://community.wolfram.com/groups/-/m/t/1563923
Hello,
I have created a code that can expand an expression then groups the output in terms of exponential powers. My code deals with the Homotopy Analysis Method. In this method the goal is to collect secular terms. As my interest is only these terms I am inquiring to see if there is a way to tell Mathematica to display only these terms and not the rest of the expansion. Below is an image of the expansion and collection of terms. I just want the output to display e^(i*w*t). I've attached the code for reference. Any help is appreciated.
![I just want the output to display e^(i*w*tau)][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=mathematicacode.JPG&userId=1190441Christopher Reyes2018-12-02T04:39:48ZAvoid issue with bracket size?
https://community.wolfram.com/groups/-/m/t/1564953
Hello,
I try to write a basic expression in mathematica.
]-pi/2,pi/2[
When I use open close brackets, their size match the size of the expression :
![enter image description here][1]
When I use open bracket on the left and close on the right, it is the same :
![enter image description here][2]
But as soon as I want to use open bracket on the right of the expression, the right bracket display in small :
![enter image description here][3]
Do you please have an idea how to fix this ?
Thank you for kind help
best Regards
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1.jpg&userId=1475502
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2.jpg&userId=1475502
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3.jpg&userId=1475502Morgan Bourgeois2018-12-03T22:30:52ZNonlinear feedback system
https://community.wolfram.com/groups/-/m/t/1564351
I have a set of nonlinear equation which i have solve it by using AffineStateSpaceModel. My code is given below. I have the following query
1.Is it correct to use OutputResponse syntax to find the solution of the AffineStateSpaceModel.
2.I use interpFN to extract each of the output from the solution. Is there any alternative way to extract the solution so that i can plot the graph.
3.And finally I wanted to use If condition as input value which I am unable to do it.
Kindly help me. Thanks in advance
{i1 = 10, i2 = -1, i3 = 0.9, i4 = Abs[Sqrt[1 - i3^2]], mu1 = 1,
mu2 = 0, mu3 = 0}
nsys = AffineStateSpaceModel[{{x3, x4, 0, 0, 0, 0, 0.6 x9, 0.6 x10, 0,
0, 0, 0},
{{0, 0}, {0, 0}, {x5, 0}, {x6, 0}, {-x3, 0}, {-x4, 0}, {0, 0}, {0,
0}, {0, 0.6 x11}, {0, 0.6 x12}, {0, -0.6 x9}, {0, -0.6 x10}},
{x1, x2, x7, x8, x1 - x7, x2 - x8, 0.6 x10 - x4, x3 - 0.6 x9}},
{{x1, i1}, {x2, i2}, {x3, i3}, {x4, i4}, {x5, -i4}, {x6, i3}, {x7,
0}, {x8, 0}, {x9, 1}, {x10, 0}, {x11, 0}, {x12, 1}}]
sol = OutputResponse[nsys,
{-mu1*Dot[
Normalize[{x1[t] - x7[t], x2[t] - x8[t]}], {0.6 x10[t] - x4[t],
x3[t] - 0.6 x9[t]}]
- mu2*
Integrate[
Dot[Normalize[{x1[t] - x7[t], x2[t] - x8[t]}], {0.6 x10[t] -
x4[t], x3[t] - 0.6 x9[t]}], t]
- mu3*
Dot[Normalize[{x1[t] - x7[t],
x2[t] - x8[t]}], {.36 x12[t] Dot[
Normalize[{x1[t] - x7[t], x2[t] - x8[t]}], {-x10[t],
x9[t]}], -.36 x11[t] Dot[
Normalize[{x1[t] - x7[t], x2[t] - x8[t]}], {-x10[t],
x9[t]}]}],
Dot[Normalize[{x1[t] - x7[t], x2[t] - x8[t]}], {-x10[t], x9[t]}]},
{t, 0, 300}];
u1 = interpFN = sol[[1]];
u2 = interpFN = sol[[2]];
u3 = interpFN = sol[[3]];
u4 = interpFN = sol[[4]];
u5 = interpFN = sol[[5]];
u6 = interpFN = sol[[6]];
u7 = interpFN = sol[[7]];
u8 = interpFN = sol[[8]];
ParametricPlot[{{u5, u6}}, {t, 0, 20}, Mesh -> 40,
GridLines -> Automatic]
{ParametricPlot[{{u1, u2}, {u3, u4}}, {t, 0, 15},
PlotLegends -> {"pursuer", "evader"}, Frame -> True,
GridLines -> Automatic, Mesh -> 10],
ParametricPlot[{{u1, u2}, {u3, u4}}, {t, 0, 20},
PlotLegends -> {"pursuer", "evader"}, Frame -> True,
GridLines -> Automatic],
ParametricPlot[{{u1, u2}, {u3, u4}}, {t, 0, 30},
PlotLegends -> {"pursuer", "evader"}, Frame -> True,
GridLines -> Automatic, Mesh -> 30],
ParametricPlot[{{u1, u2}, {u3, u4}}, {t, 0, 300},
PlotLegends -> {"pursuer", "evader"}, Frame -> True,
GridLines -> Automatic]}
r = EuclideanDistance[{u1, u2}, {u3, u4}]
Plot[r, {t, 0, 30}, GridLines -> Automatic, AxesLabel -> {t, "r"}]
gamma = Dot[Normalize[{u5, u6}], Normalize[{u7, u8}]]
Plot[gamma, {t, 0, 30}, GridLines -> Automatic,
AxesLabel -> {t, \[CapitalGamma]}]OBIROY LAIRENJAM2018-12-03T19:11:23ZSolve the Extended Generalized Bivariate Meijer G Function (EGBMGF)?
https://community.wolfram.com/groups/-/m/t/1564744
Hi everyone,
I am currently working on RF/FSO transmission systems. As a solution in the analytic expression, I obtained Extended Generalized Bivariate Meijer G Function (EGBMGF). To my best knowledge, the EGBMGF is not available in standard mathematical packages. How can I solve the problem numerically by using wolfram mathematica? How to calculate EGBMGF in mathematics? I deliver the analytical term of EGBMGF.
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=EGBMGF.jpg&userId=1564710Marko Smilic2018-12-03T13:53:30Z