Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I'm currently working on a Mathcad worksheet that adds the sums of two vectors and uses their result to solve an equation, but the variable I have defined to be the solved value keeps giving me the error that it isn't defined. I tried to break formula apart and the vectors are returning the error message "value must be a vector." Any help anyone could provide would be greatly appreciated.
Thank you in advance.
Talina
Solved! Go to Solution.
Striaght away I have found that epsilon[conc is not defined.
Mike
Is it not allowed to just be a placeholder in a function?
Ok yes I see. I think you need to go back through the calculation. It looks very complicated and hard to follow.
Instead of making all your equations functions with dependant variables, could you not define the iterated parameters as vectors at the top of your worksheet and work through that way?
Mike
Sadly no. Once I get the functions working, I have to repeat the equation about 8 times to generate a graph. I guess I could use vectors, but it would get messy with all of the iterations - at the time I thought that using functions was the lesser of the two evils.
There are a few issues that I can see:
1.
ε is first defined as an array & then re-defined as a function.
As a temporary fix I have changed the function to ε1
2.
ε is still causing a problem as it is a single element array while function f.s(ε.conc,c) needs 13 elements.
3.
function F.c is returning a scalar value so the summation in sum.c is unnecessary & confusing Mathcad.
There probalbly are more items to fix but until the ε array is corrected it isn't possible to determine the next step.
Regards
Andy
You are trying to combine vectors of different lengths. Firstly, you've defined c and epsilon.c as row vectors (Mathcad isn't really very keen on these - I'd redo them as column vectors if I were you). Secondly, they are a different length from vectors such as A.unc that you are trying to combine them with later.
Alan
Thank you all so much for your help. I didn't realize that certain functions were spitting out scalars while others were still producing vectors. I've gone through and modified things so the functions are working as they're supposed to, but the solve block is still returning the error message that the variable is not defined. Any suggestions?
Thank you again,
Talina
Ah, I see. Thank you very much for help!
Talina