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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Quick question; Proper way to define multiple vector values

dsochor
10-Marble

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.

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(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 III
(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

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
10-Marble
(To:MJG)

Perfect, thank you!

Announcements

Top Tags