Function not delivering right results with range variable

Function not delivering right results with range variable - Function not delivering right results with range variable - Messages

#1 Posted: 7/10/2019 2:20:09 PM
Sarvesh Ambekar

Sarvesh Ambekar

0 likes in 5 posts.

Group: 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 KiB) downloaded 70 time(s).
Regards
Saviind
#2 Posted: 7/10/2019 2:52:36 PM
sergio

sergio

115 likes in 329 posts.

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

sergio
#3 Posted: 7/10/2019 4:30:38 PM
Sarvesh Ambekar

Sarvesh Ambekar

0 likes in 5 posts.

Group: User

Sergio@PompelmoTell
Thanks for your advice & support.

  • New Posts New Posts
  • No New Posts No New Posts