Jump to content
  • 0

Array to CSV using script


Bayu A

Question

4 answers to this question

Recommended Posts

  • 0

Hi, @attila, thans for your response. I have any script like that.

var dataImp=[],dataPhase=[];

for(var i = 0; i<3; i++){

conMux(i);

wait(0.1);

Impedance1.single();

if(!Impedance1.wait()) break; // wait for or exit on stop

var phase= Impedance1.Traces.Trace.getData("Phase");

var imp= Impedance1.Traces.Trace.getData("Impedance");

dataImp.push(imp);

dataPhase.push(phase);

print(i+1);}

Supplies.MasterEnable.checked= 0;

StaticIO.stop();

FileWrite("~/Desktop/ia/impIM_"+freq+".csv",dataImp);

 

I will create CSV file. First colomn is impedance value and second colomn is phase value. 

Link to comment
Share on other sites

  • 0

Hi @attila Thank you for your answer. I try it and I finish about that. I try script like that.

 

File("~/Desktop/ia/data_"+freq+".csv").writeLine(dataImp);

File("~/Desktop/ia/data_"+freq+".csv").appendLine(dataPhase);

but I have any problems. How to transpose row to colomn in array? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...