IF / ELSE within for loop

IF / ELSE within for loop - Сообщения

#1 Опубликовано: 01.12.2021 14:29:34
ianlh

ianlh

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

Группа: User

Hi All,

I am trying to figure out how to do what probably is an easy task, but I just "cant see the woods for the trees".

I have the variables as shown, the first two are factors that relate to the next two variables that are the upper and lower bounds for the first set of variables, the final variable is the actual height that the first 4 variables are to be used to obtain an interpolated value. Note that the number of rows can vary depending on the initial values, but all 5 variables will have the same number of rows.

On the LHS is the logic per row of each, the first IF is used to stop the divide by zero that will be found by the ELSE, when both rows are the same, I have attempted to do this in the grey box, but don't get the right (expected) answer. This should work for any number of rows in the variables

Can anyone please point me in the right direction?
wind1.JPG
wind2.JPG

Wind-test.sm (258 КиБ) скачан 35 раз(а).
#2 Опубликовано: 01.12.2021 15:16:54
sergio

sergio

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

Группа: User

A bit of confusion with indexes
wind-test_s.sm (11 КиБ) скачан 46 раз(а).
sergio
#3 Опубликовано: 01.12.2021 15:47:20
ianlh

ianlh

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

Группа: User

Wrote

A bit of confusion with indexes
wind-test_s.sm (11 КиБ) скачан 46 раз(а).
sergio



So close, thank you. I will get all this programming one day!

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