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

SOLVED
Highlighted
Newbie

## How export functions results to a vector

I need export results of functions to a vector or Excel table. I can not work with vectors instead range variables because I have a lot of functions depending of these range variables. After made calculations, I have a function results (with a lot of singularities) and I need find max and min values from these results. I need convert these results to a vector, so, I can use max and min functions to find the maximum and minimum values or export these values to Excel.

Someone have any solutions to this case?

Thank you.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

## Re: How export functions results to a vector

Now you have posted this very same question three times in different threads - thats annoying and counterproductive. Please avoid doing this in case of future questions.

Attached is something which should help for your understandig, I hope.

13 REPLIES 13

## Re: How export functions results to a vector

You can give a function a vector just as well as a range variable.

## Re: How export functions results to a vector

Now you have posted this very same question three times in different threads - thats annoying and counterproductive. Please avoid doing this in case of future questions.

Attached is something which should help for your understandig, I hope.

## Re: How export functions results to a vector

Please do not cross post. It is a waste of our time for multiple people to answer your question because they didn't realize it was already answered somewhere else.

## Re: How export functions results to a vector

Werner,

Thank you. Your explanation was perfect.

## Re: How export functions results to a vector

Werner,

When the functions have more than 2 variables I can not assembly a matrix to find the max and min values. Can you help me?

Find attached a e.g.

## Re: How export functions results to a vector

 When the functions have more than 2 variables I can not assembly a matrix to find the max and min values.

Yes, unfortunately Prime does not support multidomensional arrays.

So as I see it you have two options:

1) Create a different datastructure, e.g. a onedimensional vector (similar to whate the use of range variables would yield). You may use a tricky way with the three range variables or a small programm (preferrable) to do so. I guess a matrix with 4 columns (the three arguments and the function value) and (in your case) approx., 3 millions rows would be a good choice. You would use three nested for loops to do so. The use min() and max()

2) Write a routine (again three nested for loops) which only returns the min and max value (and if you need the three arguments which yield those values) without creating that huge structure.

## Re: How export functions results to a vector

Werner,

I found something about assembly a matrix to determine all combinations of four variables in the link http://communities.ptc.com/message/201635#201635 but I can not understand the procedure because the woksheet is very complicated. Please, can you help me to write a programing to assembly the matrix as you suggested in option 1 or create a routine as you suggested in option 2?

Thank you very much for your time and effort.

## Re: How export functions results to a vector

Sorry, I don't see what you have tried and what didn't work. The last two pages are empty. Probably you sent a wrong version of the file as it seems to be the same you sent two days ago.

## Re: How export functions results to a vector

Werner,

Please disregard the last two pages, they are really empty. Consider only the page 3/3 of the new file attached. I need find max and min values for the function Fnie03 (B1, H1,D1) and your arguments.

Thank you.