Skip to main content
1-Visitor
March 18, 2015
Question

How do you use undefined variables?

  • March 18, 2015
  • 1 reply
  • 6145 views

Hey everyone 🙂

So, I'm working on a system of equations, in which we have some unknown variables and some variables which are known (known in the sense that they can be anything that is chosen later on, they do not have any set numerical value yet).

I'm new to MathCad. How exactly do I go about using variables which have no actual numeral value yet? They are simply symbols that should be used when performing the necessary calculations to show how they relate to the unknown variables in the system. I haven't exactly been able to find an answer in the help documents I tried to search in. All they did show was how to define variables that either had numerical values, or stood in relation to some other variables. I just need to be able to name some identities that can be moved around as if they were just any type of number.

Thank you all 🙂

1 reply

19-Tanzanite
March 18, 2015

Define a function. In the function MyFunc(x):=A*sin(x), A would need to be defined before the function, but x would not because it's a parameter of the function. If you had MyFunc(x,A):=A*sin(x), then neither A or x need to be defined before the function.

krieder1-VisitorAuthor
1-Visitor
March 18, 2015

Thanks for the quick response!

However, is this really the only way to do this? The reason I'm asking is that I have a system of 8 unknown variables, where there is 5 known values, which we could call AOL, VCC, B, VBE, and VLED1, as well as R1, R2, and R3 (Resistor values) are something that will simply be chosen later on, depending on the design that you want.

This is for analysis of an electrical circuit. So, using the gaussian elimination method I simply tried to write my matrices up with these terms (AOL, VCC, etc..), and of course, as soon as I've written the matrix up with these symbols/identifiers, MathCad complains that they aren't defined, as I described in my original post.

So, to simply work with such symbols I would have to go through the trouble of defining arbitrary functions in which the symbols I want to use is a part of? That seems.. odd.

23-Emerald V
March 18, 2015

Kasper Rieder wrote:

Thanks for the quick response!

However, is this really the only way to do this? The reason I'm asking is that I have a system of 8 unknown variables, where there is 5 known values, which we could call AOL, VCC, B, VBE, and VLED1, as well as R1, R2, and R3 (Resistor values) are something that will simply be chosen later on, depending on the design that you want.

This is for analysis of an electrical circuit. So, using the gaussian elimination method I simply tried to write my matrices up with these terms (AOL, VCC, etc..), and of course, as soon as I've written the matrix up with these symbols/identifiers, MathCad complains that they aren't defined, as I described in my original post.

So, to simply work with such symbols I would have to go through the trouble of defining arbitrary functions in which the symbols I want to use is a part of? That seems.. odd.

I suppose it depends to some degree upon how you wish to use your variables.

If you could post a worksheet with a bit more detail, somebody might be able to suggest a different way of solving your problem. (For example, rather than using Gaussian elimination, you could possibly symbolically solve for your variables), or perhaps use the numerical solver to find what you want.

Stuart