Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline RegRetired  
#1 Posted : 14 May 2024 09:49:31(UTC)
RegRetired


Rank: Advanced Member

Groups: Registered
Joined: 03/06/2023(UTC)
Posts: 61
Man
United States

Was thanked: 1 time(s) in 1 post(s)
I have developed a FILON FOURIER TRANSFORM in MATHCAD 15 that works. I am trying to do the same thing in SMATH. The process requires computing the even and odd parts of the final answer. When I form the equation as a function, I cannot evaluate it at the time points; therefore, I cannot create the even and odd parts. If I form the equation with indices, it works; however, I cannot define the even and odd parts with this formulation, or I don't know how.

See the attached SMATH file. I have reduced the time and frequency points so it runs in less than 3 seconds just as an example of my lack of understanding for evaluating function.

FILON DEVELOLPMENT TESTING.sm (142kb) downloaded 9 time(s).

Thanks for any help.
Reg
Reg Curry
Loveland, CO

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline StvMath  
#2 Posted : 14 May 2024 22:17:16(UTC)
StvMath


Rank: Advanced Member

Groups: Registered
Joined: 26/07/2022(UTC)
Posts: 42
United Kingdom
Location: UK

Was thanked: 30 time(s) in 26 post(s)
Seems to work (slowly) this way:

FILON DEVELOLPMENT TESTING_b.sm (150kb) downloaded 14 time(s).
thanks 1 user thanked StvMath for this useful post.
on 15/05/2024(UTC)
Offline Razonar  
#3 Posted : 15 May 2024 07:53:40(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,407
Uruguay

Was thanked: 857 time(s) in 543 post(s)
Originally Posted by: StvMath Go to Quoted Post
Seems to work (slowly) this way:

FILON DEVELOLPMENT TESTING_b.sm (150kb) downloaded 14 time(s).


Hi. This version is a little bit faster.

FILON DEVELOLPMENT TESTING_c.sm (150kb) downloaded 10 time(s).

Best regards
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 15/05/2024(UTC)
Offline RegRetired  
#4 Posted : 15 May 2024 10:21:08(UTC)
RegRetired


Rank: Advanced Member

Groups: Registered
Joined: 03/06/2023(UTC)
Posts: 61
Man
United States

Was thanked: 1 time(s) in 1 post(s)
Thanks guys for your helpful input. I will give it a try.
Being a brute force type of programmer, in the meantime, I decided to try something. I created a second calculation at negative times using the range variable as before. Now, I have a positive time and a negative time result from which to calculate the even and odd parts. The results are shown in the attached PDF for 30 time points per decade and 100 frequency points per decade. These definitions are in the blue area for time and orange area for frequency.

SMATH FILON TRANSFORM.pdf (628kb) downloaded 13 time(s).

With the increased time and frequency points per decade, it runs for almost 4.5 minutes. The transform is very good. If I keep the original time and frequency points per decade = 10 as in my original submittal, it runs for 7.6 seconds; however, the transform is not very good as shown in this figure.

Screenshot 2024-05-14 135545.png

If interested, the full code equivalent to the PDF is provided here. Auto Calculate is turned off.

FILON DEVELOLPMENT.sm (198kb) downloaded 4 time(s).

The advantage of the Filon method is that it does not require evenly spaced time or frequency points over the entire range of the transform. This is very useful for problems that range for 10^-10 seconds to tens of minutes (e.g., High Altitude EMP coupling to systems which include the very late time MHD signal, which is comparable to the most severe geomagnetic storms). In addition, how well the even and odd functions agree is a measure of how good the transform is.

Just an FYI, in MATHCAD 15 this calculation runs for only one minute for 100 time points per decade and 300 frequency points per decade to give an extremely good transform.

Three lasting issues:
1. The transforms should be real as in MATHCAD. In SMATH they are complex; therefore, I plotted the absolute value as a sort of workaround. Have not had the energy to work through the algebra to prove the transform should be real.
2. Is there anyway in SMATH to include the text about spacing h and frequency points per decade on top of the graph? I placed it below because it always appeared under the graph if I tried to place it on top of the graph.
3. The graph is a ZED Graph. Is there anyway to express the y-axis with exponential notation without resorting to a log scale?

Thanks again for you help. I will try your methods.
Reg
Reg Curry
Loveland, CO
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.