Skip to main content
1-Visitor
September 3, 2020
Solved

How to create a matrix from a defined function

  • September 3, 2020
  • 1 reply
  • 1405 views

I have defined a function to find the slope of a circular plate with a hole as a function of the radius.  I want to find the minimum slope which occurs somewhere between the inside and outside radius.  I can only use the max() function if the results are in a matrix.  The defined function is not considered a matrix in Prime.  I was going to use the WRITEPRN function (and read the values back in) but when I do that, only the last value is printed in the PRN file.  Attached is the worksheet.  Any ideas on what I'm doing wrong?  

Thanks in advance. 

Best answer by Werner_E

I would suggest that you use the zero of the derivative to get the desired value. You can use a solve block with find or the "root" function:

Werner_E_0-1599151820532.png

The problem in your sheet was that r is defined as a range and not as a vector. That way theta(r) IS NOT a vector (but rather some kind of iteration.

Here is a way to achieve what you tried to accomplish:

Werner_E_1-1599151913648.png

Prime 6 worksheet attached

 

 

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
September 3, 2020

I would suggest that you use the zero of the derivative to get the desired value. You can use a solve block with find or the "root" function:

Werner_E_0-1599151820532.png

The problem in your sheet was that r is defined as a range and not as a vector. That way theta(r) IS NOT a vector (but rather some kind of iteration.

Here is a way to achieve what you tried to accomplish:

Werner_E_1-1599151913648.png

Prime 6 worksheet attached

 

 

jpeck1-VisitorAuthor
1-Visitor
September 3, 2020

Big thanks Werner, that helps a bunch. 😁