1页(8条)
Newbie problem - Using a range of angles inside a cosine function - Trying to use cos(variable angle) - 消息
Hi,
I'm trying to convert some old Mathcad files into SMath but am stuck with what must be an elementary problem, I've looked at various tutorials but can't find a solution, no doubt due to my own incompetence.
I am defining the following variables: angle:=72 and varangle:= 0, angle/2..360
In Mathcad if I then define: test(varangle):= cos(varangle) the output of test(varangle) displays correctly in a column.
If I try the same in SMath I receive either an 'argument must be scalar' or 'fill in all empty elements' error.
Thanks for any advice.
Screenshots of Mathcad and SMath attached.
btw, great software.
Mathcad - output.pdf (26.44 KiB)已下载 1008 次。
I'm trying to convert some old Mathcad files into SMath but am stuck with what must be an elementary problem, I've looked at various tutorials but can't find a solution, no doubt due to my own incompetence.
I am defining the following variables: angle:=72 and varangle:= 0, angle/2..360
In Mathcad if I then define: test(varangle):= cos(varangle) the output of test(varangle) displays correctly in a column.
If I try the same in SMath I receive either an 'argument must be scalar' or 'fill in all empty elements' error.
Thanks for any advice.
Screenshots of Mathcad and SMath attached.
btw, great software.
Mathcad - output.pdf (26.44 KiB)已下载 1008 次。
Correct me if i'm wrong, trigonometric functions don't support arrays currently.
For now, you can do something like this.
cosinOfArray.sm (5.04 KiB)已下载 1896 次。
For now, you can do something like this.
cosinOfArray.sm (5.04 KiB)已下载 1896 次。
1位用户喜欢此帖子
1752 2024/9/28 14:44:00
You can convert the vector into a system (by w3b5urf3r_reloaded)
Regards, Ber7
https://smath.com/wiki/GetFile.aspx?File=cosinOfArray%5b1%5d.rar
Regards, Ber7
https://smath.com/wiki/GetFile.aspx?File=cosinOfArray%5b1%5d.rar
1位用户喜欢此帖子
Davide Carpi 2012/10/3 13:33:00

Regards, Ber7
WroteCorrect me if i'm wrong, trigonometric functions don't support arrays currently.
For now, you can do something like this.
did arrays appear in trigonometric functions?
An alternative to the vectorize() function is the use of index vectors.
They, however, only work if they are used in a definition.

Worksheet1.sm (5.28 KiB)已下载 1658 次。
They, however, only work if they are used in a definition.

Worksheet1.sm (5.28 KiB)已下载 1658 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
sergio 2024/9/29 23:37:00
1页(8条)
- 有新帖
- 无新帖
