Get Help

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
- :
- This value must be a scalar

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

Highlighted

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

07-25-2018
12:33 PM

07-25-2018
12:33 PM

i am using a table for various parameters used in later calculations. It all seems to be working well until page 5 of 8 where the error message "this value must be a scalar" is displayed for 2 of the calculations. Being relative new to mathcad i have not been able to find a solution to solve this error. any assistance would be appreciated.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

07-25-2018
02:56 PM

4 REPLIES 4

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

07-25-2018
01:09 PM

07-25-2018
01:09 PM

Re: This value must be a scalar

When you defined your table, you have defined B and the other 3 variables as vectors.

In your first failing calculation you used a comparison operator (<). You can only compare scalars, not vectors. Thats the reason for the error.

One way out would be to turn all calculations into function which are dependent by the for input variables B,L,D.f and D.w.

The variables have not to be defined before.

You can now define the variables and call this functions. If one of the variables is a vector, you have to vectorize (the arrow over the expression) that function call and Prime will feed the vector values singly into the function and returns a vector of the results.

I have done that here with the first calc which failed.

Less preferred (in my opinion) is a solution which uses a little program which runs via a for loop through all the values in your vectors:

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

07-25-2018
02:08 PM

07-25-2018
02:08 PM

Re: This value must be a scalar

thank you. in your last solution, what are the steps to initializing the variables within the program, i.e., placing the sub-subscript *i?*

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

07-25-2018
02:56 PM

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

07-25-2018
03:32 PM

07-25-2018
03:32 PM

Re: This value must be a scalar

thank you very much. your assistance is greatly appreciated.

Top Tags