Skip to main content
1-Visitor
March 4, 2011
Question

How to read value of a matrix into a loop

  • March 4, 2011
  • 6 replies
  • 4180 views

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

1-Visitor
March 4, 2011

Have a look at the attached.

Remember ORIGIN = 0.

Mike

Bartz871-VisitorAuthor
1-Visitor
March 5, 2011

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

1-Visitor
March 5, 2011
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

19-Tanzanite
March 4, 2011
Bartz871-VisitorAuthor
1-Visitor
March 7, 2011

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.

19-Tanzanite
March 7, 2011

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