Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
What does a vector mean in MathCad? I often get the same error but in different functions
To Mathcad a vector is a column of numbers, not a row!
You try to access "min" with just one single matrix index (i-1 in your example). This is only allowed for (column) vectors (= n x 1 matrices) because here it is clear that the index means the row as there is only one column.
In your sheet "min" is a 24 x 9 matrix, so you need two indices (row and column) to access one of its elements.
As you are only using one index, Primes error message tells you that this is only allowed if min is a vector (= a matrix with just one column).
I don't know what you are trying to calculate, but I notice that you are using indices i-1 and i+1 which will be beyond the allowed range if i is the number of the first column (O) or the number of the last column.
Actually I'm trying to calculate the area ,and that requires to use the minimum value before and after each pile ( which is min in my sheet)
For example, to find the area value of row number 2 in column 1 >>, I want mathcad to use the value of row 1 and row 3 in the first column.
And then treat the second column separately doing the same. as if each column is written in separate matrix
@YA_10963798 wrote:
Actually I'm trying to calculate the area ,and that requires to use the minimum value before and after each pile ( which is min in my sheet)
Sure that it isn't rather min_value(L...) ??
Furthermore there is no pile before the first one and also no pile after the last one!!
I really don't know but could it be that you a re trying something like this?:
You have to add the code to correctly calculate the area for the first and last columns.
If only the in-between area is meant (vector with 7 values instead of 9), you should use
ok thank you for helping
Hi @YA_10963798
Is your question answered? If so, please mark the appropriate reply as the Accepted Solution. It may help many other users!
Of course, if you have more to share on your issue, please let the Community know so that we can continue to help you.
Thanks in advance!