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 studoc  
#1 Posted : 05 July 2011 05:16:53(UTC)
studoc


Rank: Member

Groups: Registered
Joined: 13/05/2011(UTC)
Posts: 17
Location: coolum bch, Australia



This is what I would like to do, but when I follow this procedure, when typing the variable again I am prompted with the already stored result...

How can I fix this...?

cheers,

Stu.

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

Offline omorr  
#2 Posted : 05 July 2011 08:08:08(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Sorry Stu,

I do not understand your question. Could you be more specific please.

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline studoc  
#3 Posted : 05 July 2011 12:16:32(UTC)
studoc


Rank: Member

Groups: Registered
Joined: 13/05/2011(UTC)
Posts: 17
Location: coolum bch, Australia

Sure, thanks Radovan,

what I want to do is input changing values to a variable used in an equation I have defined in one of my calc sheets. Actually, the way I use this program, I would often do this...

I have written an equation, then defined the variables, subsequently, in order to arrive at an acceptable solution to the equation, I will need to change the value of one of the variables.

The above example suggested to me that as long as you write the equation first and then define the variables you could subsequently change a variable and therefore get amended results for the equation.

When I did this in my sheet, retyping "a=", the program immediately jammed in the already defined value of "a", so I don't get to amend the variable and therefore amend the result to the equation....

Stu.
Offline omorr  
#4 Posted : 05 July 2011 12:53:08(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hell Stu,
studoc wrote:

When I did this in my sheet, retyping "a=", the program immediately jammed in the already defined value of "a", so I don't get to amend the variable and therefore amend the result to the equation....

I hope I understood your problem.

There is the difference between "definition - operator := " and "numerical evaluation - operator =".
When yuo type "A=" you will see (in the case A was not already defined above or to the left):
A←#
SMath will ask you to "define" the variable named A because it was not previously defined. Now, when you define the variable:
A←10.5
And type "A=" afterwards you will have "numerical evaluation" and get the value of variable A:
A=10.5
If you want to redefine A, you must type "A:" (not "A=" ) and to get again
A←#
in order to redefine the value of A

I think that your problem was in using "=" operator instead of ":=" for redefining variables

An example:

Type
f(x)=x+a
SMath
f(x)←x+a
ATTENTION: you typed "=" but on the screen you will see ":=" because f(x) was not already defined
Type
a=5 or a:5
SMath
a←5
Type
f(1)=
SMath
f(1)=6
Now, if you want to change a - you MUST
Type
a:11
Smath
a←11
Type
f(1)=
SMath
f(1)=12

Regards,
Radovan

Edited by user 05 July 2011 13:05:55(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline studoc  
#5 Posted : 10 July 2011 03:45:39(UTC)
studoc


Rank: Member

Groups: Registered
Joined: 13/05/2011(UTC)
Posts: 17
Location: coolum bch, Australia

Sorry, don't think I replied to you... this is exactly what I was looking for, thanks Radovan...!

Stu.
Offline omorr  
#6 Posted : 10 July 2011 11:50:44(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
You are welcome Good

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
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.