Condition IF with egual / not equal

Condition IF with egual / not equal - Сообщения

#1 Опубликовано: 11.08.2021 14:39:37
Guingampe

Guingampe

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

Группа: User

Hi,
I have problem with "if with many conditions"

Image1 - conditions with equal - resultat error
Image2 - conditions with not equal - resultat OK


How to fix a formula?

Файл не найден.Файл не найден.Файл не найден.
#2 Опубликовано: 11.08.2021 15:18:52
sergio

sergio

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

Группа: User

It is not very clear what you want to achieve.
Compared to your procedure the two results are correct (but I'm afraid they are not the ones expected).
The procedure passes all rows of the Matrix and compares three elements. In the first case ( = ) at the first step the three equalities are verified but at the following steps no for which F1 is stored F1:=0 (correctly).
In the second case (not =) at the first step, the three inequalities are not verified, but the subsequent steps in the three inequalities are all verified, but in F1 is only stored the last of the values that replaces the previous calculated for rows 2 and 3 (correct).

sergio
#3 Опубликовано: 11.08.2021 15:36:11
Guingampe

Guingampe

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

Группа: User

The example with (not =) is irrelevant. Shows that the entire formula is correct.

I need to get the correct result in the second formula (=)

For this case the result should be 11 (first row meets the condition), not zero car first F1 = 0 + 22/2 = 11
This formula works for (not=) and not for (=)
#4 Опубликовано: 11.08.2021 15:53:45
sergio

sergio

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

Группа: User

look at this setting; it doesn't make much sense to do this but maybe it can help you understand SMath's behaviorSMathStudio_Desktop_zZNAjXAwdQ.png
sergio
#5 Опубликовано: 11.08.2021 16:36:18
CBG

CBG

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

Группа: User

Hello

This solves your problem

Imagen_IF.png

Test _CBG.sm (9 КиБ) скачан 20 раз(а).

Best Regards

Carlos
#6 Опубликовано: 11.08.2021 16:42:30
Guingampe

Guingampe

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

Группа: User

Thank you very much

All in all, I need the sum of this new matrix (F). And I did it like below

3.png

Thanks again for your help
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений