Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi, I noticed in the attached sheet that I couldn't integrate a function containing vector input. The same issue came up in my solve blocks trying to find a solution for an equation with vector input. I made a work around by splitting up the vector input in individual elements. Does anyone know a solution that doesn't involve splitting up the vector input? I have highlighted my questions in the attached sheet. Thank you!
Solved! Go to Solution.
It may be a good idea to set up the whole sheet in a quite different way.
First define the necessary calculations via function with all variable values as input arguments. Don't define any vector values yet.
Later you can call those function with the vectors as arguments and of course you should vectorize the function call.
I did it with the functions necessary for the integral, starting with
and continuing with
Voilà!
According the solve block all that is needed is to provide a vector as a guess and vectorize both sides of your equation:
You cannot use elements of an array as arguments to the Find function in a solve block.
You can use multiple expressions in a solve block though:
with as result:
Success!
Luc
Very elegant solution, thanks!
Thank you! Good to know you can add multiple expressions like that.
It may be a good idea to set up the whole sheet in a quite different way.
First define the necessary calculations via function with all variable values as input arguments. Don't define any vector values yet.
Later you can call those function with the vectors as arguments and of course you should vectorize the function call.
I did it with the functions necessary for the integral, starting with
and continuing with
Voilà!
According the solve block all that is needed is to provide a vector as a guess and vectorize both sides of your equation:
Oo yes that would be a good setup here. I'll make this one the solution since it answers both questions.
Thanks again for the detailed answer! Much to learn still haha