Can someone help me with figuring out what the following error means:
"Error, (in F) final value in for loop must be numeric or character"
I've obviously done something wrong but have no clue where to start!!
This comes up when i'm trying to plot a graph using the following code:
> local x,k,B,p,q;
> uses Statistics, plots:
> x:=0: x:= 1:
> for k from 2 to n do
> B:=2*(Sample(Bernoulli(0.5),2)-<0.5,0.5>): #create list [p,q] where p &q are +1 or -1 with probability 1/2
> p:=B: q:=B; #assign p & q
> S:= n-> abs(F(n))^(1/n);
S := n -> | F(n) |
Error, (in F) final value in for loop must be numeric or character