55 #define csv_crlf "\r\n"
64 for (
int i = 0;
i < vectors;
i++) {
65 if (data[
i].
type ==
'c')
66 fprintf (
csv_out,
"\"r %s\"%s\"i %s\"", data[
i].
v->getName (),
69 fprintf (
csv_out,
"\"%s\"", data[
i].
v->getName ());
72 if (len < data[
i].len) len = data[
i].
len;
76 for (
int k = 0; k < len; k++) {
77 for (
int i = 0;
i < vectors;
i++) {
78 if (data[
i].
type ==
'c')
79 fprintf (
csv_out,
"%+." NR_DECS
"e%s%+." NR_DECS
"e",
80 (
double)
real (data[
i].
v->get (data[
i].
idx)), sep,
81 (
double)
imag (data[i].
v->get (data[i].
idx)));
83 fprintf (
csv_out,
"%+." NR_DECS
"e",
84 (
double)
real (data[i].
v->get (data[i].
idx)));
86 data[
i].
idx = ((k + 1) / data[i].skip) % data[
i].
len;
98 strlist * deps = v->getDependencies ();
99 int vectors = 1 + (deps ? deps->length () : 0);
106 data[
i].
len = v->getSize ();
108 int a = v->getSize ();
109 for (i = vectors - 2; i >= 0; i--) {
116 data[
i].
len = d->getSize ();
129 vars = (vector *) vars->
getNext ()) {
130 strlist * deps = vars->getDependencies ();
131 if (deps->contains (v->getName ()))
140 data[0].
len = v->getSize ();
143 vars = (vector *) vars->
getNext ()) {
144 strlist * deps = vars->getDependencies ();
145 if (deps->contains (v->getName ())) {
151 data[
i].
len = d->getSize ();
161 fprintf (stderr,
"no such data variable `%s' found\n", variable);
matrix real(matrix a)
Real part matrix.
qucs::vector * getVariables(void)
matrix imag(matrix a)
Imaginary part matrix.
nr_double_t norm(const nr_complex_t z)
Compute euclidian norm of complex number.
void csv_print(struct csv_data *data, int vectors, const char *sep)
qucs::vector * findDependency(const char *)
qucs::dataset * qucs_data
qucs::vector * findVariable(const char *)
void csv_producer(char *variable, const char *sep)