cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Using MathCad

rpresto189
1-Newbie

Using MathCad

I think MathCad and I are not very compatible for some reason. Anyway, why does it complain about the following:

x:= 4,5..10

y:= x+2/x-3

It says that the variable x in the second equation is out of context. I know the range I have assigned to x is ok, so????

Ren
1 REPLY 1

The problem is the nature of x+2/x-3 when x is a range variable. It is a list of values, not a single value, nor a range variable, nor even a vector (although it can be displayed like a vector). A list of values cannot be assigned to a variable.

The rule that Mathcad uses to prevent this is that if a range variable appears in the expression to the right of :=, it must appear to the left. So you could write yx-4:=x+2/x-3. Now you have a list of variables on the left, and it can assign each of the values of the expression on the right to one of the variables on the left. That creates a vector out of the list of values, and you can then use normal vector concepts in handling the result.


Tom Gutman
Announcements