1 страниц (5 вхождений)
Why I have an error? - Сообщения
#1 Опубликовано: 29.01.2024 16:41:35
When x1(t)=sin(t) - no problem.
When x1(t) is my function - an error!
See please the attach.
Three-Planets (Mathcad Block).sm (38 КиБ) скачан 70 раз(а).
When x1(t) is my function - an error!
See please the attach.
Three-Planets (Mathcad Block).sm (38 КиБ) скачан 70 раз(а).
#2 Опубликовано: 29.01.2024 17:31:21
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](/ru-RU/file/xaHeCk/2024-01-29-10_30_32-SMath-Solver---_Three-Planets-_Mathcad-Block__sm___png)
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.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 29.01.2024 23:12:24
#4 Опубликовано: 30.01.2024 00:28:13
WroteVectorize works fine in this document.
Three-Planets.sm (41 КиБ) скачан 64 раз(а).
Sorry - no. See please the attach
Three-Planets.sm (39 КиБ) скачан 79 раз(а).
#5 Опубликовано: 30.01.2024 21:47:53
WroteSorry - no. See please the attach
As I open your returned document,
both vectorize are red ... click on either one ... Bingo
1 страниц (5 вхождений)
-
Новые сообщения
-
Нет новых сообщений