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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to read value of a matrix into a loop

Bartz87
1-Newbie

How to read value of a matrix into a loop

Hi,

I want to make a program that will test the value of h above, h is a matrix containing (1, 4, 11, 7), starting from top to bottom (1 then 4, 11, to 7), if h > 10, then stop the loop, when h is still less than 10, then the value of s will add to 1 and stop only when the condition is met. then extract the value of s into "section". What is possibly wrong or missing in my program.

Pls see the attach mathcad file. Thank you for your help

6 REPLIES 6
MikeArmstrong
5-Regular Member
(To:Bartz87)

Have a look at the attached.

Remember ORIGIN = 0.

Mike

Thank you very Mr. Armstrong

That really help....now I can program what I have in mind

You know I'm new to MCAD but i'm really interested in learning more

Thank you again for your help

MikeArmstrong
5-Regular Member
(To:Bartz87)

That really help....now I can program what I have in mind

You know I'm new to MCAD but i'm really interested in learning more

No problem at all. I have shown how this can be achieved using a for loop and Alan has shown the while loop method. A good starting point would be to learn the two different methods and understand the differences between them.

Read through the forum and ask questions when your stuck - basically teach yourself and learn from others that's the best way to learn.

Mike

Another possibility.

Alan

Hi Mr Stevens,

I've used your idea of the while loop in my program, but I have a problem. Pls see the attach MCAD file.

Neptali Barte wrote:

Hi Mr Stevens,

I've used your idea of the while loop in my program, but I have a problem. Pls see the attach MCAD file.

You need to include Fe etc inside the while loop.

Alan

Top Tags