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
Please help with writing a program to do the following.
Also, if "A" matrix is n rows, "B" matrix will always be n x n.
Solved! Go to Solution.
Here's one way ...
Thank you StuartBruff.
However the following won't work for me, but it's not like I need it anyway.
I get the error "this value must be an integer" for 'k'
Get rid of the in-line evaluation of k and it should work.
By using the in-line evaluation, you are unknowingly converting k from a range variable to an array.
Thank you
I see you beat me to it, Mark!
Stuart
Hunter Riek wrote:
Thank you StuartBruff.
However the following won't work for me, but it's not like I need it anyway.
I get the error "this value must be an integer" for 'k'
Unfortunately, it's difficult to know why you're getting this problem from just looking at screen shot; there are a number of little "Mathcadisms" that can make different expressions look visually similar (eg, array indices and name subscripts ... these are a common trap for novices and the forgetful!). In addition, it may be that something else above the region of interest is affecting the results (or even a global definition that occurs after the region!). Or even something in a region that is (partially) hidden by another region.
I'm guessing that that source of the problem is the evaluation operator (=) that you've got after the range variable k definition. This has the side-effect of converting the range into a vector. As you need to use integers as array indices, Mathcad is going to squawk about k being a vector.
I was intrigued with this problem to see if there was a way to accomplish the same thing without a Mathcad program. It took me awhile, but here it is.
Hi.
Two more ways.
Best regards.
Alvaro.