[Date Index] [Thread Index] [Author Index]
Array problems in Mathematica
Has anyone come accros the following? Firstly, applying N to an array also carries through to the arguments. i.e. N[2 a] = 2. a[1.] and not 2. a Is there a way to protect the arguments of an array from N? Secondly, using CForm on arrays gives the output in unappropriate form. i.e. CForm[a] = a(1) and not a Now try to write a C program splicing in output from Mathematica containing arrays and the compiler recognises a() as a function, not an array. Is there a way round this? I really can't understand the logic here, since both Mathematica and C use  for array arguments, so why should CForm convert to ()? I would be most grateful if anyone has any suggestions. Thanks in advance Mark Sofroniou.