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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline kelvedge  
#1 Posted : 09 December 2019 20:36:21(UTC)
kelvedge

Rank: Newbie

Groups: Registered
Joined: 08/12/2019(UTC)
Posts: 1
United Kingdom
Location: dorset

Hi, I'm a new user of smath and have come across an issue when I try to calculate the sqrt for a range of values, I just get a message saying that smath is unable to calculate. Attached is an image of a simple sheet showing what I am trying to achieve, ideally I wouldn't have interim values for f listed root problem.PNG

Any help gratefully received.

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

Offline PompelmoTell  
#2 Posted : 09 December 2019 21:19:46(UTC)
PompelmoTell


Rank: Advanced Member

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

Was thanked: 109 time(s) in 93 post(s)
If you want to use a function (in this case "sqrt" ) for each of the vector elements, you must use the SpecialFunction "vectorize". another possibility is to run a "for" loop.

sergio
Offline Jean Giraud  
#3 Posted : 10 December 2019 03:24:11(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 981 time(s) in 809 post(s)
Simply like this.

VectorizeSQRT.PNG
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.