cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead 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

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

Hans_Westerweel
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

Werner_E_0-1668030265082.png

and continuing with

Werner_E_1-1668030312624.png

Voilà!

 

According the solve  block all that is needed is to provide a vector as a guess and vectorize both sides of your equation:

Werner_E_2-1668030390505.png

 

 

 

View solution in original post

6 REPLIES 6

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:

LucMeekes_0-1668029168540.png

with as result:

LucMeekes_1-1668029187346.png

Success!
Luc

ttokoro
19-Tanzanite
(To:LucMeekes)

image.pngimage.pngimage.png

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

Werner_E_0-1668030265082.png

and continuing with

Werner_E_1-1668030312624.png

Voilà!

 

According the solve  block all that is needed is to provide a vector as a guess and vectorize both sides of your equation:

Werner_E_2-1668030390505.png

 

 

 

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

Top Tags