SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Function not delivering right results with range variable
Rank: Newbie
Groups: Registered
Joined: 09/07/2019(UTC) Posts: 3 Location: Mumbai
|
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 (24kb) downloaded 27 time(s).Regards Saviind
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/12/2011(UTC) Posts: 318 Location: italy Was thanked: 109 time(s) in 93 post(s)
|
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 (25kb) downloaded 50 time(s).sergio
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 09/07/2019(UTC) Posts: 3 Location: Mumbai
|
Sergio@PompelmoTell Thanks for your advice & support.
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Function not delivering right results with range variable
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.