Hi there,
Is anyone aware where can I find more DPlot Macro examples?
I am specifically looking for data processing Macros like generating PSD's from time history data and manipulating the time history.
Excel can't handle over 64000 rows and I can not do manipulations there.
There are couple of Macro examples that come with Dplot but it is not enough to teach someone the Macro language from scratch.
Thanks,
Roni Plachta
Macro Examples - PSD and data processing
Moderator: DPlotAdmin
-
- Posts: 1
- Joined: Sat Dec 02, 2006 10:10 am
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
There is no macro repository on the site, but if you have specific questions about how to do something I'll be happy to answer them.
To generate the PSD:
FFTMethod(1)
FFT()
EditOperateY("Y^2")
FFTMethod(1) says "Don't pad the input record with 0's out to the next power of 2". As an aside, I may get rid of this option in a future release. For large records with large prime factors, the FFT calculation time can be long, but "long" is getting shorter all the time and there's no mathematical justification for padding with 0's.
To generate the PSD:
FFTMethod(1)
FFT()
EditOperateY("Y^2")
FFTMethod(1) says "Don't pad the input record with 0's out to the next power of 2". As an aside, I may get rid of this option in a future release. For large records with large prime factors, the FFT calculation time can be long, but "long" is getting shorter all the time and there's no mathematical justification for padding with 0's.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Noted
As long as you more or less understand what you're doing I suppose there's no harm in it. I should probably add a few examples showing how that option can give less-than-perfect results at some frequencies in certain cases.
As long as you more or less understand what you're doing I suppose there's no harm in it. I should probably add a few examples showing how that option can give less-than-perfect results at some frequencies in certain cases.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I'm no expert at FFTs either, but you can experiment with simple stuff like sine waves to see the difference. Just off the top of my head I tried this:
Y=sin(100*pi*X) with 0<X<4 and dX=0.0001
In a perfect world the FFT would show a single spike at 50Hz and 0's everywhere else. And that's very close to what you get if you check "Run the FFT as is". If you pad with 0's (which adds 25535 0's to your 40001 input points) you get the same spike at (close to) 50Hz and smaller nonsense values on either side of 50Hz. This admittedly isn't a bad problem in this case, but I'm reasonably sure I can come up with worse examples once I put my thinking cap on.
Y=sin(100*pi*X) with 0<X<4 and dX=0.0001
In a perfect world the FFT would show a single spike at 50Hz and 0's everywhere else. And that's very close to what you get if you check "Run the FFT as is". If you pad with 0's (which adds 25535 0's to your 40001 input points) you get the same spike at (close to) 50Hz and smaller nonsense values on either side of 50Hz. This admittedly isn't a bad problem in this case, but I'm reasonably sure I can come up with worse examples once I put my thinking cap on.
Visualize Your Data
support@dplot.com
support@dplot.com