File: D:\TMTmethod\simulator\codegen\mex\testspline\mpower.c1 /* 2 * mpower.c 3 * 4 * Code generation for function 'mpower' 5 * 6 * C source code generated on: Thu Aug 30 14:03:55 2012 7 * 8 */ 9 10 /* Include files */ 11 #include "rt_nonfinite.h" 12 #include "testspline.h" 13 #include "mpower.h" 14 #include "mrdivide.h" 15 #include "power.h" 16 #include "diag.h" 17 #include "sqrt.h" 18 #include "eye.h" 19 #include "testspline_mexutil.h" 20 21 /* Type Definitions */ 22 23 /* Named Constants */ 24 25 /* Variable Declarations */ 26 27 /* Variable Definitions */ 28 static emlrtRSInfo oc_emlrtRSI = { 14, "sqrt", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/elfun/sqrt.m" }; 29 static emlrtRSInfo pc_emlrtRSI = { 20, "eml_error", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_error.m" }; 30 static emlrtRSInfo xd_emlrtRSI = { 33, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 31 static emlrtRSInfo yd_emlrtRSI = { 41, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 32 static emlrtRSInfo ae_emlrtRSI = { 43, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 33 static emlrtRSInfo be_emlrtRSI = { 71, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 34 static emlrtRSInfo ce_emlrtRSI = { 64, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 35 static emlrtRSInfo de_emlrtRSI = { 55, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 36 static emlrtRSInfo ee_emlrtRSI = { 21, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 37 static emlrtRSInfo fe_emlrtRSI = { 89, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 38 static emlrtRSInfo ge_emlrtRSI = { 84, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 39 static emlrtRSInfo he_emlrtRSI = { 54, "eml_xgemm", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/blas/eml_xgemm.m" }; 40 static emlrtRSInfo af_emlrtRSI = { 111, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 41 static emlrtRSInfo bf_emlrtRSI = { 114, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 42 static emlrtRSInfo cf_emlrtRSI = { 122, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 43 static emlrtRSInfo df_emlrtRSI = { 20, "eml_error", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_error.m" }; 44 static emlrtRSInfo ef_emlrtRSI = { 40, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 45 static emlrtRSInfo ff_emlrtRSI = { 41, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 46 static emlrtRSInfo gf_emlrtRSI = { 55, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 47 static emlrtRSInfo hf_emlrtRSI = { 59, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 48 static emlrtRSInfo if_emlrtRSI = { 9, "eml_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/eml_xgeev.m" }; 49 static emlrtRSInfo jf_emlrtRSI = { 8, "eml_lapack_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/internal/eml_lapack_xgeev.m" }; 50 static emlrtRSInfo kf_emlrtRSI = { 16, "eml_lapack_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/internal/eml_lapack_xgeev.m" }; 51 static emlrtRSInfo lf_emlrtRSI = { 108, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 52 static emlrtRSInfo mf_emlrtRSI = { 106, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 53 static emlrtRSInfo nf_emlrtRSI = { 101, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 54 static emlrtRSInfo of_emlrtRSI = { 100, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 55 static emlrtRSInfo pf_emlrtRSI = { 84, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 56 static emlrtRSInfo qf_emlrtRSI = { 42, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 57 static emlrtRSInfo rf_emlrtRSI = { 30, "eml_matlab_zgghrd", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zgghrd.m" }; 58 static emlrtRSInfo bg_emlrtRSI = { 399, "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m" }; 59 static emlrtRSInfo cg_emlrtRSI = { 34, "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m" }; 60 static emlrtRSInfo dg_emlrtRSI = { 57, "eml_matlab_zlanhs", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlanhs.m" }; 61 static emlrtRSInfo eg_emlrtRSI = { 67, "eml_matlab_zlartg", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlartg.m" }; 62 static emlrtRSInfo fg_emlrtRSI = { 93, "eml_matlab_zlartg", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlartg.m" }; 63 static emlrtRSInfo gg_emlrtRSI = { 19, "eml_xnrm2", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/blas/eml_xnrm2.m" }; 64 static emlrtRSInfo ig_emlrtRSI = { 24, "eml_blas_xnrm2", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/blas/external/eml_blas_xnrm2.m" }; 65 static emlrtRSInfo mg_emlrtRSI = { 16, "eml_warning", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_warning.m" }; 66 static emlrtRSInfo ng_emlrtRSI = { 16, "eml_warning", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_warning.m" }; 67 static emlrtRSInfo pk_emlrtRSI = { 64, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 68 static emlrtRSInfo qk_emlrtRSI = { 71, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 69 static emlrtRSInfo hn_emlrtRSI = { 43, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 70 static emlrtRSInfo fo_emlrtRSI = { 111, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 71 static emlrtRSInfo go_emlrtRSI = { 114, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 72 static emlrtRSInfo ho_emlrtRSI = { 122, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 73 static emlrtRSInfo io_emlrtRSI = { 40, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 74 static emlrtRSInfo jo_emlrtRSI = { 41, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 75 static emlrtRSInfo ko_emlrtRSI = { 55, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 76 static emlrtRSInfo lo_emlrtRSI = { 59, "eig", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/matfun/eig.m" }; 77 static emlrtRSInfo mo_emlrtRSI = { 9, "eml_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/eml_xgeev.m" }; 78 static emlrtRSInfo no_emlrtRSI = { 16, "eml_lapack_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/internal/eml_lapack_xgeev.m" }; 79 static emlrtRSInfo oo_emlrtRSI = { 8, "eml_lapack_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/internal/eml_lapack_xgeev.m" }; 80 static emlrtRSInfo po_emlrtRSI = { 108, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 81 static emlrtRSInfo qo_emlrtRSI = { 106, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 82 static emlrtRSInfo ro_emlrtRSI = { 101, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 83 static emlrtRSInfo so_emlrtRSI = { 100, "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m" }; 84 static emlrtRSInfo to_emlrtRSI = { 30, "eml_matlab_zgghrd", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zgghrd.m" }; 85 static emlrtRSInfo uo_emlrtRSI = { 399, "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m" }; 86 static emlrtRSInfo vo_emlrtRSI = { 34, "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m" }; 87 static emlrtRSInfo wo_emlrtRSI = { 57, "eml_matlab_zlanhs", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlanhs.m" }; 88 static emlrtMCInfo m_emlrtMCI = { 20, 19, "eml_error", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_error.m" }; 89 static emlrtMCInfo n_emlrtMCI = { 20, 5, "eml_error", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_error.m" }; 90 static emlrtMCInfo s_emlrtMCI = { 34, 5, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 91 static emlrtMCInfo t_emlrtMCI = { 33, 15, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 92 static emlrtMCInfo u_emlrtMCI = { 85, 13, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 93 static emlrtMCInfo v_emlrtMCI = { 84, 23, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 94 static emlrtMCInfo w_emlrtMCI = { 90, 13, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 95 static emlrtMCInfo x_emlrtMCI = { 89, 23, "mtimes", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mtimes.m" }; 96 static emlrtMCInfo db_emlrtMCI = { 20, 19, "eml_error", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_error.m" }; 97 static emlrtMCInfo eb_emlrtMCI = { 20, 5, "eml_error", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_error.m" }; 98 static emlrtMCInfo jb_emlrtMCI = { 16, 21, "eml_warning", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_warning.m" }; 99 static emlrtMCInfo kb_emlrtMCI = { 16, 5, "eml_warning", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_warning.m" }; 100 static emlrtMCInfo lb_emlrtMCI = { 16, 21, "eml_warning", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_warning.m" }; 101 static emlrtMCInfo mb_emlrtMCI = { 16, 5, "eml_warning", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_warning.m" }; 102 static emlrtBCInfo hc_emlrtBCI = { -1, -1, 117, 11, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 103 static emlrtBCInfo ic_emlrtBCI = { -1, -1, 117, 13, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 104 static emlrtBCInfo jc_emlrtBCI = { -1, -1, 119, 20, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 105 static emlrtBCInfo kc_emlrtBCI = { -1, -1, 119, 22, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 106 static emlrtBCInfo lc_emlrtBCI = { -1, -1, 119, 11, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 107 static emlrtBCInfo mc_emlrtBCI = { -1, -1, 119, 13, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 108 static emlrtECInfo f_emlrtECI = { -1, 125, 5, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 109 static emlrtBCInfo nc_emlrtBCI = { -1, -1, 18, 24, "", "eml_lapack_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/internal/eml_lapack_xgeev.m", 0 }; 110 static emlrtBCInfo oc_emlrtBCI = { -1, -1, 18, 17, "", "eml_lapack_xgeev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/internal/eml_lapack_xgeev.m", 0 }; 111 static emlrtBCInfo pc_emlrtBCI = { -1, -1, 80, 13, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 112 static emlrtBCInfo qc_emlrtBCI = { -1, -1, 80, 11, "", "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m", 0 }; 113 static emlrtECInfo g_emlrtECI = { -1, 61, 17, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 114 static emlrtBCInfo rc_emlrtBCI = { -1, -1, 119, 22, "", "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m", 0 }; 115 static emlrtBCInfo sc_emlrtBCI = { -1, -1, 119, 19, "", "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m", 0 }; 116 static emlrtBCInfo tc_emlrtBCI = { -1, -1, 119, 33, "", "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m", 0 }; 117 static emlrtBCInfo uc_emlrtBCI = { -1, -1, 119, 30, "", "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m", 0 }; 118 static emlrtBCInfo vc_emlrtBCI = { -1, -1, 110, 26, "", "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m", 0 }; 119 static emlrtBCInfo wc_emlrtBCI = { -1, -1, 110, 24, "", "eml_matlab_zggev", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggev.m", 0 }; 120 static emlrtBCInfo xc_emlrtBCI = { -1, -1, 188, 15, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 121 static emlrtBCInfo yc_emlrtBCI = { -1, -1, 184, 15, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 122 static emlrtBCInfo ad_emlrtBCI = { -1, -1, 184, 31, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 123 static emlrtBCInfo bd_emlrtBCI = { -1, -1, 175, 16, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 124 static emlrtBCInfo cd_emlrtBCI = { -1, -1, 171, 13, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 125 static emlrtBCInfo dd_emlrtBCI = { -1, -1, 171, 46, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 126 static emlrtBCInfo ed_emlrtBCI = { -1, -1, 171, 42, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 127 static emlrtBCInfo fd_emlrtBCI = { -1, -1, 171, 39, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 128 static emlrtBCInfo gd_emlrtBCI = { -1, -1, 171, 25, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 129 static emlrtBCInfo hd_emlrtBCI = { -1, -1, 167, 9, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 130 static emlrtBCInfo id_emlrtBCI = { -1, -1, 98, 9, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 131 static emlrtRTEInfo b_emlrtRTEI = { 113, 5, "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m" }; 132 static emlrtBCInfo jd_emlrtBCI = { -1, -1, 69, 25, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 133 static emlrtBCInfo kd_emlrtBCI = { -1, -1, 69, 22, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 134 static emlrtBCInfo ld_emlrtBCI = { -1, -1, 66, 45, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 135 static emlrtBCInfo md_emlrtBCI = { -1, -1, 66, 42, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 136 static emlrtRTEInfo c_emlrtRTEI = { 48, 1, "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m" }; 137 static emlrtBCInfo nd_emlrtBCI = { -1, -1, 24, 18, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 138 static emlrtBCInfo od_emlrtBCI = { -1, -1, 24, 16, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 139 static emlrtBCInfo pd_emlrtBCI = { -1, -1, 100, 5, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 140 static emlrtBCInfo qd_emlrtBCI = { -1, -1, 112, 5, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 141 static emlrtBCInfo rd_emlrtBCI = { -1, -1, 188, 18, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 142 static emlrtBCInfo sd_emlrtBCI = { -1, -1, 184, 18, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 143 static emlrtBCInfo td_emlrtBCI = { -1, -1, 184, 18, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 144 static emlrtBCInfo ud_emlrtBCI = { -1, -1, 100, 5, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 145 static emlrtBCInfo vd_emlrtBCI = { -1, -1, 112, 5, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 146 static emlrtBCInfo wd_emlrtBCI = { -1, -1, 188, 18, "", "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m", 0 }; 147 static emlrtBCInfo ae_emlrtBCI = { -1, -1, 22, 19, "", "eml_matlab_zlanhs", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlanhs.m", 0 }; 148 static emlrtBCInfo be_emlrtBCI = { -1, -1, 22, 17, "", "eml_matlab_zlanhs", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zlanhs.m", 0 }; 149 static emlrtBCInfo ce_emlrtBCI = { -1, -1, 59, 35, "", "eml_blas_xnrm2", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/blas/external/eml_blas_xnrm2.m", 0 }; 150 static emlrtECInfo h_emlrtECI = { 1, 16, 9, "eml_div", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/eml_div.m" }; 151 static emlrtECInfo i_emlrtECI = { -1, 61, 17, "mpower", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/ops/mpower.m" }; 152 static emlrtRTEInfo f_emlrtRTEI = { 48, 1, "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m" }; 153 static emlrtRTEInfo g_emlrtRTEI = { 113, 5, "eml_matlab_ztgevc", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_ztgevc.m" }; 154 static emlrtBCInfo xh_emlrtBCI = { -1, -1, 434, 13, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 155 static emlrtBCInfo yh_emlrtBCI = { -1, -1, 470, 5, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 156 static emlrtBCInfo ai_emlrtBCI = { -1, -1, 433, 13, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 157 static emlrtBCInfo bi_emlrtBCI = { -1, -1, 264, 13, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 158 static emlrtBCInfo ci_emlrtBCI = { -1, -1, 470, 21, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 159 static emlrtBCInfo di_emlrtBCI = { -1, -1, 470, 19, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 160 static emlrtBCInfo ei_emlrtBCI = { -1, -1, 398, 52, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 161 static emlrtBCInfo fi_emlrtBCI = { -1, -1, 398, 24, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 162 static emlrtBCInfo gi_emlrtBCI = { -1, -1, 389, 42, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 163 static emlrtBCInfo hi_emlrtBCI = { -1, -1, 389, 35, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 164 static emlrtBCInfo ii_emlrtBCI = { -1, -1, 352, 41, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 165 static emlrtBCInfo ji_emlrtBCI = { -1, -1, 333, 35, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 166 static emlrtBCInfo ki_emlrtBCI = { -1, -1, 333, 29, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 167 static emlrtBCInfo li_emlrtBCI = { -1, -1, 332, 37, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 168 static emlrtBCInfo mi_emlrtBCI = { -1, -1, 332, 29, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 169 static emlrtBCInfo ni_emlrtBCI = { -1, -1, 331, 34, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 170 static emlrtBCInfo oi_emlrtBCI = { -1, -1, 331, 28, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 171 static emlrtBCInfo pi_emlrtBCI = { -1, -1, 330, 36, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 172 static emlrtBCInfo qi_emlrtBCI = { -1, -1, 330, 28, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 173 static emlrtBCInfo ri_emlrtBCI = { -1, -1, 264, 37, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 174 static emlrtBCInfo si_emlrtBCI = { -1, -1, 264, 31, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 175 static emlrtBCInfo ti_emlrtBCI = { -1, -1, 115, 29, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 176 static emlrtBCInfo ui_emlrtBCI = { -1, -1, 115, 23, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 177 static emlrtBCInfo vi_emlrtBCI = { -1, -1, 116, 15, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 178 static emlrtBCInfo wi_emlrtBCI = { -1, -1, 116, 21, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 179 static emlrtBCInfo xi_emlrtBCI = { -1, -1, 352, 47, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 180 static emlrtBCInfo yi_emlrtBCI = { -1, -1, 116, 15, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 181 static emlrtBCInfo aj_emlrtBCI = { -1, -1, 116, 21, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 182 static emlrtBCInfo bj_emlrtBCI = { -1, -1, 352, 47, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 183 static emlrtBCInfo cj_emlrtBCI = { -1, -1, 71, 19, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 184 static emlrtBCInfo dj_emlrtBCI = { -1, -1, 71, 21, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 185 static emlrtBCInfo ej_emlrtBCI = { -1, -1, 71, 5, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 186 static emlrtBCInfo fj_emlrtBCI = { -1, -1, 19, 13, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 187 static emlrtBCInfo gj_emlrtBCI = { -1, -1, 23, 25, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 188 static emlrtBCInfo hj_emlrtBCI = { -1, -1, 23, 27, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 189 static emlrtBCInfo ij_emlrtBCI = { -1, -1, 24, 30, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 190 static emlrtBCInfo jj_emlrtBCI = { -1, -1, 24, 19, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 191 static emlrtBCInfo kj_emlrtBCI = { -1, -1, 24, 21, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 192 static emlrtBCInfo lj_emlrtBCI = { -1, -1, 25, 21, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 193 static emlrtBCInfo mj_emlrtBCI = { -1, -1, 33, 13, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 194 static emlrtBCInfo nj_emlrtBCI = { -1, -1, 37, 27, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 195 static emlrtBCInfo oj_emlrtBCI = { -1, -1, 38, 30, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 196 static emlrtBCInfo pj_emlrtBCI = { -1, -1, 38, 21, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 197 static emlrtBCInfo qj_emlrtBCI = { -1, -1, 39, 21, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 198 static emlrtBCInfo rj_emlrtBCI = { -1, -1, 37, 25, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 199 static emlrtBCInfo sj_emlrtBCI = { -1, -1, 39, 19, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 200 static emlrtBCInfo tj_emlrtBCI = { -1, -1, 25, 19, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 201 static emlrtBCInfo uj_emlrtBCI = { -1, -1, 25, 19, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 202 static emlrtBCInfo vj_emlrtBCI = { -1, -1, 37, 25, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 203 static emlrtBCInfo wj_emlrtBCI = { -1, -1, 39, 19, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 204 static emlrtBCInfo xj_emlrtBCI = { -1, -1, 24, 28, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 205 static emlrtBCInfo yj_emlrtBCI = { -1, -1, 38, 28, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 206 static emlrtBCInfo ak_emlrtBCI = { -1, -1, 38, 19, "", "eml_matlab_zggbak", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zggbak.m", 0 }; 207 static emlrtBCInfo bk_emlrtBCI = { -1, -1, 433, 13, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 208 static emlrtBCInfo ck_emlrtBCI = { -1, -1, 71, 5, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 209 static emlrtBCInfo dk_emlrtBCI = { -1, -1, 398, 24, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 210 static emlrtBCInfo ek_emlrtBCI = { 1, 1, 352, 47, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 211 static emlrtBCInfo fk_emlrtBCI = { -1, -1, 330, 28, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 212 static emlrtBCInfo gk_emlrtBCI = { 1, 1, 115, 29, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 213 static emlrtBCInfo hk_emlrtBCI = { -1, -1, 115, 23, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 214 static emlrtBCInfo ik_emlrtBCI = { -1, -1, 116, 15, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 215 static emlrtDCInfo emlrtDCI = { 116, 15, "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 1 }; 216 static emlrtBCInfo jk_emlrtBCI = { -1, -1, 116, 15, "", "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 0 }; 217 static emlrtDCInfo b_emlrtDCI = { 116, 15, "eml_matlab_zhgeqz", "C:/Program Files/MATLAB/R2011b/toolbox/eml/lib/matlab/eml/lapack/matlab/eml_matlab_zhgeqz.m", 1 }; 218 219 /* Function Declarations */ 220 static void b_eml_div(const creal_T x_data[1], const int32_T x_sizes[1], const creal_T y_data[1], const int32_T y_sizes[1], creal_T z_data[1], int32_T z_sizes[1]); 221 static void b_eml_error(void); 222 static void b_eml_matlab_zggev(creal_T A_data[1], int32_T A_sizes[1], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1], creal_T V_data[1], int32_T V_sizes[2]); 223 static void b_eml_matlab_zhgeqz(creal_T A_data[1], int32_T A_sizes[1], int32_T ilo, int32_T ihi, creal_T Z_data[1], int32_T Z_sizes[2], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1]); 224 static void b_eml_warning(void); 225 static void c_eml_warning(void); 226 static int32_T div_s32_floor(int32_T numerator, int32_T denominator); 227 static creal_T eml_div(const creal_T x, real_T y); 228 static void eml_error(void); 229 static void eml_matlab_zggbak(creal_T V_data[1], int32_T V_sizes[2], int32_T ilo, int32_T ihi, const int32_T rscale_data[1], const int32_T rscale_sizes[1]); 230 static void eml_matlab_zggev(creal_T A_data[1], int32_T A_sizes[2], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1], creal_T V_data[1], int32_T V_sizes[2]); 231 static void eml_matlab_zhgeqz(creal_T A_data[1], int32_T A_sizes[2], int32_T ilo, int32_T ihi, creal_T Z_data[1], int32_T Z_sizes[2], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1]); 232 static real_T eml_matlab_zlanhs(const creal_T A_data[1], const int32_T A_sizes[2], int32_T ilo, int32_T ihi); 233 static void eml_matlab_zlartg(const creal_T f, const creal_T g, real_T *cs, creal_T *sn); 234 static void eml_matlab_zlascl(real_T cfrom, real_T cto, creal_T A_data[1], int32_T A_sizes[1]); 235 static real_T eml_xnrm2(int32_T n, const creal_T x_data[1], const int32_T x_sizes[2], int32_T ix0); 236 static void matrix_to_integer_power(real_T a_data[1], int32_T a_sizes[2], real_T b, real_T c_data[1], int32_T c_sizes[2]); 237 238 /* Function Definitions */ 239 240 static void b_eml_div(const creal_T x_data[1], const int32_T x_sizes[1], const creal_T y_data[1], const int32_T y_sizes[1], creal_T z_data[1], int32_T z_sizes[1]) 241 { 242 int32_T x[1]; 243 int32_T y[1]; 244 int32_T loop_ub; 245 int32_T i9; 246 real_T brm; 247 real_T bim; 248 real_T d; 249 x[0] = x_sizes[0]; 250 y[0] = y_sizes[0]; 251 emlrtSizeEqCheckND(x, y, &h_emlrtECI); 252 z_sizes[0] = x_sizes[0]; 253 loop_ub = x_sizes[0] - 1; 254 for (i9 = 0; i9 <= loop_ub; i9++) { 255 if (y_data[i9].im == 0.0) { 256 if (x_data[i9].im == 0.0) { 257 z_data[i9].re = x_data[i9].re / y_data[i9].re; 258 z_data[i9].im = 0.0; 259 } else if (x_data[i9].re == 0.0) { 260 z_data[i9].re = 0.0; 261 z_data[i9].im = x_data[i9].im / y_data[i9].re; 262 } else { 263 z_data[i9].re = x_data[i9].re / y_data[i9].re; 264 z_data[i9].im = x_data[i9].im / y_data[i9].re; 265 } 266 } else if (y_data[i9].re == 0.0) { 267 if (x_data[i9].re == 0.0) { 268 z_data[i9].re = x_data[i9].im / y_data[i9].im; 269 z_data[i9].im = 0.0; 270 } else if (x_data[i9].im == 0.0) { 271 z_data[i9].re = 0.0; 272 z_data[i9].im = -(x_data[i9].re / y_data[i9].im); 273 } else { 274 z_data[i9].re = x_data[i9].im / y_data[i9].im; 275 z_data[i9].im = -(x_data[i9].re / y_data[i9].im); 276 } 277 } else { 278 brm = muDoubleScalarAbs(y_data[i9].re); 279 bim = muDoubleScalarAbs(y_data[i9].im); 280 if (brm > bim) { 281 bim = y_data[i9].im / y_data[i9].re; 282 d = y_data[i9].re + bim * y_data[i9].im; 283 z_data[i9].re = (x_data[i9].re + bim * x_data[i9].im) / d; 284 z_data[i9].im = (x_data[i9].im - bim * x_data[i9].re) / d; 285 } else if (bim == brm) { 286 bim = y_data[i9].re > 0.0 ? 0.5 : -0.5; 287 d = y_data[i9].im > 0.0 ? 0.5 : -0.5; 288 z_data[i9].re = (x_data[i9].re * bim + x_data[i9].im * d) / brm; 289 z_data[i9].im = (x_data[i9].im * bim - x_data[i9].re * d) / brm; 290 } else { 291 bim = y_data[i9].re / y_data[i9].im; 292 d = y_data[i9].im + bim * y_data[i9].re; 293 z_data[i9].re = (bim * x_data[i9].re + x_data[i9].im) / d; 294 z_data[i9].im = (bim * x_data[i9].im - x_data[i9].re) / d; 295 } 296 } 297 } 298 } 299 300 static void b_eml_error(void) 301 { 302 const mxArray *y; 303 static const int32_T iv16[2] = { 1, 37 }; 304 const mxArray *m8; 305 static const char_T cv9[37] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'm', 'p', 'o', 'w', 'e', 'r', '_', 'n', 'e', 'e', 'd', 'C', 'o', 'm', 'p', 'l', 'e', 'x', 'I', 'n', 'p', 'u', 't' }; 306 EMLRTPUSHRTSTACK(&df_emlrtRSI); 307 y = NULL; 308 m8 = mxCreateCharArray(2, iv16); 309 emlrtInitCharArray(37, m8, cv9); 310 emlrtAssign(&y, m8); 311 error(message(y, &db_emlrtMCI), &eb_emlrtMCI); 312 EMLRTPOPRTSTACK(&df_emlrtRSI); 313 } 314 315 static void b_eml_matlab_zggev(creal_T A_data[1], int32_T A_sizes[1], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1], creal_T V_data[1], int32_T V_sizes[2]) 316 { 317 real_T anrm; 318 int32_T work1_sizes; 319 boolean_T exitg1; 320 real_T a; 321 real_T b; 322 boolean_T ilascl; 323 creal_T tmp_data[1]; 324 int32_T i20; 325 int32_T rscale_sizes; 326 int32_T rscale_data[1]; 327 int32_T tmp_sizes[2]; 328 real_T b_tmp_data[1]; 329 creal_T work1_data[1]; 330 creal_T work2_data[1]; 331 int32_T b_tmp_sizes[2]; 332 creal_T c_tmp_data[1]; 333 *info = 0.0; 334 anrm = 0.0; 335 work1_sizes = 0; 336 exitg1 = 0U; 337 while ((exitg1 == 0U) && (work1_sizes <= 0)) { 338 a = muDoubleScalarAbs(A_data[0].re); 339 b = muDoubleScalarAbs(A_data[0].im); 340 if (a < b) { 341 a /= b; 342 b *= muDoubleScalarSqrt(a * a + 1.0); 343 } else if (a > b) { 344 b /= a; 345 b = muDoubleScalarSqrt(b * b + 1.0) * a; 346 } else if (muDoubleScalarIsNaN(b)) { 347 } else { 348 b = a * 1.4142135623730951; 349 } 350 if (muDoubleScalarIsNaN(b)) { 351 anrm = rtNaN; 352 exitg1 = 1U; 353 } else { 354 if (b > anrm) { 355 anrm = b; 356 } 357 work1_sizes = 1; 358 } 359 } 360 if (!((!muDoubleScalarIsInf(anrm)) && (!muDoubleScalarIsNaN(anrm)))) { 361 alpha1_sizes[0] = 1; 362 alpha1_data[0].re = rtNaN; 363 alpha1_data[0].im = 0.0; 364 beta1_sizes[0] = 1; 365 beta1_data[0].re = rtNaN; 366 beta1_data[0].im = 0.0; 367 V_sizes[0] = 1; 368 V_sizes[1] = 1; 369 V_data[0].re = rtNaN; 370 V_data[0].im = 0.0; 371 } else { 372 ilascl = FALSE; 373 b = anrm; 374 if ((anrm > 0.0) && (anrm < 6.7178761075670888E-139)) { 375 b = 6.7178761075670888E-139; 376 ilascl = TRUE; 377 } else { 378 if (anrm > 1.4885657073574029E+138) { 379 b = 1.4885657073574029E+138; 380 ilascl = TRUE; 381 } 382 } 383 if (ilascl) { 384 work1_sizes = 1; 385 tmp_data[0] = A_data[0]; 386 eml_matlab_zlascl(anrm, b, tmp_data, &work1_sizes); 387 work1_sizes--; 388 for (i20 = 0; i20 <= work1_sizes; i20++) { 389 A_data[i20] = tmp_data[i20]; 390 } 391 } 392 rscale_sizes = 1; 393 rscale_data[0] = 0; 394 rscale_data[0] = 1; 395 EMLRTPUSHRTSTACK(&so_emlrtRSI); 396 EMLRTPUSHRTSTACK(&to_emlrtRSI); 397 eye(1, b_tmp_data, tmp_sizes); 398 V_sizes[0] = tmp_sizes[0]; 399 V_sizes[1] = tmp_sizes[1]; 400 work1_sizes = tmp_sizes[0] * tmp_sizes[1] - 1; 401 for (i20 = 0; i20 <= work1_sizes; i20++) { 402 V_data[i20].re = b_tmp_data[i20]; 403 V_data[i20].im = 0.0; 404 } 405 EMLRTPOPRTSTACK(&to_emlrtRSI); 406 EMLRTPOPRTSTACK(&so_emlrtRSI); 407 EMLRTPUSHRTSTACK(&ro_emlrtRSI); 408 work1_sizes = 1; 409 work1_data[0] = A_data[0]; 410 b_eml_matlab_zhgeqz(work1_data, &work1_sizes, 1, 1, V_data, V_sizes, info, alpha1_data, alpha1_sizes, beta1_data, beta1_sizes); 411 EMLRTPOPRTSTACK(&ro_emlrtRSI); 412 if (*info != 0.0) { 413 } else { 414 EMLRTPUSHRTSTACK(&qo_emlrtRSI); 415 work1_data[0].re = 0.0; 416 work1_data[0].im = 0.0; 417 work2_data[0].re = 0.0; 418 work2_data[0].im = 0.0; 419 emlrtForLoopVectorCheckR2011b(1.0, -1.0, 1.0, mxDOUBLE_CLASS, 1, &f_emlrtRTEI, &emlrtContextGlobal, 0); 420 work1_data[0].re = 0.0; 421 work1_data[0].im = 0.0; 422 work1_data[0].re = 1.0; 423 work1_data[0].im = 0.0; 424 work1_data[0].re = 1.0; 425 work1_data[0].im = 0.0; 426 emlrtForLoopVectorCheckR2011b(0.0, -1.0, 1.0, mxDOUBLE_CLASS, 0, &g_emlrtRTEI, &emlrtContextGlobal, 0); 427 work2_data[0].re = 0.0; 428 work2_data[0].im = 0.0; 429 work2_data[0].re = V_data[0].re * work1_data[0].re - V_data[0].im * work1_data[0].im; 430 work2_data[0].im = V_data[0].re * work1_data[0].im + V_data[0].im * work1_data[0].re; 431 a = muDoubleScalarAbs(work2_data[0].re) + muDoubleScalarAbs(work2_data[0].im); 432 if (a > 2.2250738585072014E-308) { 433 V_data[0].re = 1.0 / a * work2_data[0].re; 434 V_data[0].im = 1.0 / a * work2_data[0].im; 435 } else { 436 V_data[0].re = 0.0; 437 V_data[0].im = 0.0; 438 } 439 EMLRTPOPRTSTACK(&qo_emlrtRSI); 440 EMLRTPUSHRTSTACK(&po_emlrtRSI); 441 b_tmp_sizes[0] = 1; 442 b_tmp_sizes[1] = 1; 443 work1_sizes = V_sizes[0] * V_sizes[1] - 1; 444 for (i20 = 0; i20 <= work1_sizes; i20++) { 445 c_tmp_data[i20] = V_data[i20]; 446 } 447 eml_matlab_zggbak(c_tmp_data, b_tmp_sizes, 1, 1, rscale_data, *(int32_T (*)[1])&rscale_sizes); 448 V_sizes[0] = b_tmp_sizes[0]; 449 V_sizes[1] = b_tmp_sizes[1]; 450 work1_sizes = b_tmp_sizes[0] * b_tmp_sizes[1] - 1; 451 for (i20 = 0; i20 <= work1_sizes; i20++) { 452 V_data[i20] = c_tmp_data[i20]; 453 } 454 EMLRTPOPRTSTACK(&po_emlrtRSI); 455 a = muDoubleScalarAbs(V_data[0].re) + muDoubleScalarAbs(V_data[0].im); 456 if (a >= 6.7178761075670888E-139) { 457 a = 1.0 / a; 458 V_data[0].re *= a; 459 V_data[0].im *= a; 460 } 461 if (ilascl) { 462 work1_sizes = 1; 463 tmp_data[0] = alpha1_data[0]; 464 eml_matlab_zlascl(b, anrm, tmp_data, &work1_sizes); 465 alpha1_sizes[0] = work1_sizes; 466 work1_sizes--; 467 for (i20 = 0; i20 <= work1_sizes; i20++) { 468 alpha1_data[i20] = tmp_data[i20]; 469 } 470 } 471 } 472 } 473 } 474 475 static void b_eml_matlab_zhgeqz(creal_T A_data[1], int32_T A_sizes[1], int32_T ilo, int32_T ihi, creal_T Z_data[1], int32_T Z_sizes[2], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1]) 476 { 477 creal_T ctemp; 478 creal_T rho; 479 real_T anorm; 480 real_T scale; 481 real_T sumsq; 482 boolean_T firstNonZero; 483 real_T imAij; 484 real_T b_atol; 485 int32_T ilastm1; 486 boolean_T guard1 = FALSE; 487 boolean_T guard2 = FALSE; 488 int32_T ilast; 489 int32_T iiter; 490 boolean_T goto60; 491 boolean_T goto70; 492 boolean_T goto90; 493 int32_T jiter; 494 int32_T exitg1; 495 boolean_T b3; 496 boolean_T b_guard1 = FALSE; 497 creal_T b_A_data; 498 creal_T d; 499 *info = 0.0; 500 alpha1_sizes[0] = 1; 501 alpha1_data[0].re = 0.0; 502 alpha1_data[0].im = 0.0; 503 beta1_sizes[0] = 1; 504 beta1_data[0].re = 1.0; 505 beta1_data[0].im = 0.0; 506 ctemp.re = 0.0; 507 ctemp.im = 0.0; 508 rho.re = 0.0; 509 rho.im = 0.0; 510 EMLRTPUSHRTSTACK(&vo_emlrtRSI); 511 anorm = 0.0; 512 if (ilo > ihi) { 513 } else { 514 scale = 0.0; 515 sumsq = 0.0; 516 firstNonZero = TRUE; 517 anorm = A_data[0].re; 518 imAij = A_data[0].im; 519 if (anorm != 0.0) { 520 sumsq = 1.0; 521 scale = muDoubleScalarAbs(anorm); 522 firstNonZero = FALSE; 523 } 524 if (imAij != 0.0) { 525 anorm = muDoubleScalarAbs(imAij); 526 if (firstNonZero) { 527 sumsq = 1.0; 528 scale = anorm; 529 } else if (scale < anorm) { 530 imAij = scale / anorm; 531 sumsq = 1.0 + sumsq * imAij * imAij; 532 scale = anorm; 533 } else { 534 imAij = anorm / scale; 535 sumsq += imAij * imAij; 536 } 537 } 538 EMLRTPUSHRTSTACK(&wo_emlrtRSI); 539 if (sumsq < 0.0) { 540 EMLRTPUSHRTSTACK(&oc_emlrtRSI); 541 eml_error(); 542 EMLRTPOPRTSTACK(&oc_emlrtRSI); 543 } 544 anorm = scale * muDoubleScalarSqrt(sumsq); 545 EMLRTPOPRTSTACK(&wo_emlrtRSI); 546 } 547 EMLRTPOPRTSTACK(&vo_emlrtRSI); 548 anorm *= 2.2204460492503131E-16; 549 b_atol = 2.2250738585072014E-308; 550 if (anorm > 2.2250738585072014E-308) { 551 b_atol = anorm; 552 } 553 firstNonZero = TRUE; 554 ilastm1 = ihi + 1; 555 while (ilastm1 <= 1) { 556 emlrtDynamicBoundsCheck(ilastm1, 1, 1, &ck_emlrtBCI); 557 alpha1_data[0] = A_data[0]; 558 ilastm1 = 2; 559 } 560 guard1 = FALSE; 561 guard2 = FALSE; 562 if (ihi >= ilo) { 563 ilast = 1; 564 ilastm1 = 0; 565 iiter = 0; 566 goto60 = FALSE; 567 goto70 = FALSE; 568 goto90 = FALSE; 569 jiter = 1; 570 do { 571 exitg1 = 0U; 572 if (jiter <= 30) { 573 if (ilast == 1) { 574 goto60 = TRUE; 575 } else { 576 emlrtBoundsCheck(ilastm1, &gk_emlrtBCI); 577 emlrtDynamicBoundsCheck(ilast, 1, 1, &hk_emlrtBCI); 578 if (muDoubleScalarAbs(A_data[ilast - 1].re) + muDoubleScalarAbs(A_data[ilast - 1].im) <= b_atol) { 579 A_data[emlrtDynamicBoundsCheck((int32_T)emlrtIntegerCheckR2009b((real_T)ilast, &b_emlrtDCI), 1, 1, &jk_emlrtBCI) - 1].re = 0.0; 580 A_data[emlrtDynamicBoundsCheck((int32_T)emlrtIntegerCheckR2009b((real_T)ilast, &emlrtDCI), 1, 1, &ik_emlrtBCI) - 1].im = 0.0; 581 goto60 = TRUE; 582 } else { 583 goto70 = TRUE; 584 } 585 } 586 if (goto60 || goto70) { 587 b3 = TRUE; 588 } else { 589 b3 = FALSE; 590 } 591 if (!b3) { 592 alpha1_sizes[0] = 1; 593 alpha1_data[0].re = rtNaN; 594 alpha1_data[0].im = 0.0; 595 beta1_sizes[0] = 1; 596 beta1_data[0].re = rtNaN; 597 beta1_data[0].im = 0.0; 598 Z_sizes[0] = 1; 599 Z_sizes[1] = 1; 600 Z_data[0].re = rtNaN; 601 Z_data[0].im = 0.0; 602 *info = -1.0; 603 exitg1 = 1U; 604 } else { 605 b_guard1 = FALSE; 606 if (goto60) { 607 goto60 = FALSE; 608 alpha1_data[0] = A_data[0]; 609 ilast = ilastm1; 610 ilastm1--; 611 if (ilast < 1) { 612 firstNonZero = FALSE; 613 guard2 = TRUE; 614 exitg1 = 1U; 615 } else { 616 iiter = 0; 617 b_guard1 = TRUE; 618 } 619 } else { 620 if (goto70) { 621 goto70 = FALSE; 622 iiter++; 623 if (iiter - div_s32_floor(iiter, 10) * 10 != 0) { 624 emlrtDynamicBoundsCheck(ilastm1, 1, 1, &fk_emlrtBCI); 625 b_A_data.re = -(A_data[0].re - A_data[0].re); 626 b_A_data.im = -(A_data[0].im - A_data[0].im); 627 rho = eml_div(b_A_data, 2.0); 628 anorm = A_data[0].re * A_data[0].re - A_data[0].im * A_data[0].im; 629 imAij = A_data[0].re * A_data[0].im + A_data[0].im * A_data[0].re; 630 d.re = (rho.re * rho.re - rho.im * rho.im) + anorm; 631 d.im = (rho.re * rho.im + rho.im * rho.re) + imAij; 632 b_sqrt(&d); 633 anorm = (A_data[0].re - (rho.re - d.re)) - A_data[0].re; 634 imAij = (A_data[0].im - (rho.im - d.im)) - A_data[0].im; 635 scale = muDoubleScalarAbs(anorm); 636 sumsq = muDoubleScalarAbs(imAij); 637 if (scale < sumsq) { 638 scale /= sumsq; 639 sumsq *= muDoubleScalarSqrt(scale * scale + 1.0); 640 } else if (scale > sumsq) { 641 sumsq /= scale; 642 sumsq = muDoubleScalarSqrt(sumsq * sumsq + 1.0) * scale; 643 } else if (muDoubleScalarIsNaN(sumsq)) { 644 } else { 645 sumsq = scale * 1.4142135623730951; 646 } 647 anorm = (A_data[0].re - (rho.re + d.re)) - A_data[0].re; 648 imAij = (A_data[0].im - (rho.im + d.im)) - A_data[0].im; 649 scale = muDoubleScalarAbs(anorm); 650 anorm = muDoubleScalarAbs(imAij); 651 if (scale < anorm) { 652 scale /= anorm; 653 anorm *= muDoubleScalarSqrt(scale * scale + 1.0); 654 } else if (scale > anorm) { 655 anorm /= scale; 656 anorm = muDoubleScalarSqrt(anorm * anorm + 1.0) * scale; 657 } else if (muDoubleScalarIsNaN(anorm)) { 658 } else { 659 anorm = scale * 1.4142135623730951; 660 } 661 if (sumsq <= anorm) { 662 rho.re -= d.re; 663 rho.im -= d.im; 664 } else { 665 rho.re += d.re; 666 rho.im += d.im; 667 } 668 } else { 669 emlrtBoundsCheck(ilastm1, &ek_emlrtBCI); 670 } 671 ctemp = rho; 672 goto90 = TRUE; 673 } 674 if (goto90) { 675 goto90 = FALSE; 676 emlrtDynamicBoundsCheck(2, 1, 1, &dk_emlrtBCI); 677 EMLRTPUSHRTSTACK(&uo_emlrtRSI); 678 b_A_data = A_data[1]; 679 eml_matlab_zlartg(ctemp, b_A_data, &anorm, &d); 680 EMLRTPOPRTSTACK(&uo_emlrtRSI); 681 } 682 b_guard1 = TRUE; 683 } 684 if (b_guard1 == TRUE) { 685 jiter++; 686 } 687 } 688 } else { 689 guard2 = TRUE; 690 exitg1 = 1U; 691 } 692 } while (exitg1 == 0U); 693 } else { 694 guard1 = TRUE; 695 } 696 if (guard2 == TRUE) { 697 if (firstNonZero) { 698 *info = (real_T)ilast; 699 ilastm1 = 1; 700 while (ilastm1 <= ilast) { 701 emlrtDynamicBoundsCheck(ilastm1, 1, 1, &bk_emlrtBCI); 702 alpha1_data[0].re = rtNaN; 703 alpha1_data[0].im = 0.0; 704 beta1_data[0].re = rtNaN; 705 beta1_data[0].im = 0.0; 706 ilastm1 = 2; 707 } 708 Z_sizes[0] = 1; 709 Z_sizes[1] = 1; 710 Z_data[0].re = rtNaN; 711 Z_data[0].im = 0.0; 712 } else { 713 guard1 = TRUE; 714 } 715 } 716 if (guard1 == TRUE) { 717 ilastm1 = 1; 718 while (ilastm1 <= ilo - 1) { 719 alpha1_data[0] = A_data[0]; 720 ilastm1 = 2; 721 } 722 } 723 } 724 725 static void b_eml_warning(void) 726 { 727 const mxArray *y; 728 static const int32_T iv17[2] = { 1, 26 }; 729 const mxArray *m9; 730 static const char_T cv10[26] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'e', 'i', 'g', '_', 'Q', 'Z', 'f', 'a', 'i', 'l', 'e', 'd' }; 731 EMLRTPUSHRTSTACK(&mg_emlrtRSI); 732 y = NULL; 733 m9 = mxCreateCharArray(2, iv17); 734 emlrtInitCharArray(26, m9, cv10); 735 emlrtAssign(&y, m9); 736 warning(message(y, &jb_emlrtMCI), &kb_emlrtMCI); 737 EMLRTPOPRTSTACK(&mg_emlrtRSI); 738 } 739 740 static void c_eml_warning(void) 741 { 742 const mxArray *y; 743 static const int32_T iv18[2] = { 1, 34 }; 744 const mxArray *m10; 745 static const char_T cv11[34] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'e', 'i', 'g', '_', 'Q', 'Z', 'n', 'o', 'n', 'c', 'o', 'n', 'v', 'e', 'r', 'g', 'e', 'n', 'c', 'e' }; 746 EMLRTPUSHRTSTACK(&ng_emlrtRSI); 747 y = NULL; 748 m10 = mxCreateCharArray(2, iv18); 749 emlrtInitCharArray(34, m10, cv11); 750 emlrtAssign(&y, m10); 751 warning(message(y, &lb_emlrtMCI), &mb_emlrtMCI); 752 EMLRTPOPRTSTACK(&ng_emlrtRSI); 753 } 754 755 static int32_T div_s32_floor(int32_T numerator, int32_T denominator) 756 { 757 int32_T quotient; 758 uint32_T absNumerator; 759 uint32_T absDenominator; 760 int32_T quotientNeedsNegation; 761 uint32_T tempAbsQuotient; 762 if (denominator == 0) { 763 quotient = numerator >= 0 ? MAX_int32_T : MIN_int32_T; 764 emlrtDivisionByZeroErrorR2008a(0); 765 } else { 766 absNumerator = (uint32_T)(numerator >= 0 ? numerator : -numerator); 767 absDenominator = (uint32_T)(denominator >= 0 ? denominator : -denominator); 768 quotientNeedsNegation = ((numerator < 0) != (denominator < 0)); 769 tempAbsQuotient = absNumerator / absDenominator; 770 if ((uint32_T)quotientNeedsNegation) { 771 absNumerator %= absDenominator; 772 if (absNumerator > (uint32_T)0) { 773 tempAbsQuotient++; 774 } 775 } 776 quotient = (uint32_T)quotientNeedsNegation ? -(int32_T)tempAbsQuotient : (int32_T)tempAbsQuotient; 777 } 778 return quotient; 779 } 780 781 static creal_T eml_div(const creal_T x, real_T y) 782 { 783 creal_T z; 784 if (x.im == 0.0) { 785 z.re = x.re / y; 786 z.im = 0.0; 787 } else if (x.re == 0.0) { 788 z.re = 0.0; 789 z.im = x.im / y; 790 } else { 791 z.re = x.re / y; 792 z.im = x.im / y; 793 } 794 return z; 795 } 796 797 static void eml_error(void) 798 { 799 const mxArray *y; 800 static const int32_T iv9[2] = { 1, 30 }; 801 const mxArray *m5; 802 static const char_T cv5[30] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 's', 'q', 'r', 't', '_', 'd', 'o', 'm', 'a', 'i', 'n', 'E', 'r', 'r', 'o', 'r' }; 803 EMLRTPUSHRTSTACK(&pc_emlrtRSI); 804 y = NULL; 805 m5 = mxCreateCharArray(2, iv9); 806 emlrtInitCharArray(30, m5, cv5); 807 emlrtAssign(&y, m5); 808 error(message(y, &m_emlrtMCI), &n_emlrtMCI); 809 EMLRTPOPRTSTACK(&pc_emlrtRSI); 810 } 811 812 static void eml_matlab_zggbak(creal_T V_data[1], int32_T V_sizes[2], int32_T ilo, int32_T ihi, const int32_T rscale_data[1], const int32_T rscale_sizes[1]) 813 { 814 int32_T n; 815 int32_T m; 816 int32_T j; 817 real_T tmp_re; 818 real_T tmp_im; 819 int32_T i; 820 n = V_sizes[0]; 821 m = V_sizes[1]; 822 if (ilo > 1) { 823 emlrtDynamicBoundsCheck(1, 1, rscale_sizes[0], &fj_emlrtBCI); 824 if (rscale_data[0] != 1) { 825 j = 1; 826 while (j <= m) { 827 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &gj_emlrtBCI); 828 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &hj_emlrtBCI); 829 tmp_re = V_data[0].re; 830 tmp_im = V_data[0].im; 831 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &jj_emlrtBCI); 832 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &kj_emlrtBCI); 833 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &ij_emlrtBCI); 834 V_data[0] = V_data[emlrtDynamicBoundsCheck(rscale_data[0], 1, V_sizes[0], &xj_emlrtBCI) - 1]; 835 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &lj_emlrtBCI); 836 V_data[emlrtDynamicBoundsCheck(rscale_data[0], 1, V_sizes[0], &uj_emlrtBCI) - 1].re = tmp_re; 837 V_data[emlrtDynamicBoundsCheck(rscale_data[0], 1, V_sizes[0], &tj_emlrtBCI) - 1].im = tmp_im; 838 j = 2; 839 } 840 } 841 } 842 if (ihi < n) { 843 for (i = ihi + 1; i <= n; i++) { 844 emlrtDynamicBoundsCheck(i, 1, rscale_sizes[0], &mj_emlrtBCI); 845 if (rscale_data[i - 1] != i) { 846 j = 1; 847 while (j <= m) { 848 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &nj_emlrtBCI); 849 tmp_re = V_data[emlrtDynamicBoundsCheck(i, 1, V_sizes[0], &vj_emlrtBCI) - 1].re; 850 tmp_im = V_data[emlrtDynamicBoundsCheck(i, 1, V_sizes[0], &rj_emlrtBCI) - 1].im; 851 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &pj_emlrtBCI); 852 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &oj_emlrtBCI); 853 V_data[emlrtDynamicBoundsCheck(i, 1, V_sizes[0], &ak_emlrtBCI) - 1] = V_data[emlrtDynamicBoundsCheck(rscale_data[i - 1], 1, V_sizes[0], &yj_emlrtBCI) - 1]; 854 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &qj_emlrtBCI); 855 V_data[emlrtDynamicBoundsCheck(rscale_data[i - 1], 1, V_sizes[0], &wj_emlrtBCI) - 1].re = tmp_re; 856 V_data[emlrtDynamicBoundsCheck(rscale_data[i - 1], 1, V_sizes[0], &sj_emlrtBCI) - 1].im = tmp_im; 857 j = 2; 858 } 859 } 860 } 861 } 862 } 863 864 static void eml_matlab_zggev(creal_T A_data[1], int32_T A_sizes[2], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1], creal_T V_data[1], int32_T V_sizes[2]) 865 { 866 int32_T loop_ub; 867 int32_T i7; 868 real_T anrm; 869 boolean_T exitg1; 870 real_T a; 871 real_T b; 872 boolean_T ilascl; 873 real_T anrmto; 874 boolean_T notdone; 875 real_T cfrom1; 876 real_T cto1; 877 real_T mul; 878 int32_T rscale_sizes; 879 int32_T rscale_data[1]; 880 int32_T tmp_sizes[2]; 881 real_T tmp_data[1]; 882 int32_T b_A_sizes[2]; 883 creal_T b_A_data[1]; 884 creal_T work1_data[1]; 885 creal_T work2_data[1]; 886 *info = 0.0; 887 alpha1_sizes[0] = A_sizes[0]; 888 loop_ub = A_sizes[0] - 1; 889 for (i7 = 0; i7 <= loop_ub; i7++) { 890 alpha1_data[i7].re = 0.0; 891 alpha1_data[i7].im = 0.0; 892 } 893 beta1_sizes[0] = A_sizes[0]; 894 loop_ub = A_sizes[0] - 1; 895 for (i7 = 0; i7 <= loop_ub; i7++) { 896 beta1_data[i7].re = 0.0; 897 beta1_data[i7].im = 0.0; 898 } 899 V_sizes[0] = A_sizes[0]; 900 V_sizes[1] = A_sizes[0]; 901 loop_ub = A_sizes[0] * A_sizes[0] - 1; 902 for (i7 = 0; i7 <= loop_ub; i7++) { 903 V_data[i7].re = 0.0; 904 V_data[i7].im = 0.0; 905 } 906 if ((A_sizes[0] == 0) || (A_sizes[1] == 0)) { 907 } else { 908 EMLRTPUSHRTSTACK(&qf_emlrtRSI); 909 anrm = 0.0; 910 loop_ub = 0; 911 exitg1 = 0U; 912 while ((exitg1 == 0U) && (loop_ub <= 0)) { 913 a = muDoubleScalarAbs(A_data[0].re); 914 b = muDoubleScalarAbs(A_data[0].im); 915 if (a < b) { 916 a /= b; 917 b *= muDoubleScalarSqrt(a * a + 1.0); 918 } else if (a > b) { 919 b /= a; 920 b = muDoubleScalarSqrt(b * b + 1.0) * a; 921 } else if (muDoubleScalarIsNaN(b)) { 922 } else { 923 b = a * 1.4142135623730951; 924 } 925 if (muDoubleScalarIsNaN(b)) { 926 anrm = rtNaN; 927 exitg1 = 1U; 928 } else { 929 if (b > anrm) { 930 anrm = b; 931 } 932 loop_ub = 1; 933 } 934 } 935 EMLRTPOPRTSTACK(&qf_emlrtRSI); 936 if (!((!muDoubleScalarIsInf(anrm)) && (!muDoubleScalarIsNaN(anrm)))) { 937 alpha1_sizes[0] = 1; 938 alpha1_data[0].re = rtNaN; 939 alpha1_data[0].im = 0.0; 940 beta1_sizes[0] = 1; 941 beta1_data[0].re = rtNaN; 942 beta1_data[0].im = 0.0; 943 V_sizes[0] = 1; 944 V_sizes[1] = 1; 945 i7 = 0; 946 while (i7 < 1) { 947 V_data[0].re = rtNaN; 948 V_data[0].im = 0.0; 949 i7 = 1; 950 } 951 } else { 952 ilascl = FALSE; 953 anrmto = anrm; 954 if ((anrm > 0.0) && (anrm < 6.7178761075670888E-139)) { 955 anrmto = 6.7178761075670888E-139; 956 ilascl = TRUE; 957 } else { 958 if (anrm > 1.4885657073574029E+138) { 959 anrmto = 1.4885657073574029E+138; 960 ilascl = TRUE; 961 } 962 } 963 if (ilascl) { 964 a = anrm; 965 b = anrmto; 966 notdone = TRUE; 967 while (notdone) { 968 cfrom1 = a * 2.0041683600089728E-292; 969 cto1 = b / 4.9896007738368E+291; 970 if ((cfrom1 > b) && (b != 0.0)) { 971 mul = 2.0041683600089728E-292; 972 a = cfrom1; 973 } else if (cto1 > a) { 974 mul = 4.9896007738368E+291; 975 b = cto1; 976 } else { 977 mul = b / a; 978 notdone = FALSE; 979 } 980 loop_ub = A_sizes[0] * A_sizes[1] - 1; 981 for (i7 = 0; i7 <= loop_ub; i7++) { 982 A_data[i7].re *= mul; 983 A_data[i7].im *= mul; 984 } 985 } 986 } 987 EMLRTPUSHRTSTACK(&pf_emlrtRSI); 988 rscale_sizes = 1; 989 rscale_data[0] = 0; 990 rscale_data[0] = 1; 991 EMLRTPOPRTSTACK(&pf_emlrtRSI); 992 EMLRTPUSHRTSTACK(&of_emlrtRSI); 993 EMLRTPUSHRTSTACK(&rf_emlrtRSI); 994 eye(1, tmp_data, tmp_sizes); 995 V_sizes[0] = tmp_sizes[0]; 996 V_sizes[1] = tmp_sizes[1]; 997 loop_ub = tmp_sizes[0] * tmp_sizes[1] - 1; 998 for (i7 = 0; i7 <= loop_ub; i7++) { 999 V_data[i7].re = tmp_data[i7]; 1000 V_data[i7].im = 0.0; 1001 } 1002 EMLRTPOPRTSTACK(&rf_emlrtRSI); 1003 EMLRTPOPRTSTACK(&of_emlrtRSI); 1004 EMLRTPUSHRTSTACK(&nf_emlrtRSI); 1005 b_A_sizes[0] = A_sizes[0]; 1006 b_A_sizes[1] = A_sizes[1]; 1007 loop_ub = A_sizes[0] * A_sizes[1] - 1; 1008 for (i7 = 0; i7 <= loop_ub; i7++) { 1009 b_A_data[i7] = A_data[i7]; 1010 } 1011 eml_matlab_zhgeqz(b_A_data, b_A_sizes, 1, 1, V_data, V_sizes, info, alpha1_data, alpha1_sizes, beta1_data, beta1_sizes); 1012 EMLRTPOPRTSTACK(&nf_emlrtRSI); 1013 if (*info != 0.0) { 1014 } else { 1015 EMLRTPUSHRTSTACK(&mf_emlrtRSI); 1016 loop_ub = b_A_sizes[0] - 1; 1017 for (i7 = 0; i7 <= loop_ub; i7++) { 1018 work1_data[i7].re = 0.0; 1019 work1_data[i7].im = 0.0; 1020 } 1021 loop_ub = b_A_sizes[0] - 1; 1022 for (i7 = 0; i7 <= loop_ub; i7++) { 1023 work2_data[i7].re = 0.0; 1024 work2_data[i7].im = 0.0; 1025 } 1026 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &od_emlrtBCI); 1027 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[1], &nd_emlrtBCI); 1028 emlrtForLoopVectorCheckR2011b((real_T)b_A_sizes[0], -1.0, 1.0, mxDOUBLE_CLASS, b_A_sizes[0], &c_emlrtRTEI, &emlrtContextGlobal, 0); 1029 loop_ub = 0; 1030 while (loop_ub <= b_A_sizes[0] - 1) { 1031 emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[1], &ld_emlrtBCI); 1032 emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[0], &md_emlrtBCI); 1033 emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[1], &jd_emlrtBCI); 1034 emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[0], &kd_emlrtBCI); 1035 loop_ub = 0; 1036 while (loop_ub <= b_A_sizes[0] - 1) { 1037 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &id_emlrtBCI); 1038 work1_data[0].re = 0.0; 1039 work1_data[0].im = 0.0; 1040 loop_ub = 1; 1041 } 1042 work1_data[emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[0], &ud_emlrtBCI) - 1].re = 1.0; 1043 work1_data[emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[0], &pd_emlrtBCI) - 1].im = 0.0; 1044 work1_data[emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[0], &vd_emlrtBCI) - 1].re = 1.0; 1045 work1_data[emlrtDynamicBoundsCheck(b_A_sizes[0], 1, b_A_sizes[0], &qd_emlrtBCI) - 1].im = 0.0; 1046 emlrtForLoopVectorCheckR2011b((real_T)b_A_sizes[0] - 1.0, -1.0, 1.0, mxDOUBLE_CLASS, b_A_sizes[0] - 1, &b_emlrtRTEI, &emlrtContextGlobal, 0); 1047 loop_ub = 0; 1048 while (loop_ub <= b_A_sizes[0] - 1) { 1049 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &hd_emlrtBCI); 1050 work2_data[0].re = 0.0; 1051 work2_data[0].im = 0.0; 1052 loop_ub = 1; 1053 } 1054 loop_ub = 0; 1055 while (loop_ub <= b_A_sizes[0] - 1) { 1056 loop_ub = 0; 1057 while (loop_ub <= b_A_sizes[0] - 1) { 1058 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &cd_emlrtBCI); 1059 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &gd_emlrtBCI); 1060 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &fd_emlrtBCI); 1061 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &ed_emlrtBCI); 1062 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &dd_emlrtBCI); 1063 work2_data[0].re += V_data[0].re * work1_data[0].re - V_data[0].im * 0.0; 1064 work2_data[0].im += V_data[0].re * 0.0 + V_data[0].im * work1_data[0].re; 1065 loop_ub = 1; 1066 } 1067 loop_ub = 1; 1068 } 1069 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &bd_emlrtBCI); 1070 a = muDoubleScalarAbs(work2_data[0].re) + muDoubleScalarAbs(work2_data[0].im); 1071 if (a > 2.2250738585072014E-308) { 1072 a = 1.0 / a; 1073 loop_ub = 0; 1074 while (loop_ub <= b_A_sizes[0] - 1) { 1075 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &yc_emlrtBCI); 1076 emlrtDynamicBoundsCheck(1, 1, b_A_sizes[0], &ad_emlrtBCI); 1077 V_data[V_sizes[0] * (emlrtDynamicBoundsCheck(b_A_sizes[0], 1, V_sizes[1], &sd_emlrtBCI) - 1)].re = a * work2_data[0].re; 1078 V_data[V_sizes[0] * (emlrtDynamicBoundsCheck(b_A_sizes[0], 1, V_sizes[1], &td_emlrtBCI) - 1)].im = a * work2_data[0].im; 1079 loop_ub = 1; 1080 } 1081 } else { 1082 loop_ub = 0; 1083 while (loop_ub <= b_A_sizes[0] - 1) { 1084 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &xc_emlrtBCI); 1085 V_data[V_sizes[0] * (emlrtDynamicBoundsCheck(b_A_sizes[0], 1, V_sizes[1], &wd_emlrtBCI) - 1)].re = 0.0; 1086 V_data[V_sizes[0] * (emlrtDynamicBoundsCheck(b_A_sizes[0], 1, V_sizes[1], &rd_emlrtBCI) - 1)].im = 0.0; 1087 loop_ub = 1; 1088 } 1089 } 1090 loop_ub = 1; 1091 } 1092 EMLRTPOPRTSTACK(&mf_emlrtRSI); 1093 EMLRTPUSHRTSTACK(&lf_emlrtRSI); 1094 eml_matlab_zggbak(V_data, V_sizes, 1, 1, rscale_data, *(int32_T (*)[1])&rscale_sizes); 1095 EMLRTPOPRTSTACK(&lf_emlrtRSI); 1096 loop_ub = 0; 1097 while (loop_ub <= A_sizes[0] - 1) { 1098 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &wc_emlrtBCI); 1099 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &vc_emlrtBCI); 1100 a = muDoubleScalarAbs(V_data[0].re) + muDoubleScalarAbs(V_data[0].im); 1101 if (a >= 6.7178761075670888E-139) { 1102 a = 1.0 / a; 1103 loop_ub = 0; 1104 while (loop_ub <= A_sizes[0] - 1) { 1105 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &sc_emlrtBCI); 1106 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &rc_emlrtBCI); 1107 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &uc_emlrtBCI); 1108 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &tc_emlrtBCI); 1109 V_data[0].re *= a; 1110 V_data[0].im *= a; 1111 loop_ub = 1; 1112 } 1113 } 1114 loop_ub = 1; 1115 } 1116 if (ilascl) { 1117 eml_matlab_zlascl(anrmto, anrm, alpha1_data, alpha1_sizes); 1118 } 1119 } 1120 } 1121 } 1122 } 1123 1124 static void eml_matlab_zhgeqz(creal_T A_data[1], int32_T A_sizes[2], int32_T ilo, int32_T ihi, creal_T Z_data[1], int32_T Z_sizes[2], real_T *info, creal_T alpha1_data[1], int32_T alpha1_sizes[1], creal_T beta1_data[1], int32_T beta1_sizes[1]) 1125 { 1126 boolean_T b1; 1127 int32_T n; 1128 int32_T loop_ub; 1129 int32_T ilast; 1130 real_T eshift_re; 1131 real_T eshift_im; 1132 creal_T ctemp; 1133 real_T rho_re; 1134 real_T rho_im; 1135 real_T anorm; 1136 real_T b_atol; 1137 boolean_T failed; 1138 int32_T ilastm1; 1139 boolean_T guard1 = FALSE; 1140 boolean_T guard2 = FALSE; 1141 boolean_T goto60; 1142 boolean_T goto70; 1143 boolean_T goto90; 1144 int32_T exitg1; 1145 boolean_T b2; 1146 boolean_T b_guard1 = FALSE; 1147 creal_T b_A_data; 1148 creal_T t1; 1149 real_T sigma1_re; 1150 real_T sigma1_im; 1151 real_T sigma2_re; 1152 real_T sigma2_im; 1153 real_T b; 1154 *info = 0.0; 1155 if (!((Z_sizes[0] == 0) || (Z_sizes[1] == 0))) { 1156 b1 = TRUE; 1157 } else { 1158 b1 = FALSE; 1159 } 1160 n = A_sizes[0]; 1161 alpha1_sizes[0] = n; 1162 loop_ub = n - 1; 1163 for (ilast = 0; ilast <= loop_ub; ilast++) { 1164 alpha1_data[ilast].re = 0.0; 1165 alpha1_data[ilast].im = 0.0; 1166 } 1167 beta1_sizes[0] = n; 1168 loop_ub = n - 1; 1169 for (ilast = 0; ilast <= loop_ub; ilast++) { 1170 beta1_data[ilast].re = 1.0; 1171 beta1_data[ilast].im = 0.0; 1172 } 1173 eshift_re = 0.0; 1174 eshift_im = 0.0; 1175 ctemp.re = 0.0; 1176 ctemp.im = 0.0; 1177 rho_re = 0.0; 1178 rho_im = 0.0; 1179 EMLRTPUSHRTSTACK(&cg_emlrtRSI); 1180 anorm = eml_matlab_zlanhs(A_data, A_sizes, ilo, ihi); 1181 EMLRTPOPRTSTACK(&cg_emlrtRSI); 1182 anorm *= 2.2204460492503131E-16; 1183 b_atol = 2.2250738585072014E-308; 1184 if (anorm > 2.2250738585072014E-308) { 1185 b_atol = anorm; 1186 } 1187 failed = TRUE; 1188 for (ilastm1 = ihi + 1; ilastm1 <= n; ilastm1++) { 1189 alpha1_data[emlrtDynamicBoundsCheck(ilastm1, 1, alpha1_sizes[0], &ej_emlrtBCI) - 1] = A_data[(emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[0], &cj_emlrtBCI) + A_sizes[0] * (emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &dj_emlrtBCI) - 1)) - 1]; 1190 } 1191 guard1 = FALSE; 1192 guard2 = FALSE; 1193 if (ihi >= ilo) { 1194 ilast = 1; 1195 ilastm1 = 0; 1196 n = 0; 1197 goto60 = FALSE; 1198 goto70 = FALSE; 1199 goto90 = FALSE; 1200 loop_ub = 1; 1201 do { 1202 exitg1 = 0U; 1203 if (loop_ub <= 30) { 1204 if (ilast == 1) { 1205 goto60 = TRUE; 1206 } else { 1207 emlrtDynamicBoundsCheck(ilast, 1, A_sizes[0], &ui_emlrtBCI); 1208 emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &ti_emlrtBCI); 1209 if (muDoubleScalarAbs(A_data[(ilast + A_sizes[0] * (ilastm1 - 1)) - 1].re) + muDoubleScalarAbs(A_data[(ilast + A_sizes[0] * (ilastm1 - 1)) - 1].im) <= b_atol) { 1210 A_data[(emlrtDynamicBoundsCheck(ilast, 1, A_sizes[0], &yi_emlrtBCI) + A_sizes[0] * (emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &aj_emlrtBCI) - 1)) - 1].re = 0.0; 1211 A_data[(emlrtDynamicBoundsCheck(ilast, 1, A_sizes[0], &vi_emlrtBCI) + A_sizes[0] * (emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &wi_emlrtBCI) - 1)) - 1].im = 0.0; 1212 goto60 = TRUE; 1213 } else { 1214 if (ilastm1 >= 1) { 1215 goto70 = TRUE; 1216 } 1217 } 1218 } 1219 if (goto60 || goto70) { 1220 b2 = TRUE; 1221 } else { 1222 b2 = FALSE; 1223 } 1224 if (!b2) { 1225 ilastm1 = alpha1_sizes[0]; 1226 loop_ub = ilastm1 - 1; 1227 for (ilast = 0; ilast <= loop_ub; ilast++) { 1228 alpha1_data[ilast].re = rtNaN; 1229 alpha1_data[ilast].im = 0.0; 1230 } 1231 ilastm1 = beta1_sizes[0]; 1232 loop_ub = ilastm1 - 1; 1233 for (ilast = 0; ilast <= loop_ub; ilast++) { 1234 beta1_data[ilast].re = rtNaN; 1235 beta1_data[ilast].im = 0.0; 1236 } 1237 if (b1) { 1238 loop_ub = Z_sizes[1] - 1; 1239 for (ilast = 0; ilast <= loop_ub; ilast++) { 1240 n = Z_sizes[0] - 1; 1241 for (ilastm1 = 0; ilastm1 <= n; ilastm1++) { 1242 Z_data[ilastm1 + Z_sizes[0] * ilast].re = rtNaN; 1243 Z_data[ilastm1 + Z_sizes[0] * ilast].im = 0.0; 1244 } 1245 } 1246 } 1247 *info = -1.0; 1248 exitg1 = 1U; 1249 } else { 1250 b_guard1 = FALSE; 1251 if (goto60) { 1252 goto60 = FALSE; 1253 emlrtDynamicBoundsCheck(1, 1, alpha1_sizes[0], &bi_emlrtBCI); 1254 emlrtDynamicBoundsCheck(1, 1, A_sizes[0], &si_emlrtBCI); 1255 emlrtDynamicBoundsCheck(1, 1, A_sizes[1], &ri_emlrtBCI); 1256 alpha1_data[0] = A_data[0]; 1257 ilast = ilastm1; 1258 ilastm1--; 1259 if (ilast < 1) { 1260 failed = FALSE; 1261 guard2 = TRUE; 1262 exitg1 = 1U; 1263 } else { 1264 n = 0; 1265 eshift_re = 0.0; 1266 eshift_im = 0.0; 1267 b_guard1 = TRUE; 1268 } 1269 } else { 1270 if (goto70) { 1271 goto70 = FALSE; 1272 n++; 1273 if (n - div_s32_floor(n, 10) * 10 != 0) { 1274 emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[0], &qi_emlrtBCI); 1275 emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &pi_emlrtBCI); 1276 emlrtDynamicBoundsCheck(1, 1, A_sizes[0], &oi_emlrtBCI); 1277 emlrtDynamicBoundsCheck(1, 1, A_sizes[1], &ni_emlrtBCI); 1278 emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[0], &mi_emlrtBCI); 1279 emlrtDynamicBoundsCheck(1, 1, A_sizes[1], &li_emlrtBCI); 1280 emlrtDynamicBoundsCheck(1, 1, A_sizes[0], &ki_emlrtBCI); 1281 emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &ji_emlrtBCI); 1282 b_A_data.re = -(A_data[0].re - A_data[(ilastm1 + A_sizes[0] * (ilastm1 - 1)) - 1].re); 1283 b_A_data.im = -(A_data[0].im - A_data[(ilastm1 + A_sizes[0] * (ilastm1 - 1)) - 1].im); 1284 t1 = eml_div(b_A_data, 2.0); 1285 anorm = A_data[ilastm1 - 1].re * A_data[A_sizes[0] * (ilastm1 - 1)].re - A_data[ilastm1 - 1].im * A_data[A_sizes[0] * (ilastm1 - 1)].im; 1286 rho_re = A_data[ilastm1 - 1].re * A_data[A_sizes[0] * (ilastm1 - 1)].im + A_data[ilastm1 - 1].im * A_data[A_sizes[0] * (ilastm1 - 1)].re; 1287 ctemp.re = (t1.re * t1.re - t1.im * t1.im) + anorm; 1288 ctemp.im = (t1.re * t1.im + t1.im * t1.re) + rho_re; 1289 b_sqrt(&ctemp); 1290 sigma1_re = A_data[(ilastm1 + A_sizes[0] * (ilastm1 - 1)) - 1].re - (t1.re - ctemp.re); 1291 sigma1_im = A_data[(ilastm1 + A_sizes[0] * (ilastm1 - 1)) - 1].im - (t1.im - ctemp.im); 1292 sigma2_re = A_data[(ilastm1 + A_sizes[0] * (ilastm1 - 1)) - 1].re - (t1.re + ctemp.re); 1293 sigma2_im = A_data[(ilastm1 + A_sizes[0] * (ilastm1 - 1)) - 1].im - (t1.im + ctemp.im); 1294 rho_re = sigma1_re - A_data[0].re; 1295 rho_im = sigma1_im - A_data[0].im; 1296 rho_re = muDoubleScalarAbs(rho_re); 1297 b = muDoubleScalarAbs(rho_im); 1298 if (rho_re < b) { 1299 rho_re /= b; 1300 b *= muDoubleScalarSqrt(rho_re * rho_re + 1.0); 1301 } else if (rho_re > b) { 1302 b /= rho_re; 1303 b = muDoubleScalarSqrt(b * b + 1.0) * rho_re; 1304 } else if (muDoubleScalarIsNaN(b)) { 1305 } else { 1306 b = rho_re * 1.4142135623730951; 1307 } 1308 rho_re = sigma2_re - A_data[0].re; 1309 rho_im = sigma2_im - A_data[0].im; 1310 rho_re = muDoubleScalarAbs(rho_re); 1311 anorm = muDoubleScalarAbs(rho_im); 1312 if (rho_re < anorm) { 1313 rho_re /= anorm; 1314 anorm *= muDoubleScalarSqrt(rho_re * rho_re + 1.0); 1315 } else if (rho_re > anorm) { 1316 anorm /= rho_re; 1317 anorm = muDoubleScalarSqrt(anorm * anorm + 1.0) * rho_re; 1318 } else if (muDoubleScalarIsNaN(anorm)) { 1319 } else { 1320 anorm = rho_re * 1.4142135623730951; 1321 } 1322 if (b <= anorm) { 1323 sigma2_re = sigma1_re; 1324 sigma2_im = sigma1_im; 1325 rho_re = t1.re - ctemp.re; 1326 rho_im = t1.im - ctemp.im; 1327 } else { 1328 rho_re = t1.re + ctemp.re; 1329 rho_im = t1.im + ctemp.im; 1330 } 1331 } else { 1332 emlrtDynamicBoundsCheck(1, 1, A_sizes[0], &ii_emlrtBCI); 1333 eshift_re += A_data[A_sizes[0] * (emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &bj_emlrtBCI) - 1)].re; 1334 eshift_im += A_data[A_sizes[0] * (emlrtDynamicBoundsCheck(ilastm1, 1, A_sizes[1], &xi_emlrtBCI) - 1)].im; 1335 sigma2_re = eshift_re; 1336 sigma2_im = eshift_im; 1337 } 1338 if (1 == ilastm1) { 1339 ctemp.re = rho_re; 1340 ctemp.im = rho_im; 1341 } else { 1342 emlrtDynamicBoundsCheck(1, 1, A_sizes[0], &hi_emlrtBCI); 1343 emlrtDynamicBoundsCheck(1, 1, A_sizes[1], &gi_emlrtBCI); 1344 ctemp.re = A_data[0].re - sigma2_re; 1345 ctemp.im = A_data[0].im - sigma2_im; 1346 } 1347 goto90 = TRUE; 1348 } 1349 if (goto90) { 1350 goto90 = FALSE; 1351 emlrtDynamicBoundsCheck(2, 1, A_sizes[0], &fi_emlrtBCI); 1352 emlrtDynamicBoundsCheck(1, 1, A_sizes[1], &ei_emlrtBCI); 1353 EMLRTPUSHRTSTACK(&bg_emlrtRSI); 1354 b_A_data = A_data[0]; 1355 eml_matlab_zlartg(ctemp, b_A_data, &anorm, &t1); 1356 EMLRTPOPRTSTACK(&bg_emlrtRSI); 1357 } 1358 b_guard1 = TRUE; 1359 } 1360 if (b_guard1 == TRUE) { 1361 loop_ub++; 1362 } 1363 } 1364 } else { 1365 guard2 = TRUE; 1366 exitg1 = 1U; 1367 } 1368 } while (exitg1 == 0U); 1369 } else { 1370 guard1 = TRUE; 1371 } 1372 if (guard2 == TRUE) { 1373 if (failed) { 1374 *info = (real_T)ilast; 1375 ilastm1 = 1; 1376 while (ilastm1 <= ilast) { 1377 emlrtDynamicBoundsCheck(ilastm1, 1, alpha1_sizes[0], &ai_emlrtBCI); 1378 alpha1_data[0].re = rtNaN; 1379 alpha1_data[0].im = 0.0; 1380 emlrtDynamicBoundsCheck(1, 1, beta1_sizes[0], &xh_emlrtBCI); 1381 beta1_data[0].re = rtNaN; 1382 beta1_data[0].im = 0.0; 1383 ilastm1 = 2; 1384 } 1385 if (b1) { 1386 loop_ub = Z_sizes[1] - 1; 1387 for (ilast = 0; ilast <= loop_ub; ilast++) { 1388 n = Z_sizes[0] - 1; 1389 for (ilastm1 = 0; ilastm1 <= n; ilastm1++) { 1390 Z_data[ilastm1 + Z_sizes[0] * ilast].re = rtNaN; 1391 Z_data[ilastm1 + Z_sizes[0] * ilast].im = 0.0; 1392 } 1393 } 1394 } 1395 } else { 1396 guard1 = TRUE; 1397 } 1398 } 1399 if (guard1 == TRUE) { 1400 ilastm1 = 1; 1401 while (ilastm1 <= ilo - 1) { 1402 emlrtDynamicBoundsCheck(1, 1, alpha1_sizes[0], &yh_emlrtBCI); 1403 emlrtDynamicBoundsCheck(1, 1, A_sizes[0], &di_emlrtBCI); 1404 emlrtDynamicBoundsCheck(1, 1, A_sizes[1], &ci_emlrtBCI); 1405 alpha1_data[0] = A_data[0]; 1406 ilastm1 = 2; 1407 } 1408 } 1409 } 1410 1411 static real_T eml_matlab_zlanhs(const creal_T A_data[1], const int32_T A_sizes[2], int32_T ilo, int32_T ihi) 1412 { 1413 real_T f; 1414 real_T scale; 1415 real_T sumsq; 1416 boolean_T firstNonZero; 1417 real_T temp1; 1418 real_T temp2; 1419 f = 0.0; 1420 if (ilo > ihi) { 1421 } else { 1422 scale = 0.0; 1423 sumsq = 0.0; 1424 firstNonZero = TRUE; 1425 emlrtDynamicBoundsCheck(1, 1, A_sizes[0], &be_emlrtBCI); 1426 emlrtDynamicBoundsCheck(1, 1, A_sizes[1], &ae_emlrtBCI); 1427 if (A_data[0].re != 0.0) { 1428 sumsq = 1.0; 1429 scale = muDoubleScalarAbs(A_data[0].re); 1430 firstNonZero = FALSE; 1431 } 1432 if (A_data[0].im != 0.0) { 1433 temp1 = muDoubleScalarAbs(A_data[0].im); 1434 if (firstNonZero) { 1435 sumsq = 1.0; 1436 scale = temp1; 1437 } else if (scale < temp1) { 1438 temp2 = scale / temp1; 1439 sumsq = 1.0 + sumsq * temp2 * temp2; 1440 scale = temp1; 1441 } else { 1442 temp2 = temp1 / scale; 1443 sumsq += temp2 * temp2; 1444 } 1445 } 1446 EMLRTPUSHRTSTACK(&dg_emlrtRSI); 1447 if (sumsq < 0.0) { 1448 EMLRTPUSHRTSTACK(&oc_emlrtRSI); 1449 eml_error(); 1450 EMLRTPOPRTSTACK(&oc_emlrtRSI); 1451 } 1452 f = scale * muDoubleScalarSqrt(sumsq); 1453 EMLRTPOPRTSTACK(&dg_emlrtRSI); 1454 } 1455 return f; 1456 } 1457 1458 static void eml_matlab_zlartg(const creal_T f, const creal_T g, real_T *cs, creal_T *sn) 1459 { 1460 real_T scale; 1461 real_T b; 1462 real_T f2; 1463 real_T fs_re; 1464 real_T fs_im; 1465 real_T gs_re; 1466 real_T gs_im; 1467 boolean_T guard1 = FALSE; 1468 real_T b_b; 1469 real_T g2s; 1470 scale = muDoubleScalarAbs(f.re); 1471 b = muDoubleScalarAbs(f.im); 1472 if (b > scale) { 1473 scale = b; 1474 } 1475 b = muDoubleScalarAbs(g.re); 1476 f2 = muDoubleScalarAbs(g.im); 1477 if (f2 > b) { 1478 b = f2; 1479 } 1480 if (b > scale) { 1481 scale = b; 1482 } 1483 fs_re = f.re; 1484 fs_im = f.im; 1485 gs_re = g.re; 1486 gs_im = g.im; 1487 guard1 = FALSE; 1488 if (scale >= 7.4428285367870146E+137) { 1489 do { 1490 fs_re *= 1.3435752215134178E-138; 1491 fs_im *= 1.3435752215134178E-138; 1492 gs_re *= 1.3435752215134178E-138; 1493 gs_im *= 1.3435752215134178E-138; 1494 scale *= 1.3435752215134178E-138; 1495 } while (!(scale < 7.4428285367870146E+137)); 1496 guard1 = TRUE; 1497 } else if (scale <= 1.3435752215134178E-138) { 1498 if ((g.re == 0.0) && (g.im == 0.0)) { 1499 *cs = 1.0; 1500 sn->re = 0.0; 1501 sn->im = 0.0; 1502 } else { 1503 do { 1504 fs_re *= 7.4428285367870146E+137; 1505 fs_im *= 7.4428285367870146E+137; 1506 gs_re *= 7.4428285367870146E+137; 1507 gs_im *= 7.4428285367870146E+137; 1508 scale *= 7.4428285367870146E+137; 1509 } while (!(scale > 1.3435752215134178E-138)); 1510 guard1 = TRUE; 1511 } 1512 } else { 1513 guard1 = TRUE; 1514 } 1515 if (guard1 == TRUE) { 1516 f2 = fs_re * fs_re + fs_im * fs_im; 1517 scale = gs_re * gs_re + gs_im * gs_im; 1518 b = scale; 1519 if (1.0 > scale) { 1520 b = 1.0; 1521 } 1522 if (f2 <= b * 2.0041683600089728E-292) { 1523 if ((f.re == 0.0) && (f.im == 0.0)) { 1524 *cs = 0.0; 1525 f2 = muDoubleScalarAbs(gs_re); 1526 b_b = muDoubleScalarAbs(gs_im); 1527 if (f2 < b_b) { 1528 f2 /= b_b; 1529 b_b *= muDoubleScalarSqrt(f2 * f2 + 1.0); 1530 } else if (f2 > b_b) { 1531 b_b /= f2; 1532 b_b = muDoubleScalarSqrt(b_b * b_b + 1.0) * f2; 1533 } else if (muDoubleScalarIsNaN(b_b)) { 1534 } else { 1535 b_b = f2 * 1.4142135623730951; 1536 } 1537 sn->re = gs_re / b_b; 1538 sn->im = -gs_im / b_b; 1539 } else { 1540 f2 = muDoubleScalarAbs(fs_re); 1541 b = muDoubleScalarAbs(fs_im); 1542 if (f2 < b) { 1543 f2 /= b; 1544 b *= muDoubleScalarSqrt(f2 * f2 + 1.0); 1545 } else if (f2 > b) { 1546 b /= f2; 1547 b = muDoubleScalarSqrt(b * b + 1.0) * f2; 1548 } else if (muDoubleScalarIsNaN(b)) { 1549 } else { 1550 b = f2 * 1.4142135623730951; 1551 } 1552 EMLRTPUSHRTSTACK(&eg_emlrtRSI); 1553 if (scale < 0.0) { 1554 EMLRTPUSHRTSTACK(&oc_emlrtRSI); 1555 eml_error(); 1556 EMLRTPOPRTSTACK(&oc_emlrtRSI); 1557 } 1558 g2s = muDoubleScalarSqrt(scale); 1559 EMLRTPOPRTSTACK(&eg_emlrtRSI); 1560 *cs = b / g2s; 1561 b = muDoubleScalarAbs(f.re); 1562 f2 = muDoubleScalarAbs(f.im); 1563 if (f2 > b) { 1564 b = f2; 1565 } 1566 if (b > 1.0) { 1567 f2 = muDoubleScalarAbs(f.re); 1568 b_b = muDoubleScalarAbs(f.im); 1569 if (f2 < b_b) { 1570 f2 /= b_b; 1571 b_b *= muDoubleScalarSqrt(f2 * f2 + 1.0); 1572 } else if (f2 > b_b) { 1573 b_b /= f2; 1574 b_b = muDoubleScalarSqrt(b_b * b_b + 1.0) * f2; 1575 } else if (muDoubleScalarIsNaN(b_b)) { 1576 } else { 1577 b_b = f2 * 1.4142135623730951; 1578 } 1579 fs_re = f.re / b_b; 1580 fs_im = f.im / b_b; 1581 } else { 1582 b = 7.4428285367870146E+137 * f.re; 1583 scale = 7.4428285367870146E+137 * f.im; 1584 f2 = muDoubleScalarAbs(b); 1585 b_b = muDoubleScalarAbs(scale); 1586 if (f2 < b_b) { 1587 f2 /= b_b; 1588 b_b *= muDoubleScalarSqrt(f2 * f2 + 1.0); 1589 } else if (f2 > b_b) { 1590 b_b /= f2; 1591 b_b = muDoubleScalarSqrt(b_b * b_b + 1.0) * f2; 1592 } else if (muDoubleScalarIsNaN(b_b)) { 1593 } else { 1594 b_b = f2 * 1.4142135623730951; 1595 } 1596 fs_re = b / b_b; 1597 fs_im = scale / b_b; 1598 } 1599 gs_re /= g2s; 1600 gs_im = -gs_im / g2s; 1601 sn->re = fs_re * gs_re - fs_im * gs_im; 1602 sn->im = fs_re * gs_im + fs_im * gs_re; 1603 } 1604 } else { 1605 EMLRTPUSHRTSTACK(&fg_emlrtRSI); 1606 b = 1.0 + scale / f2; 1607 if (b < 0.0) { 1608 EMLRTPUSHRTSTACK(&oc_emlrtRSI); 1609 eml_error(); 1610 EMLRTPOPRTSTACK(&oc_emlrtRSI); 1611 } 1612 b = muDoubleScalarSqrt(b); 1613 EMLRTPOPRTSTACK(&fg_emlrtRSI); 1614 *cs = 1.0 / b; 1615 b_b = f2 + scale; 1616 fs_re = b * fs_re / b_b; 1617 fs_im = b * fs_im / b_b; 1618 sn->re = fs_re * gs_re - fs_im * -gs_im; 1619 sn->im = fs_re * -gs_im + fs_im * gs_re; 1620 } 1621 } 1622 } 1623 1624 static void eml_matlab_zlascl(real_T cfrom, real_T cto, creal_T A_data[1], int32_T A_sizes[1]) 1625 { 1626 real_T cfromc; 1627 real_T ctoc; 1628 boolean_T notdone; 1629 real_T cfrom1; 1630 real_T cto1; 1631 real_T mul; 1632 int32_T loop_ub; 1633 int32_T i22; 1634 cfromc = cfrom; 1635 ctoc = cto; 1636 notdone = TRUE; 1637 while (notdone) { 1638 cfrom1 = cfromc * 2.0041683600089728E-292; 1639 cto1 = ctoc / 4.9896007738368E+291; 1640 if ((muDoubleScalarAbs(cfrom1) > muDoubleScalarAbs(ctoc)) && (ctoc != 0.0)) { 1641 mul = 2.0041683600089728E-292; 1642 cfromc = cfrom1; 1643 } else if (muDoubleScalarAbs(cto1) > muDoubleScalarAbs(cfromc)) { 1644 mul = 4.9896007738368E+291; 1645 ctoc = cto1; 1646 } else { 1647 mul = ctoc / cfromc; 1648 notdone = FALSE; 1649 } 1650 loop_ub = A_sizes[0] - 1; 1651 for (i22 = 0; i22 <= loop_ub; i22++) { 1652 A_data[i22].re *= mul; 1653 A_data[i22].im *= mul; 1654 } 1655 } 1656 } 1657 1658 static real_T eml_xnrm2(int32_T n, const creal_T x_data[1], const int32_T x_sizes[2], int32_T ix0) 1659 { 1660 real_T y; 1661 int32_T b_n; 1662 int32_T incx; 1663 EMLRTPUSHRTSTACK(&gg_emlrtRSI); 1664 if (n < 1) { 1665 y = 0.0; 1666 } else { 1667 EMLRTPUSHRTSTACK(&ig_emlrtRSI); 1668 b_n = 1; 1669 incx = 1; 1670 y = dznrm232(&b_n, &x_data[emlrtDynamicBoundsCheck(ix0, 1, x_sizes[0] * x_sizes[1], &ce_emlrtBCI) - 1], &incx); 1671 EMLRTPOPRTSTACK(&ig_emlrtRSI); 1672 } 1673 EMLRTPOPRTSTACK(&gg_emlrtRSI); 1674 return y; 1675 } 1676 1677 static void matrix_to_integer_power(real_T a_data[1], int32_T a_sizes[2], real_T b, real_T c_data[1], int32_T c_sizes[2]) 1678 { 1679 int8_T iv11[2]; 1680 int32_T i4; 1681 real_T e; 1682 boolean_T firstmult; 1683 int32_T exitg1; 1684 real_T ed2; 1685 int32_T k; 1686 real_T b_c_data[1]; 1687 int32_T loop_ub; 1688 int32_T c[2]; 1689 int32_T b_loop_ub; 1690 int32_T i5; 1691 const mxArray *y; 1692 static const int32_T iv12[2] = { 1, 45 }; 1693 const mxArray *m7; 1694 static const char_T cv7[45] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'm', 't', 'i', 'm', 'e', 's', '_', 'n', 'o', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 'c', 'a', 'l', 'a', 'r', 'E', 'x', 'p', 'a', 'n', 's', 'i', 'o', 'n' }; 1695 const mxArray *b_y; 1696 static const int32_T iv13[2] = { 1, 21 }; 1697 static const char_T cv8[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'i', 'n', 'n', 'e', 'r', 'd', 'i', 'm' }; 1698 int32_T c_loop_ub; 1699 int32_T i6; 1700 const mxArray *c_y; 1701 static const int32_T iv14[2] = { 1, 45 }; 1702 const mxArray *d_y; 1703 static const int32_T iv15[2] = { 1, 21 }; 1704 int32_T a_sizes_idx_1; 1705 for (i4 = 0; i4 < 2; i4++) { 1706 iv11[i4] = (int8_T)a_sizes[i4]; 1707 } 1708 c_sizes[0] = (int32_T)iv11[0]; 1709 c_sizes[1] = (int32_T)iv11[1]; 1710 e = muDoubleScalarAbs(b); 1711 if (e > 0.0) { 1712 firstmult = TRUE; 1713 do { 1714 exitg1 = 0U; 1715 ed2 = muDoubleScalarFloor(e / 2.0); 1716 if (2.0 * ed2 != e) { 1717 if (firstmult) { 1718 emlrtSizeEqCheck1D(c_sizes[0] * c_sizes[1], a_sizes[0] * a_sizes[1], &g_emlrtECI); 1719 k = a_sizes[0] * a_sizes[1]; 1720 loop_ub = k - 1; 1721 for (i4 = 0; i4 <= loop_ub; i4++) { 1722 b_c_data[i4] = a_data[i4]; 1723 } 1724 for (i4 = 0; i4 < 2; i4++) { 1725 c[i4] = c_sizes[i4]; 1726 } 1727 c_sizes[0] = c[0]; 1728 c_sizes[1] = c[1]; 1729 loop_ub = c[1] - 1; 1730 for (i4 = 0; i4 <= loop_ub; i4++) { 1731 b_loop_ub = c[0] - 1; 1732 for (i5 = 0; i5 <= b_loop_ub; i5++) { 1733 c_data[i5 + c_sizes[0] * i4] = b_c_data[i5 + c[0] * i4]; 1734 } 1735 } 1736 firstmult = FALSE; 1737 } else { 1738 EMLRTPUSHRTSTACK(&ce_emlrtRSI); 1739 EMLRTPUSHRTSTACK(&ee_emlrtRSI); 1740 if (!(c_sizes[1] == a_sizes[0])) { 1741 if (((c_sizes[0] == 1) && (c_sizes[1] == 1)) || ((a_sizes[0] == 1) && (a_sizes[1] == 1))) { 1742 EMLRTPUSHRTSTACK(&ge_emlrtRSI); 1743 y = NULL; 1744 m7 = mxCreateCharArray(2, iv12); 1745 emlrtInitCharArray(45, m7, cv7); 1746 emlrtAssign(&y, m7); 1747 error(message(y, &u_emlrtMCI), &v_emlrtMCI); 1748 EMLRTPOPRTSTACK(&ge_emlrtRSI); 1749 } else { 1750 EMLRTPUSHRTSTACK(&fe_emlrtRSI); 1751 b_y = NULL; 1752 m7 = mxCreateCharArray(2, iv13); 1753 emlrtInitCharArray(21, m7, cv8); 1754 emlrtAssign(&b_y, m7); 1755 error(message(b_y, &w_emlrtMCI), &x_emlrtMCI); 1756 EMLRTPOPRTSTACK(&fe_emlrtRSI); 1757 } 1758 } 1759 EMLRTPOPRTSTACK(&ee_emlrtRSI); 1760 if ((c_sizes[1] == 1) || (a_sizes[0] == 1)) { 1761 k = c_sizes[0]; 1762 loop_ub = c_sizes[0] - 1; 1763 for (i4 = 0; i4 <= loop_ub; i4++) { 1764 b_loop_ub = a_sizes[1] - 1; 1765 for (i5 = 0; i5 <= b_loop_ub; i5++) { 1766 b_c_data[i4 + c_sizes[0] * i5] = 0.0; 1767 c_loop_ub = c_sizes[1] - 1; 1768 for (i6 = 0; i6 <= c_loop_ub; i6++) { 1769 b_c_data[i4 + c_sizes[0] * i5] += c_data[i4 + c_sizes[0] * i6] * a_data[i6 + a_sizes[0] * i5]; 1770 } 1771 } 1772 } 1773 c_sizes[1] = a_sizes[1]; 1774 loop_ub = a_sizes[1] - 1; 1775 for (i4 = 0; i4 <= loop_ub; i4++) { 1776 b_loop_ub = k - 1; 1777 for (i5 = 0; i5 <= b_loop_ub; i5++) { 1778 c_data[i5 + c_sizes[0] * i4] = b_c_data[i5 + k * i4]; 1779 } 1780 } 1781 } else { 1782 iv11[0] = (int8_T)c_sizes[0]; 1783 iv11[1] = (int8_T)a_sizes[1]; 1784 c_sizes[0] = (int32_T)iv11[0]; 1785 c_sizes[1] = (int32_T)iv11[1]; 1786 loop_ub = c_sizes[1] - 1; 1787 for (i4 = 0; i4 <= loop_ub; i4++) { 1788 b_loop_ub = c_sizes[0] - 1; 1789 for (i5 = 0; i5 <= b_loop_ub; i5++) { 1790 c_data[i5 + c_sizes[0] * i4] = 0.0; 1791 } 1792 } 1793 EMLRTPUSHRTSTACK(&de_emlrtRSI); 1794 EMLRTPUSHRTSTACK(&he_emlrtRSI); 1795 EMLRTPOPRTSTACK(&he_emlrtRSI); 1796 EMLRTPOPRTSTACK(&de_emlrtRSI); 1797 } 1798 EMLRTPOPRTSTACK(&ce_emlrtRSI); 1799 } 1800 } 1801 if (ed2 == 0.0) { 1802 exitg1 = 1U; 1803 } else { 1804 e = ed2; 1805 EMLRTPUSHRTSTACK(&be_emlrtRSI); 1806 EMLRTPUSHRTSTACK(&ee_emlrtRSI); 1807 if (!(a_sizes[1] == a_sizes[0])) { 1808 if (((a_sizes[0] == 1) && (a_sizes[1] == 1)) || ((a_sizes[0] == 1) && (a_sizes[1] == 1))) { 1809 EMLRTPUSHRTSTACK(&ge_emlrtRSI); 1810 c_y = NULL; 1811 m7 = mxCreateCharArray(2, iv14); 1812 emlrtInitCharArray(45, m7, cv7); 1813 emlrtAssign(&c_y, m7); 1814 error(message(c_y, &u_emlrtMCI), &v_emlrtMCI); 1815 EMLRTPOPRTSTACK(&ge_emlrtRSI); 1816 } else { 1817 EMLRTPUSHRTSTACK(&fe_emlrtRSI); 1818 d_y = NULL; 1819 m7 = mxCreateCharArray(2, iv15); 1820 emlrtInitCharArray(21, m7, cv8); 1821 emlrtAssign(&d_y, m7); 1822 error(message(d_y, &w_emlrtMCI), &x_emlrtMCI); 1823 EMLRTPOPRTSTACK(&fe_emlrtRSI); 1824 } 1825 } 1826 EMLRTPOPRTSTACK(&ee_emlrtRSI); 1827 if ((a_sizes[1] == 1) || (a_sizes[0] == 1)) { 1828 k = a_sizes[0]; 1829 a_sizes_idx_1 = a_sizes[1]; 1830 loop_ub = a_sizes[0] - 1; 1831 for (i4 = 0; i4 <= loop_ub; i4++) { 1832 b_loop_ub = a_sizes[1] - 1; 1833 for (i5 = 0; i5 <= b_loop_ub; i5++) { 1834 b_c_data[i4 + a_sizes[0] * i5] = 0.0; 1835 c_loop_ub = a_sizes[1] - 1; 1836 for (i6 = 0; i6 <= c_loop_ub; i6++) { 1837 b_c_data[i4 + a_sizes[0] * i5] += a_data[i4 + a_sizes[0] * i6] * a_data[i6 + a_sizes[0] * i5]; 1838 } 1839 } 1840 } 1841 a_sizes[1] = a_sizes_idx_1; 1842 loop_ub = a_sizes_idx_1 - 1; 1843 for (i4 = 0; i4 <= loop_ub; i4++) { 1844 b_loop_ub = k - 1; 1845 for (i5 = 0; i5 <= b_loop_ub; i5++) { 1846 a_data[i5 + a_sizes[0] * i4] = b_c_data[i5 + k * i4]; 1847 } 1848 } 1849 } else { 1850 a_sizes[0] = 0; 1851 a_sizes[1] = 0; 1852 EMLRTPUSHRTSTACK(&de_emlrtRSI); 1853 EMLRTPUSHRTSTACK(&he_emlrtRSI); 1854 EMLRTPOPRTSTACK(&he_emlrtRSI); 1855 EMLRTPOPRTSTACK(&de_emlrtRSI); 1856 } 1857 EMLRTPOPRTSTACK(&be_emlrtRSI); 1858 } 1859 } while (exitg1 == 0U); 1860 } else { 1861 loop_ub = c_sizes[1] - 1; 1862 for (i4 = 0; i4 <= loop_ub; i4++) { 1863 b_loop_ub = c_sizes[0] - 1; 1864 for (i5 = 0; i5 <= b_loop_ub; i5++) { 1865 c_data[i5 + c_sizes[0] * i4] = 0.0; 1866 } 1867 } 1868 k = 1; 1869 while (k <= a_sizes[0]) { 1870 emlrtDynamicBoundsCheck(1, 1, c_sizes[0], &qc_emlrtBCI); 1871 emlrtDynamicBoundsCheck(1, 1, c_sizes[1], &pc_emlrtBCI); 1872 c_data[0] = 1.0; 1873 k = 2; 1874 } 1875 } 1876 } 1877 1878 void b_matrix_to_integer_power(real_T a_data[1], int32_T a_sizes[2], real_T c_data[1], int32_T c_sizes[2]) 1879 { 1880 int8_T iv22[2]; 1881 int32_T i16; 1882 real_T e; 1883 boolean_T firstmult; 1884 int32_T exitg1; 1885 real_T ed2; 1886 int32_T c_sizes_idx_0; 1887 real_T b_c_data[1]; 1888 int32_T loop_ub; 1889 int32_T c[2]; 1890 int32_T b_loop_ub; 1891 int32_T i17; 1892 const mxArray *y; 1893 static const int32_T iv23[2] = { 1, 45 }; 1894 const mxArray *m13; 1895 static const char_T cv14[45] = { 'C', 'o', 'd', 'e', 'r', ':', 't', 'o', 'o', 'l', 'b', 'o', 'x', ':', 'm', 't', 'i', 'm', 'e', 's', '_', 'n', 'o', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 'c', 'a', 'l', 'a', 'r', 'E', 'x', 'p', 'a', 'n', 's', 'i', 'o', 'n' }; 1896 const mxArray *b_y; 1897 static const int32_T iv24[2] = { 1, 21 }; 1898 static const char_T cv15[21] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 'i', 'n', 'n', 'e', 'r', 'd', 'i', 'm' }; 1899 int32_T c_loop_ub; 1900 int32_T i18; 1901 const mxArray *c_y; 1902 static const int32_T iv25[2] = { 1, 45 }; 1903 const mxArray *d_y; 1904 static const int32_T iv26[2] = { 1, 21 }; 1905 int32_T a_sizes_idx_1; 1906 for (i16 = 0; i16 < 2; i16++) { 1907 iv22[i16] = (int8_T)a_sizes[i16]; 1908 } 1909 c_sizes[0] = (int32_T)iv22[0]; 1910 c_sizes[1] = (int32_T)iv22[1]; 1911 e = 2.0; 1912 firstmult = TRUE; 1913 do { 1914 exitg1 = 0U; 1915 ed2 = muDoubleScalarFloor(e / 2.0); 1916 if (2.0 * ed2 != e) { 1917 if (firstmult) { 1918 emlrtSizeEqCheck1D(c_sizes[0] * c_sizes[1], a_sizes[0] * a_sizes[1], &i_emlrtECI); 1919 c_sizes_idx_0 = a_sizes[0] * a_sizes[1]; 1920 loop_ub = c_sizes_idx_0 - 1; 1921 for (i16 = 0; i16 <= loop_ub; i16++) { 1922 b_c_data[i16] = a_data[i16]; 1923 } 1924 for (i16 = 0; i16 < 2; i16++) { 1925 c[i16] = c_sizes[i16]; 1926 } 1927 c_sizes[0] = c[0]; 1928 c_sizes[1] = c[1]; 1929 loop_ub = c[1] - 1; 1930 for (i16 = 0; i16 <= loop_ub; i16++) { 1931 b_loop_ub = c[0] - 1; 1932 for (i17 = 0; i17 <= b_loop_ub; i17++) { 1933 c_data[i17 + c_sizes[0] * i16] = b_c_data[i17 + c[0] * i16]; 1934 } 1935 } 1936 firstmult = FALSE; 1937 } else { 1938 EMLRTPUSHRTSTACK(&pk_emlrtRSI); 1939 EMLRTPUSHRTSTACK(&ee_emlrtRSI); 1940 if (!(c_sizes[1] == a_sizes[0])) { 1941 if (((c_sizes[0] == 1) && (c_sizes[1] == 1)) || ((a_sizes[0] == 1) && (a_sizes[1] == 1))) { 1942 EMLRTPUSHRTSTACK(&ge_emlrtRSI); 1943 y = NULL; 1944 m13 = mxCreateCharArray(2, iv23); 1945 emlrtInitCharArray(45, m13, cv14); 1946 emlrtAssign(&y, m13); 1947 error(message(y, &u_emlrtMCI), &v_emlrtMCI); 1948 EMLRTPOPRTSTACK(&ge_emlrtRSI); 1949 } else { 1950 EMLRTPUSHRTSTACK(&fe_emlrtRSI); 1951 b_y = NULL; 1952 m13 = mxCreateCharArray(2, iv24); 1953 emlrtInitCharArray(21, m13, cv15); 1954 emlrtAssign(&b_y, m13); 1955 error(message(b_y, &w_emlrtMCI), &x_emlrtMCI); 1956 EMLRTPOPRTSTACK(&fe_emlrtRSI); 1957 } 1958 } 1959 EMLRTPOPRTSTACK(&ee_emlrtRSI); 1960 if ((c_sizes[1] == 1) || (a_sizes[0] == 1)) { 1961 c_sizes_idx_0 = c_sizes[0]; 1962 loop_ub = c_sizes[0] - 1; 1963 for (i16 = 0; i16 <= loop_ub; i16++) { 1964 b_loop_ub = a_sizes[1] - 1; 1965 for (i17 = 0; i17 <= b_loop_ub; i17++) { 1966 b_c_data[i16 + c_sizes[0] * i17] = 0.0; 1967 c_loop_ub = c_sizes[1] - 1; 1968 for (i18 = 0; i18 <= c_loop_ub; i18++) { 1969 b_c_data[i16 + c_sizes[0] * i17] += c_data[i16 + c_sizes[0] * i18] * a_data[i18 + a_sizes[0] * i17]; 1970 } 1971 } 1972 } 1973 c_sizes[1] = a_sizes[1]; 1974 loop_ub = a_sizes[1] - 1; 1975 for (i16 = 0; i16 <= loop_ub; i16++) { 1976 b_loop_ub = c_sizes_idx_0 - 1; 1977 for (i17 = 0; i17 <= b_loop_ub; i17++) { 1978 c_data[i17 + c_sizes[0] * i16] = b_c_data[i17 + c_sizes_idx_0 * i16]; 1979 } 1980 } 1981 } else { 1982 iv22[0] = (int8_T)c_sizes[0]; 1983 iv22[1] = (int8_T)a_sizes[1]; 1984 c_sizes[0] = (int32_T)iv22[0]; 1985 c_sizes[1] = (int32_T)iv22[1]; 1986 loop_ub = c_sizes[1] - 1; 1987 for (i16 = 0; i16 <= loop_ub; i16++) { 1988 b_loop_ub = c_sizes[0] - 1; 1989 for (i17 = 0; i17 <= b_loop_ub; i17++) { 1990 c_data[i17 + c_sizes[0] * i16] = 0.0; 1991 } 1992 } 1993 EMLRTPUSHRTSTACK(&de_emlrtRSI); 1994 EMLRTPUSHRTSTACK(&he_emlrtRSI); 1995 EMLRTPOPRTSTACK(&he_emlrtRSI); 1996 EMLRTPOPRTSTACK(&de_emlrtRSI); 1997 } 1998 EMLRTPOPRTSTACK(&pk_emlrtRSI); 1999 } 2000 } 2001 if (ed2 == 0.0) { 2002 exitg1 = 1U; 2003 } else { 2004 e = ed2; 2005 EMLRTPUSHRTSTACK(&qk_emlrtRSI); 2006 EMLRTPUSHRTSTACK(&ee_emlrtRSI); 2007 if (!(a_sizes[1] == a_sizes[0])) { 2008 if (((a_sizes[0] == 1) && (a_sizes[1] == 1)) || ((a_sizes[0] == 1) && (a_sizes[1] == 1))) { 2009 EMLRTPUSHRTSTACK(&ge_emlrtRSI); 2010 c_y = NULL; 2011 m13 = mxCreateCharArray(2, iv25); 2012 emlrtInitCharArray(45, m13, cv14); 2013 emlrtAssign(&c_y, m13); 2014 error(message(c_y, &u_emlrtMCI), &v_emlrtMCI); 2015 EMLRTPOPRTSTACK(&ge_emlrtRSI); 2016 } else { 2017 EMLRTPUSHRTSTACK(&fe_emlrtRSI); 2018 d_y = NULL; 2019 m13 = mxCreateCharArray(2, iv26); 2020 emlrtInitCharArray(21, m13, cv15); 2021 emlrtAssign(&d_y, m13); 2022 error(message(d_y, &w_emlrtMCI), &x_emlrtMCI); 2023 EMLRTPOPRTSTACK(&fe_emlrtRSI); 2024 } 2025 } 2026 EMLRTPOPRTSTACK(&ee_emlrtRSI); 2027 if ((a_sizes[1] == 1) || (a_sizes[0] == 1)) { 2028 c_sizes_idx_0 = a_sizes[0]; 2029 a_sizes_idx_1 = a_sizes[1]; 2030 loop_ub = a_sizes[0] - 1; 2031 for (i16 = 0; i16 <= loop_ub; i16++) { 2032 b_loop_ub = a_sizes[1] - 1; 2033 for (i17 = 0; i17 <= b_loop_ub; i17++) { 2034 b_c_data[i16 + a_sizes[0] * i17] = 0.0; 2035 c_loop_ub = a_sizes[1] - 1; 2036 for (i18 = 0; i18 <= c_loop_ub; i18++) { 2037 b_c_data[i16 + a_sizes[0] * i17] += a_data[i16 + a_sizes[0] * i18] * a_data[i18 + a_sizes[0] * i17]; 2038 } 2039 } 2040 } 2041 a_sizes[1] = a_sizes_idx_1; 2042 loop_ub = a_sizes_idx_1 - 1; 2043 for (i16 = 0; i16 <= loop_ub; i16++) { 2044 b_loop_ub = c_sizes_idx_0 - 1; 2045 for (i17 = 0; i17 <= b_loop_ub; i17++) { 2046 a_data[i17 + a_sizes[0] * i16] = b_c_data[i17 + c_sizes_idx_0 * i16]; 2047 } 2048 } 2049 } else { 2050 a_sizes[0] = 0; 2051 a_sizes[1] = 0; 2052 EMLRTPUSHRTSTACK(&de_emlrtRSI); 2053 EMLRTPUSHRTSTACK(&he_emlrtRSI); 2054 EMLRTPOPRTSTACK(&he_emlrtRSI); 2055 EMLRTPOPRTSTACK(&de_emlrtRSI); 2056 } 2057 EMLRTPOPRTSTACK(&qk_emlrtRSI); 2058 } 2059 } while (exitg1 == 0U); 2060 } 2061 2062 void b_mpower(const real_T a_data[1], const int32_T a_sizes[1], real_T b, real_T c_data[1], int32_T c_sizes[1]) 2063 { 2064 real_T info; 2065 real_T colnorm; 2066 boolean_T firstmult; 2067 int32_T exitg1; 2068 real_T ed2; 2069 creal_T b_a_data[1]; 2070 int32_T b_a_sizes; 2071 int32_T V_sizes[2]; 2072 creal_T V_data[1]; 2073 int32_T beta1_sizes; 2074 creal_T beta1_data[1]; 2075 int32_T alpha1_sizes; 2076 creal_T alpha1_data[1]; 2077 int32_T tmp_sizes; 2078 creal_T tmp_data[1]; 2079 int32_T b_tmp_sizes[2]; 2080 int32_T D_sizes[2]; 2081 creal_T D_data[1]; 2082 creal_T dc0; 2083 if (muDoubleScalarFloor(b) == b) { 2084 info = a_data[0]; 2085 c_sizes[0] = 1; 2086 colnorm = muDoubleScalarAbs(b); 2087 if (colnorm > 0.0) { 2088 firstmult = TRUE; 2089 do { 2090 exitg1 = 0U; 2091 ed2 = muDoubleScalarFloor(colnorm / 2.0); 2092 if (2.0 * ed2 != colnorm) { 2093 if (firstmult) { 2094 c_sizes[0] = 1; 2095 c_data[0] = info; 2096 firstmult = FALSE; 2097 } else { 2098 c_sizes[0] = 1; 2099 c_data[0] *= info; 2100 } 2101 } 2102 if (ed2 == 0.0) { 2103 exitg1 = 1U; 2104 } else { 2105 colnorm = ed2; 2106 info *= info; 2107 } 2108 } while (exitg1 == 0U); 2109 } else { 2110 c_sizes[0] = 1; 2111 c_data[0] = 0.0; 2112 c_data[0] = 1.0; 2113 } 2114 } else { 2115 EMLRTPUSHRTSTACK(&hn_emlrtRSI); 2116 EMLRTPUSHRTSTACK(&fo_emlrtRSI); 2117 b_eml_error(); 2118 EMLRTPOPRTSTACK(&fo_emlrtRSI); 2119 EMLRTPUSHRTSTACK(&go_emlrtRSI); 2120 EMLRTPUSHRTSTACK(&io_emlrtRSI); 2121 EMLRTPUSHRTSTACK(&mo_emlrtRSI); 2122 EMLRTPUSHRTSTACK(&oo_emlrtRSI); 2123 b_a_sizes = 1; 2124 b_a_data[0].re = a_data[0]; 2125 b_a_data[0].im = 0.0; 2126 b_eml_matlab_zggev(b_a_data, *(int32_T (*)[1])&b_a_sizes, &info, alpha1_data, *(int32_T (*)[1])&alpha1_sizes, beta1_data, *(int32_T (*)[1])&beta1_sizes, V_data, V_sizes); 2127 EMLRTPOPRTSTACK(&oo_emlrtRSI); 2128 EMLRTPUSHRTSTACK(&no_emlrtRSI); 2129 colnorm = eml_xnrm2(1, V_data, V_sizes, 1); 2130 EMLRTPOPRTSTACK(&no_emlrtRSI); 2131 V_data[0] = eml_div(V_data[0], colnorm); 2132 EMLRTPOPRTSTACK(&mo_emlrtRSI); 2133 EMLRTPOPRTSTACK(&io_emlrtRSI); 2134 EMLRTPUSHRTSTACK(&jo_emlrtRSI); 2135 b_eml_div(alpha1_data, *(int32_T (*)[1])&alpha1_sizes, beta1_data, *(int32_T (*)[1])&beta1_sizes, tmp_data, *(int32_T (*)[1])&tmp_sizes); 2136 diag(tmp_data, *(int32_T (*)[1])&tmp_sizes, b_a_data, b_tmp_sizes); 2137 D_sizes[0] = b_tmp_sizes[0]; 2138 D_sizes[1] = b_tmp_sizes[1]; 2139 b_a_sizes = b_tmp_sizes[0] * b_tmp_sizes[1] - 1; 2140 for (tmp_sizes = 0; tmp_sizes <= b_a_sizes; tmp_sizes++) { 2141 D_data[tmp_sizes] = b_a_data[tmp_sizes]; 2142 } 2143 EMLRTPOPRTSTACK(&jo_emlrtRSI); 2144 if (info < 0.0) { 2145 EMLRTPUSHRTSTACK(&ko_emlrtRSI); 2146 b_eml_warning(); 2147 EMLRTPOPRTSTACK(&ko_emlrtRSI); 2148 } else { 2149 if (info > 0.0) { 2150 EMLRTPUSHRTSTACK(&lo_emlrtRSI); 2151 c_eml_warning(); 2152 EMLRTPOPRTSTACK(&lo_emlrtRSI); 2153 } 2154 } 2155 EMLRTPOPRTSTACK(&go_emlrtRSI); 2156 dc0 = power(D_data[0], b); 2157 D_data[0].re = V_data[0].re * dc0.re - V_data[0].im * dc0.im; 2158 D_data[0].im = V_data[0].re * dc0.im + V_data[0].im * dc0.re; 2159 EMLRTPUSHRTSTACK(&ho_emlrtRSI); 2160 b_mrdivide(D_data, D_sizes, V_data, V_sizes, b_a_data, b_tmp_sizes); 2161 b_a_sizes = b_tmp_sizes[0] * b_tmp_sizes[1] - 1; 2162 for (tmp_sizes = 0; tmp_sizes <= b_a_sizes; tmp_sizes++) { 2163 D_data[tmp_sizes] = b_a_data[tmp_sizes]; 2164 } 2165 EMLRTPOPRTSTACK(&ho_emlrtRSI); 2166 c_sizes[0] = 1; 2167 c_data[0] = D_data[0].re; 2168 EMLRTPOPRTSTACK(&hn_emlrtRSI); 2169 } 2170 } 2171 2172 void mpower(const real_T a_data[1], const int32_T a_sizes[2], real_T b, real_T c_data[1], int32_T c_sizes[2]) 2173 { 2174 boolean_T b0; 2175 const mxArray *y; 2176 static const int32_T iv10[2] = { 1, 19 }; 2177 const mxArray *m6; 2178 static const char_T cv6[19] = { 'C', 'o', 'd', 'e', 'r', ':', 'M', 'A', 'T', 'L', 'A', 'B', ':', 's', 'q', 'u', 'a', 'r', 'e' }; 2179 real_T tmp_data[1]; 2180 int32_T D_sizes[2]; 2181 int32_T loop_ub; 2182 int32_T i3; 2183 int8_T c[2]; 2184 creal_T D_data[1]; 2185 creal_T b_D_data[1]; 2186 int32_T b_D_sizes[2]; 2187 int32_T V_sizes[2]; 2188 creal_T V_data[1]; 2189 int32_T beta1_sizes; 2190 creal_T beta1_data[1]; 2191 int32_T alpha1_sizes; 2192 creal_T alpha1_data[1]; 2193 real_T info; 2194 real_T colnorm; 2195 creal_T r; 2196 int32_T c_D_sizes[2]; 2197 if (a_sizes[0] == a_sizes[1]) { 2198 b0 = TRUE; 2199 } else { 2200 b0 = FALSE; 2201 } 2202 if (b0) { 2203 } else { 2204 EMLRTPUSHRTSTACK(&xd_emlrtRSI); 2205 y = NULL; 2206 m6 = mxCreateCharArray(2, iv10); 2207 emlrtInitCharArray(19, m6, cv6); 2208 emlrtAssign(&y, m6); 2209 error(message(y, &s_emlrtMCI), &t_emlrtMCI); 2210 EMLRTPOPRTSTACK(&xd_emlrtRSI); 2211 } 2212 if (muDoubleScalarFloor(b) == b) { 2213 EMLRTPUSHRTSTACK(&yd_emlrtRSI); 2214 D_sizes[0] = a_sizes[0]; 2215 D_sizes[1] = a_sizes[1]; 2216 loop_ub = a_sizes[0] * a_sizes[1] - 1; 2217 for (i3 = 0; i3 <= loop_ub; i3++) { 2218 tmp_data[i3] = a_data[i3]; 2219 } 2220 matrix_to_integer_power(tmp_data, D_sizes, b, c_data, c_sizes); 2221 EMLRTPOPRTSTACK(&yd_emlrtRSI); 2222 } else { 2223 EMLRTPUSHRTSTACK(&ae_emlrtRSI); 2224 for (i3 = 0; i3 < 2; i3++) { 2225 c[i3] = (int8_T)a_sizes[i3]; 2226 } 2227 c_sizes[0] = (int32_T)c[0]; 2228 c_sizes[1] = (int32_T)c[1]; 2229 EMLRTPUSHRTSTACK(&af_emlrtRSI); 2230 b_eml_error(); 2231 EMLRTPOPRTSTACK(&af_emlrtRSI); 2232 EMLRTPUSHRTSTACK(&bf_emlrtRSI); 2233 EMLRTPUSHRTSTACK(&ef_emlrtRSI); 2234 D_sizes[0] = a_sizes[0]; 2235 D_sizes[1] = a_sizes[1]; 2236 loop_ub = a_sizes[0] * a_sizes[1] - 1; 2237 for (i3 = 0; i3 <= loop_ub; i3++) { 2238 D_data[i3].re = a_data[i3]; 2239 D_data[i3].im = 0.0; 2240 } 2241 EMLRTPUSHRTSTACK(&if_emlrtRSI); 2242 EMLRTPUSHRTSTACK(&jf_emlrtRSI); 2243 b_D_sizes[0] = D_sizes[0]; 2244 b_D_sizes[1] = D_sizes[1]; 2245 loop_ub = D_sizes[0] * D_sizes[1] - 1; 2246 for (i3 = 0; i3 <= loop_ub; i3++) { 2247 b_D_data[i3] = D_data[i3]; 2248 } 2249 eml_matlab_zggev(b_D_data, b_D_sizes, &info, alpha1_data, *(int32_T (*)[1])&alpha1_sizes, beta1_data, *(int32_T (*)[1])&beta1_sizes, V_data, V_sizes); 2250 EMLRTPOPRTSTACK(&jf_emlrtRSI); 2251 if (D_sizes[0] > 0) { 2252 EMLRTPUSHRTSTACK(&kf_emlrtRSI); 2253 colnorm = eml_xnrm2(1, V_data, V_sizes, 1); 2254 EMLRTPOPRTSTACK(&kf_emlrtRSI); 2255 emlrtDynamicBoundsCheck(1, 1, V_sizes[0] * V_sizes[1], &nc_emlrtBCI); 2256 emlrtDynamicBoundsCheck(1, 1, V_sizes[0] * V_sizes[1], &oc_emlrtBCI); 2257 V_data[0] = eml_div(V_data[0], colnorm); 2258 } 2259 EMLRTPOPRTSTACK(&if_emlrtRSI); 2260 EMLRTPOPRTSTACK(&ef_emlrtRSI); 2261 EMLRTPUSHRTSTACK(&ff_emlrtRSI); 2262 loop_ub = alpha1_sizes - 1; 2263 for (i3 = 0; i3 <= loop_ub; i3++) { 2264 D_data[i3] = alpha1_data[i3]; 2265 } 2266 b_eml_div(D_data, *(int32_T (*)[1])&alpha1_sizes, beta1_data, *(int32_T (*)[1])&beta1_sizes, alpha1_data, *(int32_T (*)[1])&alpha1_sizes); 2267 diag(alpha1_data, *(int32_T (*)[1])&alpha1_sizes, D_data, D_sizes); 2268 EMLRTPOPRTSTACK(&ff_emlrtRSI); 2269 if (info < 0.0) { 2270 EMLRTPUSHRTSTACK(&gf_emlrtRSI); 2271 b_eml_warning(); 2272 EMLRTPOPRTSTACK(&gf_emlrtRSI); 2273 } else { 2274 if (info > 0.0) { 2275 EMLRTPUSHRTSTACK(&hf_emlrtRSI); 2276 c_eml_warning(); 2277 EMLRTPOPRTSTACK(&hf_emlrtRSI); 2278 } 2279 } 2280 EMLRTPOPRTSTACK(&bf_emlrtRSI); 2281 alpha1_sizes = 0; 2282 while (alpha1_sizes <= a_sizes[0] - 1) { 2283 emlrtDynamicBoundsCheck(1, 1, D_sizes[0], &hc_emlrtBCI); 2284 emlrtDynamicBoundsCheck(1, 1, D_sizes[1], &ic_emlrtBCI); 2285 r = power(D_data[0], b); 2286 alpha1_sizes = 0; 2287 while (alpha1_sizes <= a_sizes[0] - 1) { 2288 emlrtDynamicBoundsCheck(1, 1, D_sizes[0], &lc_emlrtBCI); 2289 emlrtDynamicBoundsCheck(1, 1, D_sizes[1], &mc_emlrtBCI); 2290 emlrtDynamicBoundsCheck(1, 1, V_sizes[0], &jc_emlrtBCI); 2291 emlrtDynamicBoundsCheck(1, 1, V_sizes[1], &kc_emlrtBCI); 2292 D_data[0].re = V_data[0].re * r.re - V_data[0].im * r.im; 2293 D_data[0].im = V_data[0].re * r.im + V_data[0].im * r.re; 2294 alpha1_sizes = 1; 2295 } 2296 alpha1_sizes = 1; 2297 } 2298 EMLRTPUSHRTSTACK(&cf_emlrtRSI); 2299 c_D_sizes[0] = D_sizes[0]; 2300 c_D_sizes[1] = D_sizes[1]; 2301 loop_ub = D_sizes[0] * D_sizes[1] - 1; 2302 for (i3 = 0; i3 <= loop_ub; i3++) { 2303 b_D_data[i3] = D_data[i3]; 2304 } 2305 b_mrdivide(b_D_data, c_D_sizes, V_data, V_sizes, D_data, D_sizes); 2306 EMLRTPOPRTSTACK(&cf_emlrtRSI); 2307 loop_ub = D_sizes[0] * D_sizes[1] - 1; 2308 for (i3 = 0; i3 <= loop_ub; i3++) { 2309 tmp_data[i3] = D_data[i3].re; 2310 } 2311 emlrtSizeEqCheck1D(c_sizes[0] * c_sizes[1], D_sizes[0] * D_sizes[1], &f_emlrtECI); 2312 for (i3 = 0; i3 < 2; i3++) { 2313 c[i3] = (int8_T)c_sizes[i3]; 2314 } 2315 c_sizes[0] = (int32_T)c[0]; 2316 c_sizes[1] = (int32_T)c[1]; 2317 loop_ub = c[1] - 1; 2318 for (i3 = 0; i3 <= loop_ub; i3++) { 2319 alpha1_sizes = c[0] - 1; 2320 for (beta1_sizes = 0; beta1_sizes <= alpha1_sizes; beta1_sizes++) { 2321 c_data[beta1_sizes + c_sizes[0] * i3] = tmp_data[beta1_sizes + c[0] * i3]; 2322 } 2323 } 2324 EMLRTPOPRTSTACK(&ae_emlrtRSI); 2325 } 2326 } 2327 /* End of code generation (mpower.c) */ 2328 |