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 已发布: 2019/7/10 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.97 KiB)已下载 1413 次。
Regards
Saviind
#2 已发布: 2019/7/10 14:52:36
sergio

sergio

127个赞,共342个帖子。

组: 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.16 KiB)已下载 1461 次。

sergio
#3 已发布: 2019/7/10 16:30:38
Sarvesh Ambekar

Sarvesh Ambekar

0个赞,共5个帖子。

组: User

Sergio@PompelmoTell
Thanks for your advice & support.

  • 有新帖
  • 无新帖