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 dav47  
#1 Posted : 03 June 2015 17:20:44(UTC)
dav47

Rank: Newbie

Groups: Registered
Joined: 03/06/2015(UTC)
Posts: 5

Hi to all, I create a composed function, but I don't understand what is wrong.
Please help
dav47 attached the following image(s):
quest.png

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

Offline dav47  
#2 Posted : 03 June 2015 18:08:04(UTC)
dav47

Rank: Newbie

Groups: Registered
Joined: 03/06/2015(UTC)
Posts: 5

I attach the file to clarify the problem
File Attachment(s):
2spline.sm (27kb) downloaded 23 time(s).
Offline Ernesto  
#3 Posted : 03 June 2015 18:54:03(UTC)
Ernesto


Rank: Advanced Member

Groups: Registered
Joined: 03/02/2014(UTC)
Posts: 67
Nicaragua

Was thanked: 13 time(s) in 11 post(s)
When defining a1, b1, c1.. etc, you define them as rows of a matrix (notice how they are still in parenthesis), and they remain a single entry matrix. This causes an error later on since you can't take a derivative of a matrix.

Instead of extracting the row, extract the element by using the "el" function, or write the matrix name followed by "[" and the row number.

eg. a.1 : M[1

Edited by user 03 June 2015 20:55:03(UTC)  | Reason: Not specified

thanks 1 user thanked Ernesto for this useful post.
on 04/06/2015(UTC)
Offline mkraska  
#4 Posted : 03 June 2015 22:35:28(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

Was thanked: 1128 time(s) in 724 post(s)
The cases() function helps a lot in writing piecewise continuous functions in a readable way.
File Attachment(s):
2spline_Kr.sm (24kb) downloaded 31 time(s).
mkraska attached the following image(s):
2spline_kr.PNG
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 04/06/2015(UTC)
Offline dav47  
#5 Posted : 04 June 2015 09:45:01(UTC)
dav47

Rank: Newbie

Groups: Registered
Joined: 03/06/2015(UTC)
Posts: 5

Hi, Ernesto and Martin.
Thank you for your help.
I'm new to the use of smath studio. I understand my mistake....It's a mathematical error!
Now I have istalled the Function extension.
Bye
Davide
Users browsing this topic
Guest
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.