3,027 reputation
1629
bio website
location China
age
visits member for 1 year, 8 months
seen 21 mins ago

Feel free to correct the grammar mistakes in my posts.


Apr
14
comment Plotting Fourier spectrum versus frequency of a signal
Your suggestion for changing sample size to 2048 and using a triangle does work (if I've understood it correct). Maybe you can consider improving your answer when you become more familiar with Mathematica, most people here are not familiar with signal processing after all :D
Apr
12
comment Solution To Nonlinear System
Or have I misunderstand your equations? Does those notations mean $\begin{array}{ll} \{ & \begin{array}{ll} (\text{r1}-\text{x1})^2+(\text{r2}-\text{x2})^2+(\text{r3}-\text{x3})^2==f \\ \text{r1} \text{z1}+\text{r2} \text{z2}+\text{r3} \text{z3}==\text{y1} \text{z1}+\text{y2} \text{z2}+\text{y3} \text{z3} \\ \frac{\text{r1} \text{v1}+\text{r2} \text{v2}+\text{r3} \text{v3}-\text{v1} \text{x1}-\text{v2} \text{x2}-\text{v3} \text{x3}}{\sqrt{(\text{r1}-\text{x1})^2+(\text{r2}-\text{x2})^2+(\text{r3}- \text{x3})^2}}==d \\ \end{array} \\ \end{array}$
Apr
12
comment Solution To Nonlinear System
Are you sure the solution can be found on the order of seconds? My Mathematica didn't give result for more than an hour, and I asked for a friend of mine using Maple for help and the equations ate up all the memory of his old machine.
Apr
12
comment Solution To Nonlinear System
And I'm afraid that the answer given by Mathematica will still be long and ugly due to the nature of the equations… How long has it taken matlab to solve these equations? I guess what really troubles you is the solution given by matlab "will divide by zero if the coordinate system is oriented a certain way", right? Perhaps you can elaborate it?
Apr
11
comment How should I use precision in this code?
Hello, welcome to mathematica.se! Then if you can make some efforts to reproduce your problem in a minimum example rather than paste all your code here and ask for debugging, I think your question will draw more attention and escape from downvotes. BTW, you don't need to paste your question for times, just edit it by clicking the "edit" button at the left bottom of your question.
Apr
11
comment Mathematica does not respect tensor order?
To be more precise, $Assumptions only works on functions with Assumptions option :)
Apr
9
comment Always the same problem with Conjugate
Have you tried ComplexExpand?
Apr
8
comment Plotting Fourier spectrum versus frequency of a signal
If you want to call somebody in the comment, you need to write something like @jenson . BTW, I'm also interested in an explanation for the bad result of FourierDCT. (I roughly know that it's because Sin[x] is a odd function, but don't know how to explain it precisely. )
Apr
8
comment Plotting Fourier spectrum versus frequency of a signal
Er……can you show an example fixing OP's code with the method you suggested here?
Apr
8
comment Need help with C Code Generator
Personally I really feel this limit of Compile unreasonable… BTW, another way to circumvent it is to just use All i.e. matrix[[All, lag - i + 1 ;; columns - i + 1]].
Apr
2
comment Use de Casteljau algorithm to create Bezier Curve in Mathematica
Since I'm also not sure what OP is looking for, I'd like to leave this as a comment :) It's just a simplified version of your decasteljau: de[p_, t_] := Nest[MovingAverage[#, {1 - t, t}] &, p, Length@p - 1]
Apr
1
comment BVP system of nonlinear coupled ODEs
Then you'll have a hard time looking for a proper "StartingInitialConditions"……there're many examples for shooting method in this site, you can have a search.
Apr
1
comment How do you find the general solution to a higher order nonhomogeneous differential equation?
Have a look at the document of DSolve.
Mar
27
comment How to find discretezation error of NDSolve
The last part (Spatial Error Estimates) of this tutorial may be helpful?
Mar
27
comment periodicity of a solution of ndsolve pde
In fact the solution is not periodic, just analyse the 1st b.c.: Tanh[t] isn't periodic at all, it's monotone increasing, so the b.c. isn't periodic, then how can the solution be periodic?
Mar
26
comment Trying to solve a differential equation with a piecewise initial condition
DSolve can't handle heat conduction equation, consider NDSolve instead if a numerical solution is OK, or you can refer to this post.
Mar
26
comment ExpToTrig transforms solution to 4th order ODE into unwanted form
How about HoldForm@Evaluate@DSolve[a y''''[x] + b*y[x] == 0, y[x], x] /. E^x_ :> (Cos[-I x] + I Sin[-I x]) ?
Mar
25
comment Do you really want to quit the kernel? Yes!
For a better understanding of the second solution, I think it's better to mention this answer :)
Mar
21
comment Shooting method problem
Your code contains simple mistakes. the third argument of NDSolve should be {x, 0, 10}. What's the meaning of Map here? The equation in your code is different from the one at beginning: is it u''[x] - u'[x]/x or u''[x] - u'[x]? Your i.c. is inconsistent with what you choose in your "StartingInitialConditions", is it u[0.001]==0 or u[0.001]==1? The x[t] in your Plot should be u[t]. After correcting all this, your code can easily give a result with no error.
Mar
17
comment How do I solve a PDE with a strange boundary condition?
@george2079 Wow, this time it seems to be true! If so, it'll be the best news for me about v10 :D