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 Zai  
#1 Posted : 31 October 2013 12:08:28(UTC)
Zai

Rank: Newbie

Groups: Registered
Joined: 25/10/2013(UTC)
Posts: 1
United Kingdom

I'm trying to define a sequence, but I think I'm doing it wrong.

a:=1..15

L_1:=4
L_a:=L_(a-1)+1

This in my mind defines a sequence, starting with 4 and incrementing by 1 for 15 steps. I keep getting 'Requested Matrix Element does not exist'.

What am I doing wrong? Cheers.

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

Offline mb10  
#2 Posted : 31 October 2013 14:21:29(UTC)
mb10


Rank: Member

Groups: Registered
Joined: 27/08/2013(UTC)
Posts: 19
Italy

Was thanked: 9 time(s) in 5 post(s)
Originally Posted by: Zai Go to Quoted Post
I'm trying to define a sequence, but I think I'm doing it wrong.

a:=1..15

L_1:=4
L_a:=L_(a-1)+1

This in my mind defines a sequence, starting with 4 and incrementing by 1 for 15 steps. I keep getting 'Requested Matrix Element does not exist'.

What am I doing wrong? Cheers.

You can use a for loop:


mb10 attached the following image(s):
loop.JPG
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.