Question: cat a subscript also as an input from a function

f:=C->sum(x[cat(new,c)],c=1..C);

f(4) # does not give me what i want , which is

x[cat(new,1)]+x[cat(new,2)]+x[cat(new,3)]+x[cat(new,4)];

 

seq(x[cat(new,c)],c=1..4);
convert([%],`+`);

This works. But it's just a simple example to illustrate my problem.

 

Is there a way to fix this 'cat' problem in the procedure 'f'?

 

Thanks,

 

casper

Please Wait...