Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hello,
I am trying to run this code and plot only "U" for the augmented matrix "R". However I am getting an error R has multiple definitions.
Please help!
Thanks
Solved! Go to Solution.
You never defined a variable R (its just a local(!) variable inside of your program). So Prime does not know if you mean the predefined unit R or the predefined constant R - hence the error message.
You defined a function which would have to be called to be evaluated. But as I think you just intended to create a vector R, you should assign the program to that variable.
Furthermore you were missing some multiplications and a pair of parenthesis (otherwise you run into a unit mismatch in the calculation of C).
Its not necessary to redefine e and also omega.n was already defined above.
The start and end value of your for-loop are wrong and off by 1.
But you now run into a unit mismatch in the definition of U. You can't add quantities with different dimensions!
You will have to check your formulas!
Try not using "R" as the variable name but use any other name, since R is already taken by other things including a unit and a constant. Alternatively, label R as a variable. (It's currently unlabelled with "automatic", which means Mathcad doesn't know what to do with it.)
PExact should also be labelled as a function.
(Watch this for more on how labels work)
https://www.youtube.com/watch?v=I68tKLGGEPc
When you try to evaluate PExact and error trace it (with the red error tracing arrows in the Calculation tab in the ribbon), it'll complain about this, which the error message says should be labelled as a function (given the parenthesis), but I don't think it can be given the line right before that defining Wn as a variable.
What do you mean to do with Wn to get to WD?
You never defined a variable R (its just a local(!) variable inside of your program). So Prime does not know if you mean the predefined unit R or the predefined constant R - hence the error message.
You defined a function which would have to be called to be evaluated. But as I think you just intended to create a vector R, you should assign the program to that variable.
Furthermore you were missing some multiplications and a pair of parenthesis (otherwise you run into a unit mismatch in the calculation of C).
Its not necessary to redefine e and also omega.n was already defined above.
The start and end value of your for-loop are wrong and off by 1.
But you now run into a unit mismatch in the definition of U. You can't add quantities with different dimensions!
You will have to check your formulas!