Iinj_highf = [time(19000:20000), 2e6.*iinj_highf(19000:20000)];
Vout_highf = [time(19000:20000), vout_highf(19000:20000)];
Vprev_highf = [time(19000:20000), vprev_highf(19000:20000)];

Iinj_lowf = [time(19000:20000), 2e6.*iinj_lowf(19000:20000)];
Vout_lowf = [time(19000:20000), vout_lowf(19000:20000)];
Vprev_lowf = [time(19000:20000), vprev_lowf(19000:20000)];

Iinj_dc40 = [time(19000:20000), 2e6.*iinj_dc40(19000:20000)];
Vout_dc40 = [time(19000:20000), vout_dc40(19000:20000)];
Vprev_dc40 = [time(19000:20000), vprev_dc40(19000:20000)];

writematrix(Iinj_highf, 'Iinj_highf.csv');
writematrix(Vout_highf, 'Vout_highf.csv');
writematrix(Vprev_highf, 'Vprev_highf.csv');

writematrix(Iinj_lowf, 'Iinj_lowf.csv');
writematrix(Vout_lowf, 'Vout_lowf.csv');
writematrix(Vprev_lowf, 'Vprev_lowf.csv');

writematrix(Iinj_dc40, 'Iinj_dc40.csv');
writematrix(Vout_dc40, 'Vout_dc40.csv');
writematrix(Vprev_dc40, 'Vprev_dc40.csv');