Reputation
3,509
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 7 12
Newest
 Revival
Impact
~50k people reached

  • 0 posts edited
  • 0 helpful flags
  • 148 votes cast
Nov
15
comment Line Integral Difficulty
You can evaluate this integral symbolically using Integrate[(x y)/(1 + x + 2 y) /. {x -> Cos[\[Theta]], y -> Sin[\[Theta]]}, {\[Theta], 0, \[Pi]/2}].
Nov
9
comment Creating rectangles from “ImageCorners” output
boxes = image // Binarize // ColorNegate // ComponentMeasurements[#, "BoundingBox"][[All, 2]] & followed by Graphics[{FaceForm[], EdgeForm[Black], Rectangle @@@ boxes}] to verify the result.
Oct
23
comment How to patch fingerprint ridges
Do you have a greyscale image from which your binary image is derived? It would be better to use greyscale rather than binary as your starting point.
Oct
22
comment Periodic boundary condition
You can get Mathematica to solve this analytically by evaluating DSolve[{D[u[x, t], t] == D[u[x, t], x], u[x, 0] == Sin[\[Pi] Cos[x]]}, u, {x, t}], which gives {{u -> Function[{x, t}, Sin[\[Pi] Cos[t + x]]]}} in version 10.3.
Oct
10
comment Image transformation to break up connected components
Here's a solution: ImageCorrelate[image, GaussianMatrix[3]] // MaxDetect // ComponentMeasurements[#, "Centroid"][[All, 2]] & // VoronoiMesh // HighlightMesh[#, {Style[1, Red], Style[2, Opacity[0]]}] & // Show[image, #] &. The sequence of operations, reading left to right along the processing pipeline, is smooth to reduce noise, detect peaks, find centroids of peaks, convert to Voronoi mesh, highlight the mesh itself but make its cells invisible, overlay the mesh on the original image.
Oct
7
comment Examples of using Mathematica to solve matrix equations symbolically
NCAlgebra might be what you are looking for — see here .
Oct
6
comment System cannot be solved with methods available
It helps to start by visualising your function (difference between the left and right sides of your equation) by creating contour plots in the complex P plane, so you can see where the function's zeros are likely to be. For instance, you could start with ContourPlot[Abs[func[x + I y]], {x, 0, 10}, {y, -2, 2}] (Arg is done analogously).
Oct
5
comment NSolve not working
This works: NSolve[f1[x] == f2[x] && -3 < x < 3, x]. I arrived at this after I had a look at the plot Plot[{f1[x], f2[x]}, {x, -5, 5}].
Oct
3
answered HoldForm -> InputForm without processing the contents
Oct
3
comment HoldForm -> InputForm without processing the contents
The replacement HoldForm[x__] :> HoldForm[InputForm[x]] seems to do what you want.
Sep
29
comment Why does this simple sum function fail to compile?
The third argument of Compile might be what you need — e.g. Compile[{{x, _Real, 2}}, Sum[x[[i, k]]*x[[j, k]], {k, 5}, {i, 12}, {j, i + 1, 12}], {{i, _Integer}, {j, _Integer}, {k, _Integer}}].
Sep
22
comment Can I OCR Mathematica code on an image?
You might be able to solve your problem by extending the method that I gave in my answer to Applying TextRecognize on alpha-numerical table.
Sep
21
comment Challenge: deblurring images
You can "improve" the blurred Lena image — call it lenablurred — with something as simple as Manipulate[Sharpen[lenablurred, r], {r, Range[1, 20], ControlType -> Slider}].
Sep
19
comment Approximate UnitStep for use in Enterprise CDF
Yet again, I mistyped. fstr should be f. My apologies.
Sep
19
comment Approximate UnitStep for use in Enterprise CDF
To check string versus symbol input inside your Manipulate, evaluate this: Manipulate[Column[{Head[f], f, Plot[ToExpression[fstr][x], {x, -2 Pi, 2 Pi}]}], {f}]. In Mathematica, if I type Sin or "Sin" into the input field, followed by Return, then I get the expected sine wave plot in both cases, and some information about f. Now it's over to you to try this in an EnterpriseCDF. What happens?
Sep
19
comment Approximate UnitStep for use in Enterprise CDF
Of course, I meant to write InputField[Dynamic[x],String].
Sep
19
comment Approximate UnitStep for use in Enterprise CDF
Is it not possible to use InputField[x,String], and then convert the string x to an expression using ToExpression[x]? I would be very disappointed indeed if at least the first step of this 2-step process doesn't work in an EnterpriseCDF, so I would like to hear whether InputField[x,String] works as expected in an EnterpriseCDF.
Sep
9
comment Increasing the font size in the Vertexlabels of GraphPlot
Insert EdgeForm[Black] at the start of the list of graphics commands.
Sep
6
awarded  Revival
Aug
31
comment Avoiding misconversion of data with ToExpression function
SemanticImportString might solve your parsing problem.