Syntax For Evaluating Functions

Syntax For Evaluating Functions - I do not understand the error message - Сообщения

#1 Опубликовано: 14.05.2024 03:49:31
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

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 (141 КиБ) скачан 64 раз(а).

Thanks for any help.
Reg
Reg Curry Loveland, CO
#2 Опубликовано: 14.05.2024 16:17:16
StvMath

StvMath

35 сообщений из 56 понравились пользователям.

Группа: User

Seems to work (slowly) this way:

FILON DEVELOLPMENT TESTING_b.sm (149 КиБ) скачан 66 раз(а).
1 пользователям понравился этот пост
RegC 15.05.2024 04:42:00
#3 Опубликовано: 15.05.2024 01:53:40
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1675 понравились пользователям.

Группа: User

Wrote

Seems to work (slowly) this way:

FILON DEVELOLPMENT TESTING_b.sm (149 КиБ) скачан 66 раз(а).



Hi. This version is a little bit faster.

FILON DEVELOLPMENT TESTING_c.sm (149 КиБ) скачан 67 раз(а).

Best regards
Alvaro.
1 пользователям понравился этот пост
RegC 15.05.2024 04:42:00
#4 Опубликовано: 15.05.2024 04:21:08
RegRetired

RegRetired

8 сообщений из 130 понравились пользователям.

Группа: User

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 (627 КиБ) скачан 68 раз(а).

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 (197 КиБ) скачан 59 раз(а).

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
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений