×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# range variable won't work: "must be a scalar or matrix

## range variable won't work: "must be a scalar or matrix

(OP)
i] is the variable, however when put in an equation, mathcad says "this value must be scalar or a matrix"

I have followed the steps on the PTC tutorial website videos but still no luck despite doing exactly what they're doing.

Thanks

### RE: range variable won't work: "must be a scalar or matrix

Unfortunately, it is often difficult to diagnose a Mathcad problem form just a screenshot; posting your worksheet is usually better (together with a screenshot showing your problem - it may work on somebody else's machine!).

There can be quite marked functional differences between objects that look typographically identical. What I think you have done is use the subscript button to enter i on the left hand side of the definition. What you should have used is the matrix index operator ... typing 'x' then '[' then 'i' should give you the result you want. The subscript button allows you to create a name with a subscripted part, such as xinit meaning, say, the scalar variable holding the initial value of x rather than a vector element with index init

### RE: range variable won't work: "must be a scalar or matrix

Why do you type x[i= to get an answer? it should be x= or e.g. x[5=

### RE: range variable won't work: "must be a scalar or matrix

Occupant,

you are right in that x= would be the simplest form to show x's value. However, xi is a valid form and may be useful when one only wants to display, say, the first 5 values (i:=0..4) or every other value (i:=0,2..last(x)).

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!