Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Please find the below example:
I need to evaluate Cm which is a 6*6 matrix..im not able to find the right syntax,could you please help.
Prithivirajan Veerappan wrote:
Please find the below example:
I need to evaluate Cm which is a 6*6 matrix..im not able to find the right syntax,could you please help.
I'm not sure what your problem is from the image. Assuming that it's being able to use the arrays within the rest of the worksheet, then you need to assign the results of the for loops (the matrices) to appropriate variables. Any variable created within a program using the left arrow operator is local to that program and doesn't exist outside it.
It's also helpful if you post the worksheet rather than just an image. There are a few Mathcad constructs that look similar but are completely different in nature (eg, array index versus literal subscript). It also saves the respondents a lot of typing (and potentially adding mistakes of their own or not getting the entire context).
Stuart
Prithivirajan Veerappan schrieb:
Please find the below example:
I need to evaluate Cm which is a 6*6 matrix..im not able to find the right syntax,could you please help.
Help to achieve what? Its not clear to me what your goal is. I was just guessing and came up with the attached,
See if it helps. It looks like that, apart from problems with syntax, you have a wrong logic in your assignment as you are assigning three diagonal elements a value which you overwrite with different values soon after. This because the first and the last of your three if conditions are identical. So in my proposal I omitted the first one completely, which probably is not what you want to achieve.
BTW, don't just type "if" in a program to get a conditional branch, you have to get that structure from the appropriate palette or use the keyboard shortcut.