Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.1K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Difficulties implementing recurring formula

Posted 12 years ago
POSTED BY: Natasa T

Use Set rather than SetDelayed for q[[1]] and q[[2]]

Test[n1_] := Module[{q},
   q = Table[0, {n1}];
   q[[1]] = 1;
   q[[2]] = q[[1]];
   q];

Test[4]

{1, 1, 0, 0}

POSTED BY: Robert Hanlon
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard