Function not delivering right results with range variable

Function not delivering right results with range variable - Function not delivering right results with range variable - Сообщения

#1 Опубликовано: 10.07.2019 14:20:09
Sarvesh Ambekar

Sarvesh Ambekar

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

Группа: User

I have a very basic question to make.
Please review attached file defined to compute stress and deflection of simply supported beam.
The function for Bending moment, stress and deflection are defined with variable x which is defined over the length of beam.

All functions except deflection return right results except deflection. The value shown as a result with function x results incorrect results but when individual values of x is passed on to the function then the results are accurate.

I with to understand what seems to be the issue?

File attached.
Cantilever_beam.sm (23 КиБ) скачан 41 раз(а).
Regards
Saviind
#2 Опубликовано: 10.07.2019 14:52:36
sergio

sergio

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

Группа: User

When an evaluation is performed for multiple values (inserted in a vector) you must perform element-by-element evaluation with the "vectorize" function. I also advise you not to use "x" either as a function variable or with vector containing the evaluation points

Cantilever_beam_s.sm (24 КиБ) скачан 65 раз(а).

sergio
#3 Опубликовано: 10.07.2019 16:30:38
Sarvesh Ambekar

Sarvesh Ambekar

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

Группа: User

Sergio@PompelmoTell
Thanks for your advice & support.

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