0

I have an array of floats or doubles lets call it foo. When I do

size(foo)

I get these 5 dimensions

2          67       52100           4     3498338

I would like to convert it to a string like

str="strcture={arr:"+foo+"}"

so that I can then do

Execute(str)

How can I convert foo to a string dynamically?

user2175783
  • 1,291
  • 1
  • 12
  • 28

1 Answers1

1

I have something to print the declaration of a variable in my library:

IDL> print, mg_variable_declaration(replicate({a: 0.0, b: 1.0}, 10))
replicate({ A: 0.00000, B: 1.00000 }, 10)

It won't get all the data values, though. Just create a variable of the correct type. It might get you part of the way, though.

mgalloy
  • 2,356
  • 1
  • 12
  • 10