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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Array of same value

Jee-Bee_CS
11-Garnet

Array of same value

I 'm busy with calculate the intersections of two lines as done here.

 

JeeBee_CS_0-1674481405285.png

 

I think the variable y2 is currently the problem because it is a single value. In python(with numpy) i'm able to create a ones(length) array. How do i create a array (arbritrary length) where all values are the same?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Always attach your sheet, not just a picture.

root needs a guess value x1 but in your setup x1 is a range, which can't work.

You may consider using root by providing a range for x1 instead of a guess value or you may create a function with the guess value as its argument and feed it with a vector of appropriate guess values_

Werner_E_0-1674485196962.png

 

EDIT: But in case you ae nonetheless still looking for a way to create a vector with all the values the same, here is one way to do it

Werner_E_0-1674518993712.png

 

 

View solution in original post

1 REPLY 1

Always attach your sheet, not just a picture.

root needs a guess value x1 but in your setup x1 is a range, which can't work.

You may consider using root by providing a range for x1 instead of a guess value or you may create a function with the guess value as its argument and feed it with a vector of appropriate guess values_

Werner_E_0-1674485196962.png

 

EDIT: But in case you ae nonetheless still looking for a way to create a vector with all the values the same, here is one way to do it

Werner_E_0-1674518993712.png

 

 

Top Tags