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

Matrix Power Method - Subscript (n-1) into programing

jroth
5-Regular Member

Matrix Power Method - Subscript (n-1) into programing

Hello,

I am having issues in getting a subscript of n-1 to work in the programing of a matrix power method. Primarily, I'm wanting to express a function of just one number or variable (say n). By doing this, I want to take the norm of v(n) divided by the norm of v(n-1), with the output being that division. However, I'm uncertain in how to get the proper labeling of subscripts to get my output I'm wanting.

4 REPLIES 4
Werner_E
25-Diamond I
(To:jroth)

I am not sure what you are searching for. Are you after something like this?

07.10.png

Or are you trying to create vectors (which ones)?

BTW, your function r() could be written that way, too

07.10.png

Please state which version of Prime you are using. PTC in its wisdom has decided that Prime 2 and Prime 3 files have the same extensions but the formats are incompatible. P2 would not be able to read P3 files and P3 is not able to write in P2 format. So if you still use Prime 2 its very likely you get an answer file in P3 format your version cannot read.

jroth
5-Regular Member
(To:Werner_E)

I solved it. I went the route you were mentioning and used the function twice with a step lower. I was hoping for a logic in the summation itself, but that neatly ties it up.

Werner_E
25-Diamond I
(To:jroth)

Still not sure what you tried to find, but glad you found a solution.

jroth
5-Regular Member
(To:Werner_E)

For reference, here is the completed file.

Announcements

Top Tags