1页(6条)
failing evaluation under vectorize() - 消息
Why does the vectorize operation fail while it seems to be safe to use an explicit loop?
6-2-Bug.sm (27.78 KiB)已下载 1679 次。
![2023-11-21 18_18_50-SMath Solver - [6-2-Bug.sm_].png](/zh-Hans-CN/files/Download/nuebhM/2023-11-21-18_18_50-SMath-Solver---[6-2-Bug.sm_].png)
6-2-Bug.sm (27.78 KiB)已下载 1679 次。
![2023-11-21 18_18_50-SMath Solver - [6-2-Bug.sm_].png](/zh-Hans-CN/files/Download/nuebhM/2023-11-21-18_18_50-SMath-Solver---[6-2-Bug.sm_].png)
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
3位用户喜欢此帖子
Is that just by observation or is there a fundamental obstacle?
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
WroteIs that just by observation or is there a fundamental obstacle?
Hi. I guess that it is fundamental.
Some notes about how other CAS handle this issue.
Pretty old matlab version, from its symbolic toolbox

The help page from the newest version

So, it looks like they have some issues with automatic vectorization.
With maple it is very uncomfortable, you need to use map even for simple cases

Wolfram's solution is very practical: Function with attribute 'Listable' expands over lists

But for make a table you actually need a loop or the Mathematica's Map function.
Best regards.
Alvaro.
2位用户喜欢此帖子
WroteWhy does the vectorize operation fail while it seems to be safe to use an explicit loop ?
Set the demand in local definition mode ...
new(t):=|a(t)
vectorize and equate
6-2-Bug Doctored.sm (29.54 KiB)已下载 1713 次。
1位用户喜欢此帖子
Martin Kraska 2023/11/25 23:04:00
Thanks Alvaro and Jean. Here is a reduced working example.
When a scalar function involves scalar products then it must be defined in a line()-block in order to be vectorize()able.

Worksheet13.sm (5.9 KiB)已下载 1778 次。
When a scalar function involves scalar products then it must be defined in a line()-block in order to be vectorize()able.

Worksheet13.sm (5.9 KiB)已下载 1778 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
Oscar Campo 2023/11/26 18:21:00
1页(6条)
- 有新帖
- 无新帖
