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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

selection of items in a Marix

ptc-5031132
1-Visitor

selection of items in a Marix

Hello everybody,

I need some help to select sevral lign in a matrix using a logical test and then create a vector which wwould summarize all selected items.

To be more accurate, my problem is to select the right "spring" cosidering given deflexion and maximum reaction load within this loading configuration. I already creat a fonction which calculat the reaction load for a given deflexion and spring model ( equ_paulstra_reactionload("matrix of the approximated polynomial coeficient which give reaction load in function of the deflexion","deflexion","ligne of the considered model" ). Then I would create a fonction which test each spring and put them in a vector using there reference.

I join my work done so far.

Thanks a lot for your elp,

regards,

Mathieu STAUCH

ACCEPTED SOLUTION

Accepted Solutions

Have a look if the attached is of any help.

I have added units to max_spring_reaction - you might want to change them

Mike

View solution in original post

10 REPLIES 10

You haven't defined Reaction_Spring.

Mike

My mistake,

Reaction_Spring is defined at the beginnig as max_spring_reaction. (I modified it but Im not able to send it on my response, sorry)

Mat

Have a look if the attached is of any help.

I have added units to max_spring_reaction - you might want to change them

Mike

Thak you very much!

one last think, could it be possible to simply remove all zero from that vector and then obtain a clear vector which summarize the possible spring?

Thanks a lot one more time,

Mat

Werner_E
25-Diamond I
(To:ptc-5031132)

Would the attached file help?

Only values which pass the condition are collected in the output vector. With your test data there is no difference seen as all values pass.

As Werner has shown, just remove the zero otherwise statement.

Mike

Mike Armstrong wrote:

As Werner has shown, just remove the zero otherwise statement.

Mike

Just removing the otherwise statement would still put the zeros in the resulting vector.

Oh, you also snuck the rows(P) feature in. I must pay more attention

Mike

cleaned up two programming errors.

Nothing attached Fred.

Mike

Announcements

Top Tags