Samir Khan

1324 Reputation

14 Badges

12 years, 84 days

My role is to help customers better exploit our tools. I’ve worked in selling, supporting and marketing maths and simulation software for all my professional career.

I’m fascinated by the full breadth and range of application of Maple. From financial mathematics and engineering to probability and calculus, I’m always impressed by what our users do with our tools.

However much I strenuously deny it, I’m a geek at heart. My first encounter with Maple was as an undergraduate when I used it to symbolically solve the differential equations that described the heat transfer in a series of stirred tanks. My colleagues brute-forced the problem with a numerical solution in Fortran (but they got the marks because that was the point of the course). I’ve since dramatized the process in a worksheet, and never fail to bore people with the story behind it.

I was born, raised and spent my formative years in England’s second city, Birmingham. I graduated with a degree in Chemical Engineering from The University of Nottingham, and after completing a PhD in Fluid Dynamics at Herriot-Watt University in Edinburgh, I started working for Adept Scientific – Maplesoft’s partner in the UK.

MaplePrimes Activity


These are replies submitted by Samir Khan

@nm You're not the first person to suggest built-in plot themes :)

@mmcdara You're right, the grey background does look like that in ggplot2

@Scot Gould and I had a very productive conversation about the physics of this problem. He commented on and identified mistakes in the application posted recently on the App Center, and I learned a lot from the approach in his document. Thank you @Scot Gould!

@student_md This is a long requested feature. There are no built-in tools but some of our users have come up with clever workarounds

@Carl Love Thank you for pointing this out. While we clear up the definition of Katz centrality, I'll remove that section from the worksheet.

@nm I'll make sure this lands on the right desk

@Christopher2222 What would you like to see in an Astronomy package?

@nm We are listening :) An improved debugger is something many of our customers have requested.

By the way, Maple 2020's new LaTeX export is better. The LaTex generated for your example here has improved

eq:=-(1/2)*1/y = (1/3)*x^3+z:
sol:=solve(eq,y):
latex(sol)

now produces

-{\frac {3}{2\,{x}^{3}+6\,z}}

which renders as

@Christopher2222 I'd love to support more audio import formats!

@mmcdara I wrote a brief explanation here

@Carl Love 
Let's say I start off with these points

X := Array([558, 533, 512, 509, 519, 538, 527, 501, 485, 493, 499, 499, 465, 406, 413, 441, 430, 406, 397, 393, 392, 397, 403, 406, 397, 365, 356, 354, 326, 311, 336, 355, 315, 278, 278, 249, 242, 232, 204, 208, 209, 204, 206, 242, 242, 263, 274, 287, 334, 361, 320, 314, 344, 355, 360, 379, 406, 407, 399, 393, 391, 394, 404, 415, 439, 431, 402, 438, 487, 503, 497, 486, 488, 514, 538, 537, 511, 508, 518, 546]):
Y := Array([420, 412, 431, 480, 522, 505, 444, 431, 480, 591, 605, 548, 444, 416, 426, 478, 516, 533, 488, 395, 305, 356, 463, 525, 418, 414, 488, 465, 416, 458, 497, 495, 463, 409, 488, 514, 458, 512, 441, 441, 485, 412, 508, 493, 463, 516, 437, 403, 503, 482, 495, 429, 416, 499, 439, 407, 490, 533, 392, 309, 333, 452, 520, 529, 499, 452, 418, 416, 492, 593, 606, 544, 448, 429, 482, 518, 508, 450, 424, 414]):

plot(X, Y, style = point)

If I squint my eyes, that might say "maple".

DFT of X and Y points

dft_X := Vector(SignalProcessing:-FFT(X)): 
dft_Y := Vector(SignalProcessing:-FFT(Y)):

Phase and amplitude of sines

n  := numelems(X):

P_X  := Re(argument~(dft_X[2..ceil(n / 2)])):
A_X  := abs(dft_X[2..ceil(n / 2)]):

P_Y  := Re(argument~(dft_Y[2..ceil(n / 2)])):
A_Y  := abs(dft_Y[2..ceil(n / 2)]):

Parametric curves

curve_X := evalf[3](add(seq(A_X[i] * sin(Pi / 2 - 2 * Pi / n * i * t + P_X[i]), i = 1..ceil(n / 2) - 1)));
curve_Y := evalf[3](add(seq(A_Y[i] * sin(Pi / 2 - 2 * Pi / n * i * t + P_Y[i]), i = 1..ceil(n / 2) - 1)));

Plot the parametric curves

plot([curve_X, curve_Y, t = 0 .. n / 2])

I'll upload a complete application to the Application Center soon. It'll include an interactive plot to draw a curve (or some "handwritten" text) to get the 2d discrete data.

This was all inspired by Michael Trott's blog post at Wolfram.com. I also adapted the core code from a discussion at mathematica.stackexchange.com

@Carl Love That's coming. Let me tidy up the worksheet

@Christopher2222. I'd be interested to know what your use case for MP3 support is. Once the MP3 is in Maple, what will you do with the data?

@Spinosaurus That's a scalogram, isn't it?

@Markiyan Hirnyk The approach in @stan2018's worksheet is the standard Hough Transform - this is only practical for small images and a small parameter space (rho and theta).

I've reduced the size of your image, and analyzed it with another implementation of the standard Hough Transform (see the attached worksheet and image).

These are the lines detected in your image. If you tweak the parameters, you could certainly detect other lines.

Other approaches are needed for larger images (randomized or probalistic Hough Transforms, or implementations on GPUs).

Hough_Transforms_Football.zip

1 2 3 4 5 Page 1 of 5