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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Must be a vector

YA_10963798
14-Alexandrite

Must be a vector

What does a vector mean in MathCad? I often get the same error but in different functions

YA_10963798_0-1715168585945.png

 

9 REPLIES 9

To Mathcad a vector is a column of numbers, not a row!

Fred_Kohlhepp_0-1715169473652.png

 

 

Thank you for replying

Werner_E
25-Diamond I
(To:YA_10963798)

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).

YA_10963798
14-Alexandrite
(To:Werner_E)

I see
Actually what I’m trying to do is to apply the function of the Area in the columns in the min matrix.
I want it to calculate by column because each column contains the values of separate factor.
The first column is the first pile
And I want Mathcad to calculate The area in the first column separately.
İf it goes by rows it will confuse the values of different piles


Werner_E
25-Diamond I
(To:YA_10963798)

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.

YA_10963798
14-Alexandrite
(To:Werner_E)

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 

Werner_E
25-Diamond I
(To:YA_10963798)


@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?:

Werner_E_1-1715173091440.png

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

Werner_E_2-1715173174570.png

 

YA_10963798
14-Alexandrite
(To:Werner_E)

ok thank you for helping 

olivierlp
Community Manager
(To:YA_10963798)

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!

Olivier
Announcements

Top Tags