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 CasualKilla  
#1 Posted : 21 September 2015 13:17:53(UTC)
CasualKilla

Rank: Newbie

Groups: Registered
Joined: 21/09/2015(UTC)
Posts: 1

Hi there, hopefully somebody can help me with the following problem.

I need to iterate a variable to solve a problem I have. It needs to look something like this:

x := 1
x = 1
...
...
...
x := x + 5
x = 6
...
...
...
x := x - 2
x = 4
...
...
etc

Is it possible to do this is SMath? At the moment it does not allow me to change x once I have declared it as shown in the first line.

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

Offline Davide Carpi  
#2 Posted : 21 September 2015 17:47:00(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,650
Man
Italy
Location: Italy

Was thanked: 1338 time(s) in 878 post(s)
Like this?
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline mikekaganski  
#3 Posted : 22 September 2015 05:25:15(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: CasualKilla Go to Quoted Post
At the moment it does not allow me to change x once I have declared it as shown in the first line.


I suppose that's because you use "=" button to assign a variable its value; but when a variable is already defined, the "=" button has its usual (in SMath) meaning of displaying its value, instead of assignment.

To assign, use ":" button instead.
Best regards,
Mike Kaganski
Offline Jean Giraud  
#4 Posted : 22 September 2015 06:02:46(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)
You must post either the Smath work sheet that shows the stuff to solve
or an image that show enough information. No solver is fool proof and
often solving = muffing ! Collabs read you not as fast it used to be
in the Mathsoft Collaboratory [that gorgeous forum PTC scrapped].

Cheers ,,,, waiting to read you again.

Jean
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.