Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Range variables problem

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-27-2011
08:04 AM

03-27-2011
08:04 AM

Hi everyone,

I am trying to do some calculations using Mathcad 14 but I have a problem where variable of a function can't be assigned to a range of variables.

I am attaching the sheet, it would be appreciated if one could point the error.

Thanks

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-27-2011
08:25 AM

03-27-2011
08:25 AM

Yigit Turgut wrote:

Hi everyone,

I am trying to do some calculations using Mathcad 14 but I have a problem where variable of a function can't be assigned to a range of variables.

I am attaching the sheet, it would be appreciated if one could point the error.

Thanks

Yigit,

The reason for the problem is that when you make assignments using range variables as indices, then all range variables must appear on the left hand side of the assignment. The error message in this case arises because you don't use f on the left hand side.

I'm going to assume that you really want to sum over f in the right-hand expression, in which case the most obvious method is to use the range variable summation operator (available through the calculus toolbar). See attached.

Stuart

4 REPLIES 4

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-27-2011
08:25 AM

03-27-2011
08:25 AM

Yigit Turgut wrote:

Hi everyone,

I am trying to do some calculations using Mathcad 14 but I have a problem where variable of a function can't be assigned to a range of variables.

I am attaching the sheet, it would be appreciated if one could point the error.

Thanks

Yigit,

The reason for the problem is that when you make assignments using range variables as indices, then all range variables must appear on the left hand side of the assignment. The error message in this case arises because you don't use f on the left hand side.

I'm going to assume that you really want to sum over f in the right-hand expression, in which case the most obvious method is to use the range variable summation operator (available through the calculus toolbar). See attached.

Stuart

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-27-2011
03:19 PM

03-27-2011
03:19 PM

Re: Range variables problem

Or he could just use your vec function to create a vector instead of using a range variable.

Mike

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2011
05:23 PM

03-29-2011
05:23 PM

Re: Range variables problem

Thanks for the reply that seems to work for that far but I have a following problem where an index of an array can not be assigned as a matrix, for detail please see the attached file.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2011
06:09 PM

03-29-2011
06:09 PM

Re: Range variables problem

Sorry for the description, the problem is that the expression tries to take square root of the matrix which cholesky decomposition seem to be helpful.