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

How to generate several outputs from a loop?

jmisund
1-Newbie

How to generate several outputs from a loop?

Hey!

I'm wondering if there is a way to get more than one output from a program in Mathcad Prime? In my case it is a for loop and I would like to output both a message and a parameter (1-by-2 vector).

For example:

test = "Error in:" [3,5] ...or something like that.

Where "test" is the function I'm using.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby IV
(To:jmisund)

You can nest vectors and matrices. So let the return value of your program be a 2x1 vector where the string is the first and the 1x2 matrix is the second element.

View solution in original post

2 REPLIES 2
Werner_E
24-Ruby IV
(To:jmisund)

You can nest vectors and matrices. So let the return value of your program be a 2x1 vector where the string is the first and the 1x2 matrix is the second element.

I think I should have been able to see that... thank you for enlightening me

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."