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 shelley  
#1 Posted : 21 July 2015 17:36:55(UTC)
shelley


Rank: Member

Groups: Registered
Joined: 27/09/2014(UTC)
Posts: 15

If I want to run an existing smath sheet in smath sheet again and again, which way I can do that?
Can we make an existing smath sheet as a plugin in like a function input? if so, we can run it in a new sheet again and again. Do we have easier way to make a plugin?
I don't know VB or any other language.
Any help will be appreciate.

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

Offline Ernesto  
#2 Posted : 21 July 2015 18:42:05(UTC)
Ernesto


Rank: Advanced Member

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

Was thanked: 13 time(s) in 11 post(s)
Several ways you can do this, it really depends on how much work you want to put into it.

1 - You can create an "if" loop and return the result as a vector for each iteration.

2 - Turn the operation into a function.

3 - Use the operation as is, then copy it and paste it lower on the sheet to reuse it. Only convenient if you use it a few times only.
Offline shelley  
#3 Posted : 21 July 2015 18:53:04(UTC)
shelley


Rank: Member

Groups: Registered
Joined: 27/09/2014(UTC)
Posts: 15

Thank you for your reply. The developed sheet is a bit complicated, and I don't want to do any modification there. The thing is that I have a bunch of data inout need to be run in a loop, and I want to run the developed sheet in a loop, and write output as a list or table.

I know your way 3. It is fine for just a few times only.

how can I turn the developed smath sheet as a function if I understand correctly in way 2?
Offline Ernesto  
#4 Posted : 21 July 2015 19:03:10(UTC)
Ernesto


Rank: Advanced Member

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

Was thanked: 13 time(s) in 11 post(s)
See attached example
File Attachment(s):
function example.sm (5kb) downloaded 8 time(s).
Ernesto attached the following image(s):
function example.PNG
Offline shelley  
#5 Posted : 22 July 2015 00:07:14(UTC)
shelley


Rank: Member

Groups: Registered
Joined: 27/09/2014(UTC)
Posts: 15

Thank you very much. I work for numerical cal., but it didn't work when I tried string identification and want to get some values. Could you take a look at the test below.
File Attachment(s):
test.sm (20kb) downloaded 13 time(s).
Offline Ernesto  
#6 Posted : 22 July 2015 00:48:39(UTC)
Ernesto


Rank: Advanced Member

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

Was thanked: 13 time(s) in 11 post(s)
Kind of hard to follow, but the first thing is seems like you are trying to define a function "PROPERTY(Connect):=BS". What is in the parenthesis is the variable, but that variable is not in the function. "BS" is also undefined. So this doesn't do anything at all.

Then you use "Connect" in the next part, but it is undefined, so there is an error. This part tries to match what is in the "Connect" variable to some numbers, "BS-20" for example. But you will never get a match because the data you imported is in a different format, "BS-20(B )" for example.

You define "Connect" at the end and use it in this function. The function variable should be different. Define it as "PROPERTY(x):= x*3" For example. BS needs to be defined, otherwise include another variable in the function "PROPERTY(x,y):= x*3-y^2". Then you can use it later on as intended "PROPERTY(Connect,BS)= "

Save yourself some complexity and import the data starting from cell C2 instead of C1, this will simplify your loops and matrix indexing.

Before moving on to see if this will work, the above has to be addressed first.
Offline uni  
#7 Posted : 22 July 2015 07:58:21(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,495
Man
Russian Federation

Was thanked: 1275 time(s) in 746 post(s)
Originally Posted by: shelley Go to Quoted Post
If I want to run an existing smath sheet in smath sheet again and again, which way I can do that?
Can we make an existing smath sheet as a plugin in like a function input? if so, we can run it in a new sheet again and again. Do we have easier way to make a plugin?
I don't know VB or any other language.
Any help will be appreciate.

Try to use include() function for this purpose.

Russia ☭ forever
Viacheslav N. Mezentsev
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.