Corrected write_c_struct matlab function

This commit is contained in:
ismagom 2016-02-17 19:50:43 +00:00
parent 13ac13464c
commit 1348b2b4bc
2 changed files with 60002 additions and 60000 deletions

View File

@ -7,7 +7,9 @@ function [ out ] = write_c_struct_complex( filename, varname, x)
return
end
fprintf(tidin, 'float %s[%d]={%.9g,%.9g',varname,2*length(x),real(x(1)),imag(x(1)));
fprintf(tidin, ',\n %.9g,%.9g',real(x(2:end)),imag(x(2:end)));
for i=2:length(x)
fprintf(tidin, ',\n %.9g,%.9g',real(x(i)),imag(x(i)));
end
fprintf(tidin, '};\n');
fclose(tidin);
end

File diff suppressed because it is too large Load Diff