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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Some help needed with for loop.

loittinen
1-Visitor

Some help needed with for loop.

I have been working on this for sometime now.

I have a for loop that I want to calculate and make diagrams of.

My problem is that how can I get all of the steps in the for loop?

See file attached.

I have been trying to find help from here and from other sources, but I still can't find a way to print/plot the steps.

I have heard that I should have used a other software to do this simulation but I wanted to work with this software.

THX in advance for the help. Lauri

3 REPLIES 3

Does the attached help?

You don't want the "[i" in the output array this will only give the last value for each of your variables (?)

Assigning the output of the program then allows the data calculated to be accesible to mathcad.

I'm not sure what you want to plot , so if you have further questions you will need to re-post.

Regards

Andy

Werner_E
25-Diamond I
(To:loittinen)

The attached file should help

RichardJ
19-Tanzanite
(To:loittinen)

You need to change the last line of the program to this:

augment.png

You will then get an error, because in the program you have mixed literal and vector subscripts where you want vector subscripts. For example, the assignment of alpha0 and X0. Also the assignment of Xi+1 based on Xi. many others too. You need to track all of these down and change the literal subscript to a vector subscript. Then each of the variables is a vector (of the same length), and augment will convert them to the columns of a matrix.

Announcements

Top Tags