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 jjuddgb  
#1 Posted : 03 October 2012 13:41:00(UTC)
jjuddgb

Rank: Newbie

Groups: Registered
Joined: 03/10/2012(UTC)
Posts: 2
United Kingdom
Location: Rugby

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.
File Attachment(s):
SMath output.pdf (21kb) downloaded 53 time(s).
Mathcad - output.pdf (27kb) downloaded 47 time(s).

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

Offline kilele  
#2 Posted : 03 October 2012 14:49:27(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 133 time(s) in 114 post(s)
Correct me if i'm wrong, trigonometric functions don't support arrays currently.
For now, you can do something like this.
File Attachment(s):
cosinOfArray.sm (6kb) downloaded 145 time(s).
thanks 1 user thanked kilele for this useful post.
on 28/09/2024(UTC)
Offline jjuddgb  
#3 Posted : 03 October 2012 18:09:17(UTC)
jjuddgb

Rank: Newbie

Groups: Registered
Joined: 03/10/2012(UTC)
Posts: 2
United Kingdom
Location: Rugby

Thank you kilele
Offline Ber7  
#4 Posted : 03 October 2012 18:31:19(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)
You can convert the vector into a system (by w3b5urf3r_reloaded)
Regards, Ber7
http://smath.info/wiki/G...=cosinOfArray%5b1%5d.rar

Edited by user 05 October 2012 06:42:40(UTC)  | Reason: Not specified

thanks 1 user thanked Ber7 for this useful post.
on 03/10/2012(UTC)
Offline Ber7  
#5 Posted : 03 October 2012 18:33:28(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)


Regards, Ber7

Offline 1752  
#6 Posted : 28 September 2024 20:44:50(UTC)
1752

Rank: Newbie

Groups: Registered
Joined: 28/09/2024(UTC)
Posts: 1

Originally Posted by: kilele Go to Quoted Post
Correct 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?
Offline PompelmoTell  
#7 Posted : 28 September 2024 22:09:41(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 321
Man
Italy
Location: italy

Was thanked: 110 time(s) in 94 post(s)
now you can use the "vectorize" function, which you also find in the side panel, and perform the trigonometric function element by element.
sergio

28-1369.png
thanks 1 user thanked PompelmoTell for this useful post.
on 28/09/2024(UTC)
Offline mkraska  
#8 Posted : 30 September 2024 04:22:50(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1153 time(s) in 739 post(s)
An alternative to the vectorize() function is the use of index vectors.

They, however, only work if they are used in a definition.

Worksheet1.png
Worksheet1.sm (6kb) downloaded 0 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 30/09/2024(UTC)
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.