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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Quick question; Proper way to define multiple vector values

dsochor
5-Regular Member

Quick question; Proper way to define multiple vector values

What is the error with the syntax in the attached program? I am attempting to define multiple values of a vector depending on the previously assigned variables. I am expecting the vector to have two rows but only one results.

1 ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald II
(To:dsochor)

Daniel Sochor wrote:

What is the error with the syntax in the attached program? I am attempting to define multiple values of a vector depending on the previously assigned variables. I am expecting the vector to have two rows but only one results.

Although the above is in Mathcad 15, the same applies to Prime.

Stuart

View solution in original post

9 REPLIES 9
LucMeekes
23-Emerald III
(To:dsochor)

Post your sheet. From the picture it's difficult to see what is an index and what is a literal.

Luc

StuartBruff
23-Emerald II
(To:dsochor)

Daniel Sochor wrote:

What is the error with the syntax in the attached program? I am attempting to define multiple values of a vector depending on the previously assigned variables. I am expecting the vector to have two rows but only one results.

Although the above is in Mathcad 15, the same applies to Prime.

Stuart

LucMeekes
23-Emerald III
(To:dsochor)

Found the culprit. The function delivers the last statement as result.

Add a last statement that returns the desired result,

such as:

Note that Mathcad usually starts vectors and matrices at index 0

dsochor
5-Regular Member
(To:Fred_Kohlhepp)

Another quick question (want to avoid creating another topic). Why does Mathcad not see NaN results? In the attached jpeg, c_ac is NaN but the if statement won't recognize it.

LucMeekes
23-Emerald III
(To:dsochor)

I guess it's one of those.....Prime things. This is what Mathcad say about it:

Success!

Luc

Must be your older version of Mathcad.  Here's Mathcad 15:

MJG
18-Opal
18-Opal
(To:dsochor)

You have to use the IsNaN function:

dsochor
5-Regular Member
(To:MJG)

Perfect, thank you!

Top Tags