Вопросы по массиву - вывод, усреднение

Вопросы по массиву - вывод, усреднение - 消息

#1 已发布: 2021/9/2 05:54:12
1986max

1986max

0个赞,共9个帖子。

组: User

Здравствуйте!)
Недавно начал в срочном порядке осваивать программу, стоит задача упростить на работе кое-какие расчеты, которые ведутся сейчас в ручную, и возникло несколько вопросов. Если совсем глупости спрашиваю, не кидайте в меня помидоры, я только учусь))

Итак, вопрос 1 - Есть параметр ABC, который лежит в определенном диапазоне. Диапазон может состоять как из целых чисел, так и из десятичных. От этого параметра у меня зависит параметр FX. Так вот, когда у меня диапазон из целых чисел, массив FX набирается корректно, а если десятичные, то расчет останавливается после 1 условия же.

Вопрос 2 - Продолжение моей программы. От того же параметра ABC у меня зависят параметры k и p, которые умножаются между собой для вычисления параметра Ds. После того, как параметр Ds посчитан, мне необходимо найти среднее значение получившегося массива. Подскажите пожалуйста как это сделать) И если это возможно сделать, то возникает следующий вопрос)))

Вопрос 3 - Если параметру Ds возможно задать усреднение, будет ли автоматически верный расчет, когда будет меняться диапазон параметра ABC?未找到文件。未找到文件。未找到文件。未找到文件。未找到文件。
#2 已发布: 2021/9/2 08:03:52
sergio

sergio

127个赞,共342个帖子。

组: User

Question 1): smath calculates the numbers in the range with a defined precision (precision error) and therefore the comparison is not respected. You can think of putting a tolerance for comparison as in the file I attach or reason for intervals such as you do for the calculation of "k"
question 1-2(s).sm (7.41 KiB)已下载 1218 次。
Question 2) The average can easily be calculated as in the file I attach or using the "Statistical Tool" plugin
question 3(s).sm (8.71 KiB)已下载 1151 次。
Question 3) As you set it no because if you change the range the comparison does not work. It is possible to better structuring the comparison function

sergio
#3 已发布: 2021/9/2 08:47:13
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

You can probably set all your conditions Bolean.

Utilities Discrete COMPANION_2 Bolean Discontinuous.sm (32.22 KiB)已下载 1254 次。
Utilities Discrete COMPANION_2 SubSpace Discontinuous.sm (35.14 KiB)已下载 1256 次。
#4 已发布: 2021/9/2 09:21:29
1986max

1986max

0个赞,共9个帖子。

组: User

Wrote

Question 1): smath calculates the numbers in the range with a defined precision (precision error) and therefore the comparison is not respected. You can think of putting a tolerance for comparison as in the file I attach or reason for intervals such as you do for the calculation of "k"
question 1-2(s).sm (7.41 KiB)已下载 1218 次。
Question 2) The average can easily be calculated as in the file I attach or using the "Statistical Tool" plugin
question 3(s).sm (8.71 KiB)已下载 1151 次。
Question 3) As you set it no because if you change the range the comparison does not work. It is possible to better structuring the comparison function

sergio



Вот это Вы мне очень помогли, огромнейшее спасибо Вам!)))

По поводу аналогии с "k" - я пробовал сделать так же, но там у меня еще больше вопросов возникает. Например, если я беру границы диапазона так, чтобы в массив заносилось одно число, каким-то чудом туда заносится два числа. Пример на скрине.未找到文件。未找到文件。
#5 已发布: 2021/9/2 09:23:40
1986max

1986max

0个赞,共9个帖子。

组: User

Wrote

You can probably set all your conditions Bolean.

Utilities Discrete COMPANION_2 Bolean Discontinuous.sm (32.22 KiB)已下载 1254 次。
Utilities Discrete COMPANION_2 SubSpace Discontinuous.sm (35.14 KiB)已下载 1256 次。



Ох, спасибо за отзывчивость, но для меня это слишком уж сложно)
#6 已发布: 2021/9/2 09:44:57
overlord

overlord

600个赞,共1,381个帖子。

组: Moderator

Wrote

Вот это Вы мне очень помогли, огромнейшее спасибо Вам!)))
По поводу аналогии с "k" - я пробовал сделать так же, но там у меня еще больше вопросов возникает. Например, если я беру границы диапазона так, чтобы в массив заносилось одно число, каким-то чудом туда заносится два числа. Пример на скрине.


Maybe this worksheet can help you.
As sergio mentioned, you will need statistical tools plug-in for easy average calculation.
And you will need custom functions plug-in for cases(), lelt(), etc.
Those are very essential, so they better be installed.

Floating pointed numbers are stored as divisions in SMath.
They make some difficulties with boolean expressions.
A tolerance could be helpful.
And you can reduce if blocks with cases.
You can also reduce boolean expressions with triple checks.
lele(), lelt(), ltle(), ltlt()
gege(), gegt(), gtge(), gtgt()

Regards

questions.sm (16.48 KiB)已下载 1202 次。

2021-09-02_15-45.png
1位用户喜欢此帖子
sergio 2021/9/2 11:22:00
#7 已发布: 2021/9/2 11:21:47
1986max

1986max

0个赞,共9个帖子。

组: User

Wrote

Wrote

Вот это Вы мне очень помогли, огромнейшее спасибо Вам!)))
По поводу аналогии с "k" - я пробовал сделать так же, но там у меня еще больше вопросов возникает. Например, если я беру границы диапазона так, чтобы в массив заносилось одно число, каким-то чудом туда заносится два числа. Пример на скрине.


Maybe this worksheet can help you.
As sergio mentioned, you will need statistical tools plug-in for easy average calculation.
And you will need custom functions plug-in for cases(), lelt(), etc.
Those are very essential, so they better be installed.

Floating pointed numbers are stored as divisions in SMath.
They make some difficulties with boolean expressions.
A tolerance could be helpful.
And you can reduce if blocks with cases.
You can also reduce boolean expressions with triple checks.
lele(), lelt(), ltle(), ltlt()
gege(), gegt(), gtge(), gtgt()

Regards

questions.sm (16.48 KiB)已下载 1202 次。

2021-09-02_15-45.png



Хорошо, понял, попробую разобраться с Вашим вариантов) Спасибо!) Сразу вопрос возник, а как Вы делаете запись 10
#8 已发布: 2021/9/2 11:35:23
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Ох, спасибо за отзывчивость, но для меня это слишком уж сложно)


Oh, thank you for your responsiveness, but it's too much for me
! Kamarad ! ... it's not too much for you in future projects.
#9 已发布: 2021/9/2 11:42:35
overlord

overlord

600个赞,共1,381个帖子。

组: Moderator

Wrote

Хорошо, понял, попробую разобраться с Вашим вариантов) Спасибо!) Сразу вопрос возник, а как Вы делаете запись 10


That is ltlt(), a function of Custom Functions plugin.
1位用户喜欢此帖子
Davide Carpi 2021/9/2 12:13:00
#10 已发布: 2021/9/2 12:12:57
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

Wrote

lele(), lelt(), ltle(), ltlt()
gege(), gegt(), gtge(), gtgt()



For reference,

gt = greater than
ge = greater or equal
lt = less than
le = less or equal

acronyms are paired from left to right
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#11 已发布: 2021/9/2 21:47:16
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

! Kamarad ! ... it's not too much for you in future projects.


Can these two be of any use for you ?
About the vector circulation example 2,
you can get a lot from 3 manipulations:
1. Shuffle vector 'v, increase length.
2. Play with the rotation,
3. Increase cols of 'M'.
Cheers ... Jean

Wavelet Haar.sm (157.45 KiB)已下载 1241 次。
#12 已发布: 2021/9/3 04:30:48
1986max

1986max

0个赞,共9个帖子。

组: User

Wrote

Wrote

Хорошо, понял, попробую разобраться с Вашим вариантов) Спасибо!) Сразу вопрос возник, а как Вы делаете запись 10


That is ltlt(), a function of Custom Functions plugin.



Спасибо!
#13 已发布: 2021/9/3 04:31:48
1986max

1986max

0个赞,共9个帖子。

组: User

Wrote

Wrote

lele(), lelt(), ltle(), ltlt()
gege(), gegt(), gtge(), gtgt()



For reference,

gt = greater than
ge = greater or equal
lt = less than
le = less or equal

acronyms are paired from left to right



Вот за это огромное спасибо, такая запись интереснее смотрится)
Скажите,а есть ли в программе описание плагинов?
#14 已发布: 2021/9/3 04:36:02
1986max

1986max

0个赞,共9个帖子。

组: User

Wrote

Wrote

! Kamarad ! ... it's not too much for you in future projects.


Can these two be of any use for you ?
About the vector circulation example 2,
you can get a lot from 3 manipulations:
1. Shuffle vector 'v, increase length.
2. Play with the rotation,
3. Increase cols of 'M'.
Cheers ... Jean

Wavelet Haar.sm (157.45 KiB)已下载 1241 次。



Очень интересно, попробую разобраться, спасибо!)
#15 已发布: 2021/9/3 07:25:14
Вячеслав Мезенцев

Вячеслав Мезенцев

1,558个赞,共1,868个帖子。

组: Moderator

Описание плагинов есть в интерактивном справочнике, который можно установить также как плагины, но из другого раздела.

2021-09-03_15-23-45.png
2021-09-03_15-21-36.png
Russia ☭ forever, Viacheslav N. Mezentsev
1位用户喜欢此帖子
Davide Carpi 2021/9/6 10:35:00
  • 有新帖
  • 无新帖