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 Stargate38  
#1 Posted : 04 August 2022 01:16:39(UTC)
Stargate38


Rank: Member

Groups: Registered
Joined: 26/03/2019(UTC)
Posts: 12
United States
Location: My house

Anyone know what functions I should combine to produce the custom function I need? I need it to output the following: f(g(x),x,1,n)=stack(g(1),g(2),g(3),g(4),...,g(n-1),g(n)) for any given n value, but I can't seem to find the proper combination of functions and operators to do it.

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

Offline mkraska  
#2 Posted : 04 August 2022 09:10:16(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1128 time(s) in 724 post(s)
The first idea is to use a loop.

One also could use a loop to design the string representation of a multi-argument stack command and then convert it to an expression with str2num().
Yet I guess this would not make the thing more comprehensible.

Blatt6.sm (4kb) downloaded 3 time(s).
Blatt6.png

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline MarB  
#3 Posted : 04 August 2022 09:24:10(UTC)
MarB


Rank: Advanced Member

Groups: Registered
Joined: 21/10/2016(UTC)
Posts: 84

Was thanked: 21 time(s) in 17 post(s)
There are a some possibilities to do so:
(g(1): the 1 defines the number of arguments of g)

function.png
Offline Jean Giraud  
#4 Posted : 04 August 2022 13:54:16(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)
Originally Posted by: Stargate38 Go to Quoted Post
Anyone know what functions I should combine to produce the custom function I need ?

The all thing is in there: create the data set you need.
NestRow(data,s,r,k) will stack pairwise for plotting the project.
Cheers ... Jean.

Page15 ConnectNest.sm (30kb) downloaded 8 time(s).


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.