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
- :
- Help with if loop with array

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

01-20-2020
03:33 AM

01-20-2020
03:33 AM

There's no error in the worksheet, but the answer is incorrect. How do i define in Mathcad so that it would read each scalar in the array instead of a whole.

(Mathcad 15)

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

01-20-2020
04:31 AM

01-20-2020
04:31 AM

3 REPLIES 3

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

01-20-2020
04:16 AM

01-20-2020
04:16 AM

Re: Help with if loop with array

Yes, no error message from mathcad. ..

And the answers are all correct...given the equations and formula.

BUT: what did you expect to get. What is your purpose?

Please explain.

Success!

Luc

And the answers are all correct...given the equations and formula.

BUT: what did you expect to get. What is your purpose?

Please explain.

Success!

Luc

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

01-20-2020
04:31 AM

01-20-2020
04:31 AM

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

01-20-2020
02:15 PM

01-20-2020
02:15 PM

Re: Help with if loop with array

Turning the calculation into a function and calling that function vectorized might be an option.

Furthermore you have to use the logical "or" operator to connect your two conditions.

You don't have to name the formal function argument "class_id" as I did, you may name it simply "class" as well.

Furthermore you may consider making "Dp" a second function argument.

MC15 worksheet attached