Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline OchkovVF  
#1 Posted : 29 January 2024 22:41:35(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 416
Man
Russian Federation

Was thanked: 42 time(s) in 39 post(s)
When x1(t)=sin(t) - no problem.
When x1(t) is my function - an error!
See please the attach.
Three-Planets (Mathcad Block).sm (39kb) downloaded 11 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 29 January 2024 23:31:21(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 2,024
Germany

Was thanked: 1153 time(s) in 739 post(s)
This is because the solution functions are defined using interpolation. The interpolation functions have the X and Y vectors and the value of x as arguments. You try to provide a vector for x. Vectorize can handle only matrix arguments of the same size and successively calls the function with the j-th element of each vector.

So vectorize would require your x vector to be of the same size as the data vectors. Even in this case this probably will fail because the data would be reduced to a single X_i and Y_i.

Therefore, you have to use a loop.

2024-01-29 10_30_32-SMath Solver - [Three-Planets (Mathcad Block).sm_].png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#3 Posted : 30 January 2024 05:12:24(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 983 time(s) in 811 post(s)
Vectorize works fine in this document.

Three-Planets.sm (42kb) downloaded 10 time(s).
Offline OchkovVF  
#4 Posted : 30 January 2024 06:28:13(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 416
Man
Russian Federation

Was thanked: 42 time(s) in 39 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Vectorize works fine in this document.

Three-Planets.sm (42kb) downloaded 10 time(s).


Sorry - no. See please the attach
Three-Planets.sm (40kb) downloaded 17 time(s).
Offline Jean Giraud  
#5 Posted : 31 January 2024 03:47:53(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 983 time(s) in 811 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
Sorry - no. See please the attach

As I open your returned document,
both vectorize are red ... click on either one ... Bingo
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.