49 unsigned char EndianTest[2] = { 1, 0 };
50 nr_int16_t
x = * (nr_int16_t *) EndianTest;
61 switch (
sizeof (nr_double_t) * 8) {
62 case 32: mopt[2] = 1;
break;
63 case 64: mopt[2] = 0;
break;
69 fwrite (&rows,
sizeof (nr_int32_t), 1,
matlab_out);
70 fwrite (&cols,
sizeof (nr_int32_t), 1,
matlab_out);
74 fwrite (&imag,
sizeof (nr_int32_t), 1,
matlab_out);
77 nr_int32_t len = strlen (name) + 1;
78 fwrite (&len,
sizeof (nr_int32_t), 1,
matlab_out);
84 for (
unsigned int i = 0;
i < strlen (name);
i++, p++) {
85 if (!isalnum (*p) && *p !=
'_')
97 for (n = 0; n < v->getSize (); n++) {
98 nr_double_t
r =
real (v->get (n));
99 fwrite (&r,
sizeof (nr_double_t), 1,
matlab_out);
102 for (n = 0; n < v->getSize (); n++) {
103 nr_double_t
i =
imag (v->get (n));
104 fwrite (&i,
sizeof (nr_double_t), 1,
matlab_out);
113 for (c = 0; c < m->getCols (); c++) {
114 for (r = 0; r < m->getRows (); r++) {
115 nr_double_t re =
real (m->get (r, c));
116 fwrite (&re,
sizeof (nr_double_t), 1,
matlab_out);
120 for (c = 0; c < m->getCols (); c++) {
121 for (r = 0; r < m->getRows (); r++) {
122 nr_double_t im =
imag (m->get (r, c));
123 fwrite (&im,
sizeof (nr_double_t), 1,
matlab_out);
132 char * vn = v->getName ();
141 if (r == 0 && c == 0) {
150 sn = (
char *) malloc (strlen (n) + 8);
153 sprintf (sn,
"%s_%d_%d", n, r + 1, c + 1);
155 sprintf (sn,
"%s", vn);
186 for (v = data->getVariables (); v != NULL; v = (::vector *) v->
getNext ()) {
matrix real(matrix a)
Real part matrix.
static void matlab_header(nr_int32_t rows, nr_int32_t cols, char *name)
Global physical constants header file.
void matlab_producer(void)
static void matlab_save(::vector *v)
matrix imag(matrix a)
Imaginary part matrix.
static void initendian(void)
static matvec * getMatrixVector(qucs::vector *, char *)
static void matlab_vector(::vector *v)
Dense matrix class header file.
static void matlab_matrix(matrix *m)
qucs::dataset * qucs_data
strlist * getDependencies(void)
static char * isMatrixVector(char *, int &, int &)