You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
snprintf(msg, sizeofmsg, "'loc_newton' should be followed by two complex row vectors of initial guesses for the main and auxiliary spectrum, respectively. Try passing complex(...).");
157
+
goto on_error;
158
+
}
159
+
K=mxGetN(prhs[k+1]);
160
+
main_spec=mxMalloc(K*sizeof(FNFT_COMPLEX));
161
+
if (K>0&&main_spec==NULL) {
162
+
snprintf(msg, sizeofmsg, "Out of memory.");
163
+
goto on_error;
164
+
}
165
+
re=mxGetPr(prhs[k+1]);
166
+
im=mxGetPi(prhs[k+1]);
167
+
for (j=0; j<K; j++)
168
+
main_spec[j] =re[j] +I*im[j];
169
+
170
+
/* Extract initial guesses for the aux spectrum */
snprintf(msg, sizeofmsg, "'loc_newton' should be followed by two complex row vectors of initial guesses for the main and auxiliary spectrum, respectively. Try passing complex(...).");
175
+
goto on_error;
176
+
}
177
+
M=mxGetN(prhs[k+2]);
178
+
aux_spec=mxMalloc(M*sizeof(FNFT_COMPLEX));
179
+
if (M>0&&aux_spec==NULL) {
180
+
snprintf(msg, sizeofmsg, "Out of memory.");
181
+
goto on_error;
182
+
}
183
+
re=mxGetPr(prhs[k+2]);
184
+
im=mxGetPi(prhs[k+2]);
185
+
for (j=0; j<M; j++)
186
+
aux_spec[j] =re[j] +I*im[j];
187
+
188
+
/* Increase k to account for the two vectors of initial guesses */
0 commit comments