Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Ideally when we use the vectors with function it should give solution for individual input. I think I am missing something?
Solved! Go to Solution.
I think I found it just needed to vectorize the equation.
I think I found it just needed to vectorize the equation.
The function you define in the picture you posted has an argument q which isn't used at all on the right definition size of your function.
So regardless what you provide as argument when you call that function, the result will be the very same scalar.
Of course if you call the function with a 3-element vector and vectorize the function call, the function is called three times and the result will be a 3-element vector with all the same values. I can't see much sense in doing so, though.