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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

This value must be a vector

yeet
1-Visitor

This value must be a vector

Hi,

I am receiving 'This value must be a vector' error eventhough the expression is vector already. Please see the attached snippet.

Thanks.

ACCEPTED SOLUTION

Accepted Solutions
AndyWesterman
12-Amethyst
(To:yeet)

Hi Yigit,

I think that the problem is caused by the square root function.

Capture.PNG

Complains that it must be a vector,

Using the vector-ise operator (<CTRL> -) (and also setting f = 10^12 ) gives

Capture1.PNG

Also added into the file are simple examples of the square root failing to calculate

Regards

Andy

View solution in original post

6 REPLIES 6
HarveyHensley
12-Amethyst
(To:yeet)

I used the Trace Error feature and it led to the offending variable. It is actually a nested array, not a vector.

VladimirN
24-Ruby II
(To:yeet)

Hi Yigit,

I'm not sure what you want to achieve. Maybe attachment will help you.

AndyWesterman
12-Amethyst
(To:yeet)

Hi Yigit,

I think that the problem is caused by the square root function.

Capture.PNG

Complains that it must be a vector,

Using the vector-ise operator (<CTRL> -) (and also setting f = 10^12 ) gives

Capture1.PNG

Also added into the file are simple examples of the square root failing to calculate

Regards

Andy

I had figured it's the square root function but I couldn't figure out 'why' it causes the error. I had used the same function with the same notation without error in my previous sheets, this one threw this error. Weird behavior I suppose.

AndyWesterman
12-Amethyst
(To:yeet)

As you may see from the previous attachment: square root seems to handle single column vector, but single row & matrix forms cause it to throw an error.

This discrepancy should probably be caonsidered as a bug, even though it can be corrected by vectorisation.

Regards

Andy

A Westerman schrieb:

As you may see from the previous attachment: square root seems to handle single column vector, but single row & matrix forms cause it to throw an error.

This discrepancy should probably be caonsidered as a bug, even though it can be corrected by vectorisation.

This auto-vectorization of Mathcad when dealing with column vectors is also covered in this thread: http://communities.ptc.com/message/195025#195025

Not sure if I should call it a convenience or a discrepancy. I tend to the latter.

Announcements

Top Tags