cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Vectorizing the solution

YY_10946939
2-Guest

Vectorizing the solution

Ideally when we use the vectors with function it should give solution for individual input. I think I am missing something? 

YY_10946939_0-1713777628939.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

I think I found it just needed to vectorize the equation. 

View solution in original post

2 REPLIES 2

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.

Top Tags