Plotting with a step

Plotting with a step - Сообщения

#1 Опубликовано: 21.10.2021 07:28:01
Patukott

Patukott

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

Группа: User

Hello!
I have an equation y(x) that only produces results when x is an integer. When x is not an integer, like 4.5, the answer has imaginary numbers. I would like to plot this equation, but right now it does not give me a result. I think the problem is because of the imaginary numbers which is why I am trying to plot only when x is an integer. How could you do this in SMath?
#2 Опубликовано: 21.10.2021 15:36:59
Patukott

Patukott

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

Группа: User

Attached the file. The function I wish to plot is Ts(t). Right now it only plots the values when x<=0.

Steel temperature.sm (15 КиБ) скачан 36 раз(а).
#3 Опубликовано: 21.10.2021 18:26:29
overlord

overlord

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

Группа: Moderator

Wrote

Attached the file. The function I wish to plot is Ts(t). Right now it only plots the values when x<=0.

Steel temperature.sm (15 КиБ) скачан 36 раз(а).


Function has a recursion, it won't allow to continue from a certain point.
And I am pretty sure this plot is not what you want.

Try to eliminate the recursion by a different algorithm.
Maybe you should store numbers in a matrix and plot them later.

Regards

2021-10-22_00-23.png
#4 Опубликовано: 21.10.2021 19:40:41
Alvaro Diaz Falconi

Alvaro Diaz Falconi

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

Группа: User

Wrote

...
Maybe you should store numbers in a matrix and plot them later.



Following your suggestion.

Steel temperature.sm (21 КиБ) скачан 40 раз(а).

Imagen1.png

Best regards
Alvaro.
#5 Опубликовано: 21.10.2021 21:14:22
overlord

overlord

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

Группа: Moderator

Wrote

Following your suggestion.

Steel temperature.sm (21 КиБ) скачан 40 раз(а).


While me being so lazy you already did it.
Kudos, +1
#6 Опубликовано: 22.10.2021 06:46:56
Patukott

Patukott

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

Группа: User

Wow, didn't expect this to be so complicated. Thank you, I got it working now
#7 Опубликовано: 22.10.2021 08:18:20
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

Wow, didn't expect this to be so complicated. Thank you, I got it working now


Thanks for the project, saved in Project file.
Thanks Alvaro
Take care ... Jean

Project Steel temperature (Doctored Alvaro).sm (18 КиБ) скачан 34 раз(а).

#8 Опубликовано: 22.10.2021 17:57:38
overlord

overlord

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

Группа: Moderator

Wrote

Wow, didn't expect this to be so complicated. Thank you, I got it working now


Some functions are complicated, some are not.
And there are SMath differences to other software.
Experienced users shall try to solve the problem.
Feel free to ask the forum.

Regards
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений