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

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

#1 Posted: 9/2/2021 5:54:12 AM
1986max

1986max

0 likes in 9 posts.

Group: User

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

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

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

Вопрос 3 - Если параметру Ds возможно задать усреднение, будет ли автоматически верный расчет, когда будет меняться диапазон параметра ABC?File not found.File not found.File not found.File not found.File not found.
#2 Posted: 9/2/2021 8:03:52 AM
sergio

sergio

115 likes in 329 posts.

Group: 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 KiB) downloaded 26 time(s).
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 KiB) downloaded 19 time(s).
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 Posted: 9/2/2021 8:47:13 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

You can probably set all your conditions Bolean.

Utilities Discrete COMPANION_2 Bolean Discontinuous.sm (32 KiB) downloaded 25 time(s).
Utilities Discrete COMPANION_2 SubSpace Discontinuous.sm (35 KiB) downloaded 29 time(s).
#4 Posted: 9/2/2021 9:21:29 AM
1986max

1986max

0 likes in 9 posts.

Group: 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 KiB) downloaded 26 time(s).
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 KiB) downloaded 19 time(s).
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" - я пробовал сделать так же, но там у меня еще больше вопросов возникает. Например, если я беру границы диапазона так, чтобы в массив заносилось одно число, каким-то чудом туда заносится два числа. Пример на скрине.File not found.File not found.
#5 Posted: 9/2/2021 9:23:40 AM
1986max

1986max

0 likes in 9 posts.

Group: User

Wrote

You can probably set all your conditions Bolean.

Utilities Discrete COMPANION_2 Bolean Discontinuous.sm (32 KiB) downloaded 25 time(s).
Utilities Discrete COMPANION_2 SubSpace Discontinuous.sm (35 KiB) downloaded 29 time(s).



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

overlord

552 likes in 1332 posts.

Group: 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 KiB) downloaded 30 time(s).

2021-09-02_15-45.png
1 users liked this post
sergio 9/2/2021 11:22:00 AM
#7 Posted: 9/2/2021 11:21:47 AM
1986max

1986max

0 likes in 9 posts.

Group: 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 KiB) downloaded 30 time(s).

2021-09-02_15-45.png



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

Jean Giraud

983 likes in 6866 posts.

Group: 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 Posted: 9/2/2021 11:42:35 AM
overlord

overlord

552 likes in 1332 posts.

Group: Moderator

Wrote

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


That is ltlt(), a function of Custom Functions plugin.
1 users liked this post
Davide Carpi 9/2/2021 12:13:00 PM
#10 Posted: 9/2/2021 12:12:57 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: 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 Posted: 9/2/2021 9:47:16 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: 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 KiB) downloaded 21 time(s).
#12 Posted: 9/3/2021 4:30:48 AM
1986max

1986max

0 likes in 9 posts.

Group: User

Wrote

Wrote

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


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



Спасибо!
#13 Posted: 9/3/2021 4:31:48 AM
1986max

1986max

0 likes in 9 posts.

Group: 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 Posted: 9/3/2021 4:36:02 AM
1986max

1986max

0 likes in 9 posts.

Group: 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 KiB) downloaded 21 time(s).



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

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

1402 likes in 1708 posts.

Group: Moderator

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

2021-09-03_15-23-45.png
2021-09-03_15-21-36.png
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Davide Carpi 9/6/2021 10:35:00 AM
  • New Posts New Posts
  • No New Posts No New Posts