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

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

7-Bedrock

## Vector input: integrating and solve blocks (MathCad Prime 8)

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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:

6 REPLIES 6
23-Emerald III
(To:Hans_Westerweel)

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

19-Tanzanite
(To:LucMeekes)

7-Bedrock
(To:ttokoro)

Very elegant solution, thanks!

7-Bedrock
(To:LucMeekes)

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:

7-Bedrock
(To:Werner_E)

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

Announcements
Top Tags